vlt / docs

  • PricingBenchmarks (opens in new window)Community (opens in new window)Feedback
  • Overview
    • Overview
    • Reference
  • Type Aliases
  • Validator()<T>
  • WhichConfig
  • Functions
  • find()
  • load()
  • reload()
  • save()
  • unload()
  1. Client
  2. /
  3. API Reference
  4. /
  5. @vltpkg/vlt-json
  6. /
  7. Reference

Reference

Type Aliases

Validator()<T>

TypeScript
type Validator<T> = (x, file) => asserts x is T;

Defined in: index.ts:107

Type Parameters

Type Parameter
T

Parameters

ParameterType
xunknown
filestring

Returns

asserts x is T


WhichConfig

TypeScript
type WhichConfig = "user" | "project";

Defined in: index.ts:29

Functions

find()

TypeScript
function find(
   which, 
   cwd, 
   home): string

Defined in: index.ts:159

Parameters

ParameterTypeDefault value
whichWhichConfig'project'
cwdstring...
homestring...

Returns

string


load()

TypeScript
function load<T>(
   field, 
   validator, 
   which): undefined | T

Defined in: index.ts:146

Type Parameters

Type Parameter
T

Parameters

ParameterTypeDefault value
fieldstringundefined
validatorValidator<T>undefined
whichWhichConfig'project'

Returns

undefined | T


reload()

TypeScript
function reload(field, which): unknown

Defined in: index.ts:132

Parameters

ParameterTypeDefault value
fieldstringundefined
whichWhichConfig'project'

Returns

unknown


save()

TypeScript
function save(
   field, 
   value, 
   which): void

Defined in: index.ts:200

Parameters

ParameterTypeDefault value
fieldstringundefined
valueunknownundefined
whichWhichConfig'project'

Returns

void


unload()

TypeScript
function unload(which): void

Defined in: index.ts:124

Parameters

ParameterTypeDefault value
whichWhichConfig'project'

Returns

void


Previous@vltpkg/vlt-jsonNext@vltpkg/vlx

On this page

  • Type Aliases
  • Validator()<T>
  • WhichConfig
  • Functions
  • find()
  • load()
  • reload()
  • save()
  • unload()

Deploy your package on vlt.io

Publish scoped and private packages, manage organizations and access, and give every developer and CI environment a consistent source for public and private JavaScript dependencies.

Publish now