open-index/open-npm huggingface dataset:
npm package: @kingjs/descriptor.nested.to-paths
Description: Returns paths constructed of nodes that satisfy a predicate.
Author: Chris King
Latest version: 1.0.1

# @[kingjs](https://www.npmjs.com/package/kingjs)/[descriptor](https://www.npmjs.com/package/@kingjs/descriptor).[nested](https://www.npmjs.com/package/@kingjs/descriptor.nested).to-paths
Returns paths constructed of nodes that satisfy a predicate.
## Usage
Return an array of pet names like this:
```js
var toPaths = require('@kingjs/descriptor.nested.to-paths');

var people = {
  alice: { 
    pet: 'tiger' 
  },
  bob: { 
    pet: 'snuggles' 
  },
  chris: {
    pet: 'spike'
  }
};

var result = toPaths(
  people, 
  x => x instanceof Object, 
  null
);
```
result:
```js
{
  { 
    alice: { pet: null },
    bob: { pet: null },
    chris: { pet: null },
  }
}
```
## API
```ts
declare function toPaths(
  tree: NestedDescriptor,
  predicate: () => boolean,
  value?: any
): NestedDescriptor
```
### Interfaces
- `NestedDescriptor`: see [@kingjs/descriptor/nested][nested-descriptor]
### Parameters
- `tree`: A tree from which a subtree worth of nodes is selected that satisfy a predicate.
- `predicate`: Selects which nodes to include in the subtree.
- `value`: Optional leaf value.
### Returns
Returns an subtree of `tree` where each node satisfies the `predicate`.
## Install
With [npm](https://npmjs.org/) installed, run
```
$ npm install @kingjs/descriptor.nested.to-paths
```
## License
MIT

![Analytics](https://analytics.kingjs.net/descriptor/nested/to-paths)

  [nested-descriptor]: https://www.npmjs.com/package/@kingjs/descriptor/nested
npm package: @kingjs/descriptor.nested.update
Description: Updates the leafs of a tree to values returned by a callback which takes the current value. ## Usage Replace the name of the person followed with the object representing the person being followed like this: ```js var update = require('@kingjs/descriptor.n
Author: Chris King
Latest version: 1.0.18

# @[kingjs](https://www.npmjs.com/package/kingjs)/[descriptor](https://www.npmjs.com/package/@kingjs/descriptor).[nested](https://www.npmjs.com/package/@kingjs/descriptor.nested).update
Updates the leafs of a tree to values returned by a callback which takes the current value.
## Usage
Replace the name of the person followed with the object representing the person being followed like this:
```js
var update = require('@kingjs/descriptor.nested.update');

var people = {

  alice: {
    name: 'Alice',
    follows: 'bob'
  },
  bob: {
    name: 'Bob', 
    follows: 'chris'
  },
  chris: {
    name: 'Chris',
    follows: 'alice'
  }
};

var result = update.call(
  people,
  people,
  { '*': { follows: null } },
  function(name) { return this[name]; }
)
```
result:
```js
{
  alice: {
    name: 'Alice',
    follows: { /* bob */ }
  },
  bob: {
    name: 'Bob', 
    follows: { /* chris */ }
  },
  chris: {
    name: 'Chris',
    follows: { /* alice */ }
  }
}
```
## API
```ts
declare function update(
  tree: NestedDescriptor,
  path: NestedDescriptor,
  callback: (leaf, path) => any,
  thisArg?
): NestedDescriptor
```
### Interfaces
- `NestedDescriptor`: see [@kingjs/descriptor][descriptor]
### Parameters
- `tree`: The tree whose leafs are going to be updated.
- `path`: The paths of the values to be updated. 
- `callback`: Used to update `paths` of `tree`:
  - `leaf`: The leaf value.
  - `path`: The path value.
- `thisArg`: The `this` argument to pass to `callback`.
### Returns
Returns `tree` with updated values for the leafs found at `paths`.
## Install
With [npm](https://npmjs.org/) installed, run
```
$ npm install @kingjs/descriptor.nested.update
```
## License
MIT

![Analytics](https://analytics.kingjs.net/descriptor/nested/update)

  [descriptor]: https://www.npmjs.com/package/@kingjs/descriptor
npm package: @kingjs/descriptor.normalize
Description: Returns a descriptor given a primitive value.
Author: Chris King
Latest version: 1.0.1
Deprecated: see @kingjs/descriptor.create

# @[kingjs](https://www.npmjs.com/package/kingjs)/[descriptor](https://www.npmjs.com/package/@kingjs/descriptor).normalize
Returns a descriptor given a primitive value.
## Usage
```js
var normalize = require('@kingjs/descriptor.normalize');

var people = {
  alice: { name: 'Alice', age: 21 },
  bob: 'Bob'
}

for (var name in people)
  people[name] = normalize(people[name], 'name');

people;
```
result:
```js
{
  alice: { name: 'Alice', age: 21 },
  bob: { name: 'Bob' }
}
```
## API
```ts
declare function normalize(
  value,
  action: string | (value) => Descriptor
): Descriptor
```
### Interfaces
- `Descriptor`: see [@kingjs/descriptor][descriptor]
### Parameters
- `value`: The value to normalize into a descriptor.
- `action`: The name of the property to hold `value` or a function that accepts `value` and returns a descriptor. 
### Returns
Returns `value` if already a descriptor, else a normalized descriptor for value.
## Install
With [npm](https://npmjs.org/) installed, run
```
$ npm install @kingjs/descriptor.normalize
```
## License
MIT

![Analytics](https://analytics.kingjs.net/descriptor/normalize)

  [descriptor]: https://www.npmjs.com/package/@kingjs/descriptor
npm package: @kingjs/descriptor.object
Description: Exports all `@kingjs/descriptor.object.*` functionality in one package.
Author: Chris King
Latest version: 1.0.13

# @[kingjs](https://www.npmjs.com/package/kingjs)/[descriptor](https://www.npmjs.com/package/@kingjs/descriptor).object
Exports all `@kingjs/descriptor.object.*` functionality in one package.
## Usage
```js
var descriptor = require('@kingjs/descriptor.object');
```
## Packages
The functions `clone`, `remove`, and `write` will not re-freeze descriptors before returning them and should be used to implement descriptor transforms. The functions `prolog` and `epilog` should be used by descriptor transforms to assert the precondition that the descriptor is frozen, and establish the postcondition that the descriptor is frozen by calling `freeze` on any thawed descriptor returned by `clone`, `remove`, and/or `write`. 

- [`clone`][clone]
- [`epilog`][clone]
- [`freeze`][freeze]
- [`isFrozen`][is-frozen]
- [`keys`][keys]
- [`prolog`][prolog]
- [`remove`][remove]
- [`writableSymbol`][writable-symbol]
- [`write`][write]

## Install
With [npm](https://npmjs.org/) installed, run
```
$ npm install @kingjs/descriptor.object
```
## License
MIT

![Analytics](https://analytics.kingjs.net/descriptor/object)

  [dictionary]: https://www.npmjs.com/package/@kingjs/dictionary

  [clone]: https://www.npmjs.com/package/@kingjs/descriptor.object.clone
  [epilog]: https://www.npmjs.com/package/@kingjs/descriptor.object.epilog
  [freeze]: https://www.npmjs.com/package/@kingjs/descriptor.object.freeze
  [is-frozen]: https://www.npmjs.com/package/@kingjs/descriptorobject..is-frozen
  [keys]: https://www.npmjs.com/package/@kingjs/descriptor.object.keys
  [prolog]: https://www.npmjs.com/package/@kingjs/descriptor.object.prolog
  [remove]: https://www.npmjs.com/package/@kingjs/descriptor.object.remove
  [writable-symbol]: https://www.npmjs.com/package/@kingjs/descriptor.object.writable-symbol
  [write]: https://www.npmjs.com/package/@kingjs/descriptor.object.write
npm package: @kingjs/descriptor.object.clone
Description: Returns a mutable clone of a descriptor.
Author: Chris King
Latest version: 1.0.1

# @[kingjs](https://www.npmjs.com/package/kingjs)/[descriptor](https://www.npmjs.com/package/@kingjs/descriptor).[object](https://www.npmjs.com/package/@kingjs/descriptor.object).clone
Returns a mutable clone of a descriptor.
## Usage
```js
var clone = require('@kingjs/descriptor.object.clone');
var target = { x:0 };
clone.call(target);
```
result:
```js
{ x:0 }
```
## API
```ts
declare function clone(
  this: Descriptor
): any
```
### Interfaces
- `Descriptor`: see [@kingjs/descriptor][descriptor]
### Parameters
- `this`: The descriptor to clone.
### Returns
Returns a mutable clone of the descriptor.
## Remarks
## Install
With [npm](https://npmjs.org/) installed, run
```
$ npm install @kingjs/descriptor.object.clone
```
## License
MIT

![Analytics](https://analytics.kingjs.net/descriptor/object/clone)


  [descriptor]: https://www.npmjs.com/package/@kingjs/descriptor
npm package: @kingjs/descriptor.object.epilog
Description: ```js var xxx = require('@kingjs/descriptor.xxx'); ``` result: ```js ``` ## API ```ts declare function xxx( ): any ``` ### Interfaces - `Descriptor`: see [@kingjs/descriptor][descriptor] ### Parameters ### Returns ## Remarks ## Install Wi
Author: Chris King
Latest version: 1.0.2

# @[kingjs](https://www.npmjs.com/package/kingjs)/[descriptor](https://www.npmjs.com/package/@kingjs/descriptor).[object](https://www.npmjs.com/package/@kingjs/descriptor.object).xxx
## Usage
```js
var xxx = require('@kingjs/descriptor.xxx');
```
result:
```js
```
## API
```ts
declare function xxx(
): any
```
### Interfaces
- `Descriptor`: see [@kingjs/descriptor][descriptor]
### Parameters
### Returns
## Remarks
## Install
With [npm](https://npmjs.org/) installed, run
```
$ npm install @kingjs/descriptor.xxx
```
## License
MIT

![Analytics](https://analytics.kingjs.net/descriptor/xxx)


  [descriptor]: https://www.npmjs.com/package/@kingjs/descriptor
npm package: @kingjs/descriptor.object.freeze
Description: Freezes a descriptor.
Author: Chris King
Latest version: 1.0.1

# @[kingjs](https://www.npmjs.com/package/kingjs)/[descriptor](https://www.npmjs.com/package/@kingjs/descriptor).[object](https://www.npmjs.com/package/@kingjs/descriptor.object).freeze
Freezes a descriptor.
## Usage
See [`write`][write].
### Interfaces
- `Descriptor`: see [@kingjs/descriptor][descriptor]
### Parameters
### Returns
## Remarks
## Install
With [npm](https://npmjs.org/) installed, run
```
$ npm install @kingjs/descriptor.object.freeze
```
## License
MIT

![Analytics](https://analytics.kingjs.net/descriptor/object/freeze)

  [descriptor]: https://www.npmjs.com/package/@kingjs/descriptor
  [write]: https://www.npmjs.com/package/@kingjs/descriptor.object.write
npm package: @kingjs/descriptor.object.is-frozen
Description: Test if a descriptor is frozen.
Author: Chris King
Latest version: 1.0.0

# @[kingjs](https://www.npmjs.com/package/kingjs)/[descriptor](https://www.npmjs.com/package/@kingjs/descriptor).[object](https://www.npmjs.com/package/@kingjs/descriptor.object).is-frozen
Test if a descriptor is frozen.
## Usage
See [`write`][write].
### Interfaces
- `Descriptor`: see [@kingjs/descriptor][descriptor]
### Parameters
### Returns
## Remarks
## Install
With [npm](https://npmjs.org/) installed, run
```
$ npm install @kingjs/descriptor.object.is-frozen
```
## License
MIT

![Analytics](https://analytics.kingjs.net/descriptor/object/is-frozen)

  [descriptor]: https://www.npmjs.com/package/@kingjs/descriptor
  [write]: https://www.npmjs.com/package/@kingjs/descriptor.object.write
npm package: @kingjs/descriptor.object.keys
Description: Returns an array of own and inherited enumerable property names. ## Usage ```js var keys = require('@kingjs/descriptor.object.keys');
Author: Chris King
Latest version: 1.0.0

# @[kingjs](https://www.npmjs.com/package/kingjs)/[descriptor](https://www.npmjs.com/package/@kingjs/descriptor).[object](https://www.npmjs.com/package/@kingjs/descriptor.object).keys
Returns an array of own and inherited enumerable property names.
## Usage
```js
var keys = require('@kingjs/descriptor.object.keys');

var base = { inherited: null };
var derived = Object.create(base);
derived.own = null;

var result = keys.call(derived);
result.sort();
result;
```
result:
```js
[ 'inherited', 'own' ]
```
## API
```ts
declare function keys(
  this: Descriptor
): any
```
### Interfaces
- `Descriptor`: see [@kingjs/descriptor][descriptor]
### Parameters
- `this`: The descriptor whose own and inherited property names will be returned.
### Returns
Returns an array containing the own and inherited enumerable property names of `this`.
## Install
With [npm](https://npmjs.org/) installed, run
```
$ npm install @kingjs/descriptor.object.keys
```
## License
MIT

![Analytics](https://analytics.kingjs.net/descriptor/object/keys)

  [descriptor]: https://www.npmjs.com/package/@kingjs/descriptor
npm package: @kingjs/descriptor.object.prolog
Description: Descriptor function prolog.
Author: Chris King
Latest version: 1.0.0

# @[kingjs](https://www.npmjs.com/package/kingjs)/[descriptor](https://www.npmjs.com/package/@kingjs/descriptor).[object](https://www.npmjs.com/package/@kingjs/descriptor.object).prolog
Descriptor function prolog.
## Usage
```js
var prolog = require('@kingjs/descriptor.prolog');
```
result:
```js
```
## API
```ts
declare function prolog(
  this: Descriptor
): Descriptor
```
### Interfaces
- `Descriptor`: see [@kingjs/descriptor][descriptor]
### Parameters
### Returns
## Remarks
Asserts the descriptor is frozen.
## Install
With [npm](https://npmjs.org/) installed, run
```
$ npm install @kingjs/descriptor.prolog
```
## License
MIT

![Analytics](https://analytics.kingjs.net/descriptor/prolog)


  [descriptor]: https://www.npmjs.com/package/@kingjs/descriptor
npm package: @kingjs/descriptor.object.remove
Description: Returns a descriptor with a named property removed.
Author: Chris King
Latest version: 1.0.0

# @[kingjs](https://www.npmjs.com/package/kingjs)/[descriptor](https://www.npmjs.com/package/@kingjs/descriptor).[object](https://www.npmjs.com/package/@kingjs/descriptor.object).remove
Returns a descriptor with a property removed.
## Usage
Remove the property 'x' like this:
```js
var remove = require('@kingjs/descriptor.object.remove');

var descriptor = { x:0 };
remove.call(descriptor, 'x');
```
result:
```js
{ }
```
## API
```ts
declare function remove(
  this: Descriptor,
  key: string
): Descriptor
```
### Interfaces
- `Descriptor`: see [@kingjs/descriptor][descriptor]
### Parameters
- `this`: The descriptor from which property `key` will be removed.
- `key`: The property to be removed.
### Returns
Returns a descriptor with property `key` removed. A copy is returned if the descriptor has an inherited property `key` or the descriptor is frozen. If `this` is an array then subsequent values are shifted left over the removed index.
## Install
With [npm](https://npmjs.org/) installed, run
```
$ npm install @kingjs/descriptor.object.remove
```
## License
MIT

![Analytics](https://analytics.kingjs.net/descriptor/object/remove)

  [descriptor]: https://www.npmjs.com/package/@kingjs/descriptor
npm package: @kingjs/descriptor.object.writable-symbol
Description: Symbol whose presence indicates a descriptor is mutable.
Author: Chris King
Latest version: 1.0.0

# @[kingjs](https://www.npmjs.com/package/kingjs)/[descriptor](https://www.npmjs.com/package/@kingjs/descriptor).[object](https://www.npmjs.com/package/@kingjs/descriptor.object).writable-symbol
Symbol whose presence indicates a descriptor is mutable.
## Usage
```js
var writableSymbol = require('@kingjs/descriptor.object.writable-symbol');
typeof writableSymbol;
```
result:
'symbol'
## API
### Interfaces
- `Descriptor`: see [@kingjs/descriptor][descriptor]
## Remarks
Object and Array literals are considered immutable by descriptor APIs because those objects are created without `writable-symbol`. 

`write`, `clone`, and `remove`, will return descriptors with `writable-symbol` set to `undefined`. 

`freeze` will delete `writable-symbol`.

`isFrozen` will test for `writable-symbol`.

All other descriptor APIs that return a descriptor will not have `writable-symbol` set. 
## Install
With [npm](https://npmjs.org/) installed, run
```
$ npm install @kingjs/descriptor.object.writable-symbol
```
## License
MIT

![Analytics](https://analytics.kingjs.net/descriptor/object/writable-symbol)


  [descriptor]: https://www.npmjs.com/package/@kingjs/descriptor
npm package: @kingjs/descriptor.object.write
Description: Writes a value to a descriptor, cloning descriptors if frozen.  ## Usage Set a few properties on a descriptor like this. ```js var write = require('@kingjs/descriptor.object.write'); var freeze = require('@kingjs/descriptor.object.freeze'); var isFr
Author: Chris King
Latest version: 1.0.0

# @[kingjs](https://www.npmjs.com/package/kingjs)/[descriptor](https://www.npmjs.com/package/@kingjs/descriptor).[object](https://www.npmjs.com/package/@kingjs/descriptor.object).write
Writes a value to a descriptor, cloning descriptors if frozen. 
## Usage
Set a few properties on a descriptor like this.
```js
var write = require('@kingjs/descriptor.object.write');
var freeze = require('@kingjs/descriptor.object.freeze');
var isFrozen = require('@kingjs/descriptor.object.is-frozen');
  
function setAFewProperties(value) {

  // this will not clone value if foo is already 0
  value = write.call(value, 'foo', 0);

  // this will clone value if bar is not already 1
  value = write.call(value, 'bar', 1);

  // this call will not clone value if value was cloned above
  value = write.call(value, 'baz', 2);

  // value will have been cloned at most once

  // freeze value before exposing to users
  return freeze.call(value);
}

var target = { foo: 0 };

// target is born frozen
var bornFrozen = isFrozen.call(target);

setAFewProperties(target);
```
result:
```js
{
  foo: 0,
  bar: 1,
  baz: 2,
}
```
## API
```ts
declare function write(
  descriptor: Descriptor,
  name: string,
  value: any
): Descriptor
```
### Interfaces
- `Descriptor`: see [@kingjs/descriptor][descriptor]
### Parameters
- `this`: The descriptor whose property will be updated.
- `name`: The property to write.
- `value`: The updated value.
### Returns
Returns `this` or, if `this` is frozen, a clone of `this` with updated properties. 

Previously cloned values
returned by `write` will note be cloned by subsequent calls to `write`. Use [`isFrozen`][is-frozen] to test if a value has been previously cloned by write but not yet re-frozen via [`freeze`][freeze]. 

Use [`freeze`][freeze] to freeze any values which might have been cloned before returning them to the user.

Descriptor functions using this protocol in order that any descriptor passed as an argument are not mutated (see [`isFrozen`][is-frozen]) and to make immutable any descriptors returned (see [`freeze`][freeze]). This allows object and array literals to be passed to descriptor functions without having to be first frozen via `Object.freeze`.
## Install
With [npm](https://npmjs.org/) installed, run
```
$ npm install @kingjs/descriptor.object.write
```
## License
MIT

![Analytics](https://analytics.kingjs.net/descriptor/object/write)

  [descriptor]: https://www.npmjs.com/package/@kingjs/descriptor
  [freeze]: https://www.npmjs.com/package/@kingjs/descriptor/object/freeze
  [is-frozen]: https://www.npmjs.com/package/@kingjs/descriptor/object/is-frozen
npm package: @kingjs/descriptor.path
Description: Updates property values matched by a path.
Author: Chris King
Latest version: 1.0.0
Deprecated: see @kingjs/descriptor.nested.update

# @[kingjs](https://www.npmjs.com/package/kingjs)/[descriptor](https://www.npmjs.com/package/@kingjs/descriptor).path
Updates property values matched by a path.
## Usage
Deduct a dollar from the balances of every account like this:
```js
var mapPath = require('@kingjs/descriptor.path');

var accounts = {
  alice: {
    id: 0,
    balance: 101
  },
  bob: {
    id: 1,
    balance: 201
  }
}

mapPath.call(
  accounts,
  '*.balance',
  function(x) { return x - 1; }
)
```
result:
```js
{
  alice: {
    id: 0,
    balance: 100
  },
  bob: {
    id: 1,
    balance: 200
  }
}
```
## API
```ts
declare function path(
  this,
  path: string | string[],
  callback: (this, x) => any
): any
```
### Parameters
- `this`: The object whose property's values are updated.
- `path`: An array of property names and/or the wildcard `'*'` which specify the path(s) to map.
- `callback`: The update function to apply to each property that matches the path.
  - `this`: The same this as passed to `path` (which may not be the same as object hosting the property of the value being upated).
  - `x`: The value of the property being updated.
### Returns
Returns `this` after updating properties which matched `path`.
## Remarks
The `path` may also be a `'.'` delimited string composed of property names and/or the wildcard symbol `'*'`.
## Install
With [npm](https://npmjs.org/) installed, run
```
$ npm install @kingjs/descriptor.path
```
## License
MIT

![Analytics](https://analytics.kingjs.net/descriptor/path)
npm package: @kingjs/descriptor.pluck
Description: Overwrites each property value on a descriptor with a property value on `this` descriptor which shares the same name, and then deletes the property on `this` descriptor.
Author: Chris King
Latest version: 1.0.2
Deprecated: no replacement

# @[kingjs](https://www.npmjs.com/package/kingjs)/[descriptor](https://www.npmjs.com/package/@kingjs/descriptor).pluck
Overwrites each property value on a descriptor with a property value on `this` descriptor which shares the same name, and then deletes the property on `this` descriptor.
## Usage
Pluck the properties representing fruits off of a descriptor containing properties representing foods tastiness rating.
```js
var pluck = require('@kingjs/descriptor.pluck');

var food = {
  banana: 100,
  apple: 50,
  chicken: 20,
  salad: 5
};

var fruits = {
  banana: undefined,
  apple: undefined,
  orange: undefined
};

var result = {
  food: pluck.call(food, fruits),
  fruits
};
```
result:
```js
{
  food: {
    chicken: 20,
    salad: 5
  },

  fruits: {
    banana: 100,
    apple 50,
    orange: undefined
  }
}
```
## API
```ts
declare function pluck(
  this: Descriptor, 
  descriptor: Descriptor
): Descriptor
```
### Interfaces
- `Descriptor`: see [@kingjs/descriptor][descriptor]
### Parameters
- `this`: The descriptor whose properties will be copied to properties with matching names on `descriptor` and then deleted.
- `descriptor`: The descriptor whose properties will be overwritten with values found in properties of the same name on `this`.
### Returns
Returns `this`.
## Install
With [npm](https://npmjs.org/) installed, run
```
$ npm install @kingjs/descriptor.pluck
```
## License
MIT

![Analytics](https://analytics.kingjs.net/descriptor/pluck)
npm package: @kingjs/descriptor.reduce
Description: Accumulate properties of a descriptor using a callback.
Author: Chris King
Latest version: 1.0.2

# @[kingjs](https://www.npmjs.com/package/kingjs)/[descriptor](https://www.npmjs.com/package/@kingjs/descriptor).reduce
Accumulate properties of a descriptor using a callback.
## Usage
Increment all descriptor values like this:
```js
var reduce = require('@kingjs/descriptor.reduce');

function callback(value, key) {
  return value + 1;
}

var descriptor = {
  foo: 0,
  bar: 1,
}

reduce.call(descriptor, callback);
```
result:
```js
{
  foo: 1,
  bar: 2
}
```
## API
```ts
declare function reduce(
  this: Descriptor,
  accumulator: any,
  callback: (this, value, key: string) => any,
  thisArg?
): Descriptor
```
### Interfaces
- `Descriptor`: see [@kingjs/descriptor][descriptor]
### Parameters
- `this`: The descriptor whose properties are to be mapped.
- `accumulator`: The initial value into which the descriptor is accumulated.
- `callback`: A mapping function called for each property of `this`.
  - `value`: The value being mapped.
  - `key`: The name of the property being mapped.
- `thisArg`: The `this` argument to pass to `callback`.
## Install
With [npm](https://npmjs.org/) installed, run
```
$ npm install @kingjs/descriptor.reduce
```
## License
MIT

![Analytics](https://analytics.kingjs.net/descriptor/reduce)

  [descriptor]: https://www.npmjs.com/package/@kingjs/descriptor
npm package: @kingjs/descriptor.remove
Description: Returns a descriptor with a named property removed.
Author: Chris King
Latest version: 1.0.3

# @[kingjs](https://www.npmjs.com/package/kingjs)/[descriptor](https://www.npmjs.com/package/@kingjs/descriptor).remove
Returns a descriptor with a property removed.
## Usage
Remove the property 'x' like this:
```js
var remove = require('@kingjs/descriptor.remove');

var descriptor = { x:0 };
remove.call(descriptor, 'x');
```
result:
```js
{ }
```
## API
```ts
declare function remove(
  this: Descriptor,
  key: string
): Descriptor
```
### Interfaces
- `Descriptor`: see [@kingjs/descriptor][descriptor]
### Parameters
- `this`: The descriptor from which property `key` will be removed.
- `key`: The property to be removed.
### Returns
Returns a descriptor with property `key` removed. A copy is returned if the descriptor has an inherited property `key` or the descriptor is frozen. If `this` is an array then subsequent values are shifted left over the removed index.
## Install
With [npm](https://npmjs.org/) installed, run
```
$ npm install @kingjs/descriptor.remove
```
## License
MIT

![Analytics](https://analytics.kingjs.net/descriptor/remove)

  [descriptor]: https://www.npmjs.com/package/@kingjs/descriptor
npm package: @kingjs/descriptor.scorch
Description: Deletes properties with `undefined` value. 
Author: Chris King
Latest version: 1.0.5

# @[kingjs](https://www.npmjs.com/package/kingjs)/[descriptor](https://www.npmjs.com/package/@kingjs/descriptor).scorch
Deletes properties with `undefined` value. 
## Usage
```js
var scorch = require('@kingjs/descriptor.scorch');

var source = { a: undefined };
var result = scorch.call(source);
'a' in result;
```
result:
```js
`false`
```
## API
```ts
declare function scorch(
  this: any
): any
```
### Parameters
- `this`: Object whose properties with `undefined` values are to be deleted.
### Returns
Returns `this` after properties with `undefined` value have been deleted.
## Remarks
If `this` is an array then `undefined` values will be spliced out of the array.
## Install
With [npm](https://npmjs.org/) installed, run
```
$ npm install @kingjs/descriptor.scorch
```
## License
MIT

![Analytics](https://analytics.kingjs.net/descriptor/scorch)
npm package: @kingjs/descriptor.snapshot
Description: Returns a unique snapshot id.
Author: Chris King
Latest version: 1.0.0
Deprecated: Use Object.freeze()

# @[kingjs](https://www.npmjs.com/package/kingjs)/[descriptor](https://www.npmjs.com/package/@kingjs/descriptor).snapshot
Returns a unique snapshot id.
## Usage
```js
var snapshot = require('@kingjs/descriptor.snapshot');
```
result:
```js
```
## API
```ts
declare function snapshot(
): integer
```
### Interfaces
- `Descriptor`: see [@kingjs/descriptor][descriptor]
### Parameters
### Returns
## Remarks
## Install
With [npm](https://npmjs.org/) installed, run
```
$ npm install @kingjs/descriptor.snapshot
```
## License
MIT

![Analytics](https://analytics.kingjs.net/descriptor/snapshot)


  [descriptor]: https://www.npmjs.com/package/@kingjs/descriptor
npm package: @kingjs/descriptor.transform
Description: Returns a new transformed descriptor.
Author: Chris King
Latest version: 1.0.2
Deprecated: see @kingjs/descriptor.nested.transform

# @[kingjs](https://www.npmjs.com/package/kingjs)/[descriptor](https://www.npmjs.com/package/@kingjs/descriptor).transform
Returns a new descriptor whose properties are those found on `this` whose values have been transformed by a callback.
## Usage
Map a descriptor of lowercase letters to uppercase letters.
```js
var transform = require('@kingjs/descriptor.transform');

transform.call({
  apple: 'a',
  orange: 'o',
  banana: 'b'
}, function(x) { 
  return String.prototype.toUpperCase.call(x); 
})
```
result:
```js
{
  apple: 'A',
  orange: 'O',
  banana: 'B'
}
```
## API
```ts
declare function transform(
  this: Descriptor,
  name: string,
  action: {
    callback(
      name: string, 
      descriptor: Descriptor
    ): any,
    wrap,
    thunks,
    bases,
    defaults
  }
): Descriptor
```
### Interfaces
- `Descriptor`: see [@kingjs/descriptor][descriptor]
### Parameters
- `this`: The descriptor to transform.
- `callback`: Function that returns a property value of the resulting descriptor.
  - `this`: The descriptor being transformed.
  - `value`: The current value being transformed.
  - `name`: Than property name of the value being transformed.
### Returns
Returns a new descriptor whose properties are those found on `this` whose values have been transformed by the callback.
## Remarks
The list of properties to transform is set before the first callback is made. So if properties are added to the descriptor during mapping they will not be included in the resulting descriptor.
## Install
With [npm](https://npmjs.org/) installed, run
```
$ npm install @kingjs/descriptor.transform
```
## License
MIT

![Analytics](https://analytics.kingjs.net/descriptor/transform)

  [descriptor]: https://www.npmjs.com/package/@kingjs/descriptor
npm package: @kingjs/descriptor.update
Description: Updates values of a descriptor using a callback.
Author: Chris King
Latest version: 1.0.18

# @[kingjs](https://www.npmjs.com/package/kingjs)/[descriptor](https://www.npmjs.com/package/@kingjs/descriptor).update
Updates values of a descriptor using a callback.
## Usage
Increment all descriptor values like this:
```js
var update = require('@kingjs/descriptor.update');

function callback(value, key) {
  return value + 1;
}

var descriptor = {
  foo: 0,
  bar: 1,
}

update.call(descriptor, callback);
```
result:
```js
{
  foo: 1,
  bar: 2
}
```
## API
```ts
declare function update(
  this: Descriptor,
  callback: (this, value, key: string) => any,
  thisArg?
): Descriptor
```
### Interfaces
- `Descriptor`: see [@kingjs/descriptor][descriptor]
### Parameters
- `this`: The descriptor whose properties are to be mapped.
- `callback`: A mapping function called for each property of `this`.
  - `value`: The value being mapped.
  - `key`: The name of the property being mapped.
- `thisArg`: The `this` argument to pass to `callback`.
### Returns
Returns `this` after mapping properties using the `callback`.
## Install
With [npm](https://npmjs.org/) installed, run
```
$ npm install @kingjs/descriptor.update
```
## License
MIT

![Analytics](https://analytics.kingjs.net/descriptor/update)


  [descriptor]: https://www.npmjs.com/package/@kingjs/descriptor
npm package: @kingjs/descriptor.update-each
Description: Updates values of a descriptor using a callback.
Author: Chris King
Latest version: 1.0.1
Deprecated: see @kingjs/descriptor.update

# @[kingjs](https://www.npmjs.com/package/kingjs)/[descriptor](https://www.npmjs.com/package/@kingjs/descriptor).update-each
Updates values of a descriptor using a callback.
## Usage
Increment all descriptor values like this:
```js
var updateEach = require('@kingjs/descriptor.update-each');

function callback(value, key) {
  return value + 1;
}

var descriptor = {
  foo: 0,
  bar: 1,
}

updateEach.call(descriptor, callback);
```
result:
```js
{
  foo: 1,
  bar: 2
}
```
## API
```ts
declare function updateEach(
  this: Descriptor,
  callback: (value, key: string) => any,
  copyOnWrite: boolean
): Descriptor
```
### Interfaces
- `Descriptor`: see [@kingjs/descriptor][descriptor]
### Parameters
- `this`: The descriptor whose properties are to be mapped.
- `callback`: A mapping function called for each property of `this`.
  - `value`: The value being mapped.
  - `key`: The name of the property being mapped.
- `copyOnWrite`: If true, then a copy of `this` will be created on the first write and returned instead of `this`.
### Returns
Returns `this` after mapping properties using the `callback`. 

If `this` is frozen or `copyOnWrite` specified then a copy of `this` will be created on the first write and returned instead of `this`.
## Install
With [npm](https://npmjs.org/) installed, run
```
$ npm install @kingjs/descriptor.update-each
```
## License
MIT

![Analytics](https://analytics.kingjs.net/descriptor/update-each)


  [descriptor]: https://www.npmjs.com/package/@kingjs/descriptor
npm package: @kingjs/descriptor.writable-symbol
Description: Symbol whose presence indicates a descriptor is mutable.
Author: Chris King
Latest version: 1.0.0
Deprecated: see @kingjs/descriptor.object.writable-symbol

# @[kingjs](https://www.npmjs.com/package/kingjs)/[descriptor](https://www.npmjs.com/package/@kingjs/descriptor).writable-symbol
Symbol whose presence indicates a descriptor is mutable.
## Usage
```js
var writableSymbol = require('@kingjs/descriptor.writable-symbol');
typeof writableSymbol;
```
result:
'symbol'
## API
### Interfaces
- `Descriptor`: see [@kingjs/descriptor][descriptor]
## Remarks
Object and Array literals are considered immutable by descriptor APIs because those objects are created without `writable-symbol`. 

`write`, `clone`, `normalize`, and `remove`, will return  descriptors with `writable-symbol` set to `undefined`. 

`freeze` will delete `writable-symbol`.

`isFrozen` will test for `writable-symbol`.

All other descriptor APIs that return a descriptor will not have `writable-symbol` set. 
## Install
With [npm](https://npmjs.org/) installed, run
```
$ npm install @kingjs/descriptor.writable-symbol
```
## License
MIT

![Analytics](https://analytics.kingjs.net/descriptor/writable-symbol)


  [descriptor]: https://www.npmjs.com/package/@kingjs/descriptor
npm package: @kingjs/descriptor.write
Description: Writes a value to a descriptor, cloning descriptors if frozen.  ## Usage Set a few properties on a descriptor like this. ```js var write = require('@kingjs/descriptor.write');
Author: Chris King
Latest version: 1.0.9

# @[kingjs](https://www.npmjs.com/package/kingjs)/[descriptor](https://www.npmjs.com/package/@kingjs/descriptor).write
Writes a value to a descriptor, cloning descriptors if frozen. 
## Usage
Set a few properties on a descriptor like this.
```js
var write = require('@kingjs/descriptor.write');

var target = { foo: 0 };
write.call(target, 'bar', 0);
```
result:
```js
{
  foo: 0,
  bar: 0,
}
```
## API
```ts
declare function write(
  descriptor: Descriptor,
  name: string,
  value: any
): Descriptor
```
### Interfaces
- `Descriptor`: see [@kingjs/descriptor][descriptor]
### Parameters
- `this`: The descriptor whose property will be updated.
- `name`: The property to write.
- `value`: The updated value.
### Returns
Returns a clone of `this` with updated properties. 
## Install
With [npm](https://npmjs.org/) installed, run
```
$ npm install @kingjs/descriptor.write
```
## License
MIT

![Analytics](https://analytics.kingjs.net/descriptor/write)

  [descriptor]: https://www.npmjs.com/package/@kingjs/descriptor
  [freeze]: https://www.npmjs.com/package/@kingjs/descriptor/freeze
  [is-frozen]: https://www.npmjs.com/package/@kingjs/descriptor/is-frozen
npm package: @kingjs/dictionary
Description: A dictionary.
Author: Chris King
Latest version: 1.0.6

# @[kingjs](https://www.npmjs.com/package/kingjs)/dictionary

A dictionary.

## Usage
Create a object for which the `in` operator returns `false` for all values including `'toString'` like this:
```js
'toString' in new Dictionary();
```
result:
```js
false
```

## API
```ts
declare class Dictionary { }
```
## Remarks
Javascript objects are often used as dictionaries of strings to values. This is bad practice! An empty Javascript object is _not_ an empty dictionary. It contains a `'toString'` key visible to the `in` operator. 

## Install
With [npm](https://npmjs.org/) installed, run

```
$ npm install @kingjs/dictionary
```

## License

MIT

![Analytics](https://analytics.kingjs.net/dictionary)
npm package: @kingjs/empty-object
Description: An empty frozen object.
Author: Chris King
Latest version: 1.0.7

# @[kingjs](https://www.npmjs.com/package/kingjs)/empty-object
An empty frozen object. 
## Usage
Get a singleton frozen empty object like this:
```js
require('@kingjs/empty-object');
```
result:
```js
{ }
```
### Return Value
An empty frozen object.
## Install
With [npm](https://npmjs.org/) installed, run
```
$ npm install @kingjs/empty-object
```
## License

MIT

![Analytics](https://analytics.kingjs.net/empty-object)
npm package: @kingjs/enumerable
Description: Exports all `@kingjs/enumerable.*` functionality in one package.
Author: Chris King
Latest version: 1.0.5
Deprecated: none

# @[kingjs](https://www.npmjs.com/package/kingjs)/enumerable
Exports all `@kingjs/enumerable.*` functionality in one package.
## Usage
```js
var enumerable = require('@kingjs/enumerable');
```
## API
- [`create`][create]
- [`define`][define]
- [`forEach`][for-each]
- [`fromEach`][from-each]
- [`odometer`][odometer]
## Install
With [npm](https://npmjs.org/) installed, run
```
$ npm install @kingjs/enumerable
```
## License
MIT

![Analytics](https://analytics.kingjs.net/enumerable)

  [create]: https://www.npmjs.com/package/@kingjs/enumerable.create
  [define]: https://www.npmjs.com/package/@kingjs/enumerable.define
  [for-each]: https://www.npmjs.com/package/@kingjs/enumerable.for-each
  [from-each]: https://www.npmjs.com/package/@kingjs/enumerable.from-each
  [odometer]: https://www.npmjs.com/package/@kingjs/enumerable.odometer
npm package: @kingjs/enumerable.create
Description: Creates an Enumerable out of `arguments`.
Author: Chris King
Latest version: 1.0.1
Deprecated: none

# @[kingjs](https://www.npmjs.com/package/kingjs)/[enumerable](https://www.npmjs.com/package/@kingjs/enumerable).create
Creates an Enumerable out of `arguments`.
## Usage
Create an Enumerable from the arguments `1`, `2`, and `3` like this:
```js
var sequence = require('@kingjs/enumerable.create')

var enumerable = sequence(0, 1, 2);
var enumerator = enumerable.getEnumerator();

var result = [];
while (enumerator.moveNext()) 
  result.push(enumerator.current);

result;
```
result:
```js
[0, 1, 2];
```
## API
```ts
declare function create(
  ...args: any[]
): Enumerable
```
### Interfaces
- `Enumerable`: See [@kingjs/enumerable.define](https://www.npmjs.com/package/@kingjs/enumerable.define).
### Parameters
- `args`: The values returned as an `Enumerable`.
### Return Value
- Returns an `Enumerable` which generates `args`.

## Install
With [npm](https://npmjs.org/) installed, run

```
$ npm install @kingjs/enumerable.create
```

## License

MIT

![Analytics](https://analytics.kingjs.net/enumerable/create)
npm package: @kingjs/enumerable.for-each
Description: Invokes a function for each element in a sequence.
Author: Chris King
Latest version: 1.0.1
Deprecated: none

# @[kingjs](https://www.npmjs.com/package/kingjs)/[enumerable](https://www.npmjs.com/package/@kingjs/enumerable).for-each
Invokes a function for each element in a sequence.
## Usage
Log if a value has an even or odd index like this:
```js
var forEach = require('@kingjs/enumerable.for-each');
var sequence = require('@kingjs/enumerable.create')

var result = [];

forEach(function(x, i) {
  result.push(x + ' at ' + i)
}, sequence('a', 'b', 'c'));

result;
```
result:
```js
[ 
  'a at 0',
  'b at 1',
  'c at 2',
]
```
## API
```ts
function forEach(
  action: (x, i) => void, 
  sequence: Enumerable
);
```
### Interfaces
- `Enumerable`: See [@kingjs/enumerable.define](https://www.npmjs.com/package/@kingjs/enumerable.define).
### Parameters
- `action`: The action to call for each element in `sequence`.
  - `x`: Current element of `sequence`.
  - `i`: The index of element `x`.
- `sequence`: The elements to pass to `action`.
## Remarks
`action` will be invoked with the same `this` as was passed to `forEach`. 
## Install
With [npm](https://npmjs.org/) installed, run
```
$ npm install @kingjs/enumerable.for-each
```
## License
MIT

![Analytics](https://analytics.kingjs.net/enumerable/for-each)
npm package: @kingjs/enumerable.from-each
Description: Generates a sequence of arrays or descriptors composed of a single element each from a set of arrays.
Author: Chris King
Latest version: 1.0.2
Deprecated: none

# @[kingjs](https://www.npmjs.com/package/kingjs)/[enumerable](https://www.npmjs.com/package/@kingjs/enumerable).from-each
Generates a sequence of arrays or descriptors composed of a single element each from a set of arrays.
## Usage
Generate the cross product of shirts sizes (`small`, `medium`, and `large`) and colors (`red` and `green`) like this: 
```js
var fromEach = require('@kingjs/enumerable.from-each');
var toArray = require('@kingjs/linq.to-array');

var shirts = fromEach({
  size: [ 'S', 'M', 'L' ],
  color: [ 'Red', 'Green' ]
});

toArray.call(shirts);
```
results:
```js
[
  { size: 'S', color: 'Red' },
  { size: 'M', color: 'Red' },
  { size: 'L', color: 'Red' },
  { size: 'S', color: 'Green' },
  { size: 'M', color: 'Green' },
  { size: 'L', color: 'Green' }
];
```
Generate the same cross product except use an array instead of a descriptor to express the set of arrays like this:
```js
var fromEach = require('@kingjs/enumerable.from-each');
var toArray = require('@kingjs/linq.to-array');

var shirts = fromEach([
  [ 'S', 'M', 'L' ], 
  [ 'Red', 'Green' ]
]);

toArray.call(shirts);

```
result:
```js
[
  [ 'S', 'Red' ],
  [ 'M', 'Red' ],
  [ 'L', 'Red' ],
  [ 'S', 'Green' ],
  [ 'M', 'Green' ],
  [ 'L', 'Green' ]
];
``` 
## API

```ts
function fromEach(
  data: any[][] | { [index: string]: any[] }
): Enumerator
```
### Interfaces
- `Enumerable`: See [@kingjs/enumerable.define](https://www.npmjs.com/package/@kingjs/enumerable.define).
### Parameters
- `data`: An array of arrays, or a descriptor whose every property is an array.
### Return Value
A sequence of arrays or descriptors where each index or property is replaced with an element of its corresponding array.
## Install
With [npm](https://npmjs.org/) installed, run
```
$ npm install @kingjs/enumerable.from-each
```
## Acknowledgments
Like [nUnit](http://nunit.org/) `ValuesAttribute` and `TheoryAttribute` which use an odometer to generate combinations of test values from a set of arrays. 
## License
MIT

![Analytics](https://analytics.kingjs.net/enumerable/from-each)
npm package: @kingjs/enumerable.odometer
Description: Generates arrays of odometer digits.
Author: Chris King
Latest version: 1.0.2
Deprecated: none

# @[kingjs](https://www.npmjs.com/package/kingjs)/[enumerable](https://www.npmjs.com/package/@kingjs/enumerable).odometer
Generates arrays of odometer digits.
## Usage
A typical car odometer has 7 wheels, each wheel has 10 digits, and a new value is generated as the car moves along. These values can be generated for 11 units of distance like this:
```js
var odometer = require('@kingjs/enumerable.odometer')

var enumerable = odometer([10, 10, 10, 10, 10, 10, 10]);
var enumerator = enumerable.getEnumerator();

var actual = [];
for (var distance = 0; distance < 11; distance++) {
  enumerator.moveNext();
  var current = enumerator.current;
  actual.push(current.reverse());
}

actual;
```
result:
```js
[
  [0, 0, 0, 0, 0, 0, 0],
  [0, 0, 0, 0, 0, 0, 1],
  [0, 0, 0, 0, 0, 0, 2],
  [0, 0, 0, 0, 0, 0, 3],
  [0, 0, 0, 0, 0, 0, 4],
  [0, 0, 0, 0, 0, 0, 5],
  [0, 0, 0, 0, 0, 0, 6],
  [0, 0, 0, 0, 0, 0, 7],
  [0, 0, 0, 0, 0, 0, 8],
  [0, 0, 0, 0, 0, 0, 9],
  [0, 0, 0, 0, 0, 1, 0],
];
```
## API
```ts
function odometer(
  bases?: number[]
): Enumerable
```
### Interfaces
- `Enumerable`: See [@kingjs/enumerable.define](https://www.npmjs.com/package/@kingjs/enumerable.define).
### Parameters
- `bases`: an array of normal numbers specifying the number of digits on each wheel of the odometer at each position. May also be passed as an argument list.
### Return Value
Returns a sequence of arrays composed of the digits produced by an odometer of the specified number of digits and bases. The generator terminates after every combination has been generated.
## Remarks
A typical odometer increments digits from right to left however `odometer` increments from left to right so digits increment starting at index 0.
## Install
With [npm](https://npmjs.org/) installed, run
```
$ npm install @kingjs/enumerable.odometer
```
## License
MIT

![Analytics](https://analytics.kingjs.net/enumerable/odometer)
npm package: @kingjs/expand-readme-template
Description: Generates README content from a readme.t.md next to package.config.
Latest version: 1.0.2
Deprecated: see @kingjs/tools.expand-readme-template

# @[kingjs][@kingjs]/[expand-readme-template][ns0]
Generates README content from a readme.t.md next to package.config.
## Usage
```js
'use strict';
var makeReadme = require('@kingjs/expand-readme-template');
var assert = require('assert')

```
## API
```ts
example(foo[, bar[, baz]])
```
### Parameters
- `foo`: Foo comment
- `bar`: Bar comment
- `baz`: Baz comment
## Remarks
Run in directory containing `package.json`.
## Install
With [npm](https://npmjs.org/) installed, run
```
$ npm install -g @kingjs/expand-readme-template
$ make-readme
```
## License
MIT

![Analytics](https://analytics.kingjs.net/{path})

[@kingjs]: https://www.npmjs.com/package/kingjs
[ns0]: https://www.npmjs.com/package/@kingjs/expand-readme-template
npm package: @kingjs/for-each
Description: Invoke a function for each element in an enumerable.
Author: Chris King
Latest version: 1.0.3
Deprecated: see @kingjs/enumerable.for-each

# @kingjs/for-each
Invoke a function for each element in an enumerable.
## Usage
Logging if each number in a range is even or odd could be done like this:
```js
var forEach = require('@kingjs/for-each');
var sequence = require('@kingjs/sequence')

var result = [];

forEach(function(x, i) {
  result.push(x + ' at ' + i)
}, sequence('a', 'b', 'c'));

result;
```
result:
```js
[ 
  'a at 0',
  'b at 1',
  'c at 2',
]
```
## API
```ts
function forEach(
  action: (x, i) => void, 
  sequence: Enumerable
);
```
### Interfaces
- `Enumerable`: See [@kingjs/sequence](https://www.npmjs.com/package/@kingjs/sequence).
### Parameters
- `action`: The action to call for each element in `sequence`.
  - `x`: Current element of `sequence`.
  - `i`: The index of element `x`.
- `sequence`: The elements to pass to `action`.
## Remarks
`action` will be invoked with the same `this` as was passed to `forEach`. 
## Install
With [npm](https://npmjs.org/) installed, run
```
$ npm install @kingjs/for-each
```
## License
MIT

![Analytics](https://analytics.kingjs.net/enumerable/for-each)
npm package: @kingjs/from-each
Description: Generates a sequence of arrays or descriptors composed of a single element each from a set of arrays.
Latest version: 1.0.8

# @[kingjs][@kingjs]/[from-each][ns0]
Generates a sequence of arrays or descriptors composed of a single element each from a set of arrays.




### Remarks


## Install
With [npm](https://npmjs.org/) installed, run
```
$ npm install @kingjs/from-each
```
## Dependencies
|Package|Version|
|---|---|
|[`@kingjs/odometer`](https://www.npmjs.com/package/@kingjs/odometer)|`^1.0.7`|
## Source
https://repository.kingjs.net/from-each
## License
MIT

![Analytics](https://analytics.kingjs.net/from-each)

[@kingjs]: https://www.npmjs.com/package/kingjs
[ns0]: https://www.npmjs.com/package/@kingjs/from-each
npm package: @kingjs/func
Description: Exports all `@kingjs/func.*` functionality in one package.
Author: Chris King
Latest version: 1.0.2

# @[kingjs](https://www.npmjs.com/package/kingjs)/func
Exports all `@kingjs/func.*` functionality in one package.
## Usage
```js
var func = require('@kingjs/func');
```
## API
- [`returnThis`][return-this]
- [`returnArg0`][return-arg-0]
- [`returnArg1`][return-arg-1]
## Install
With [npm](https://npmjs.org/) installed, run
```
$ npm install @kingjs/func
```
## License
MIT

![Analytics](https://analytics.kingjs.net/func)

  [return-this]: https://www.npmjs.com/package/@kingjs/func.return-this
  [return-arg-0]: https://www.npmjs.com/package/@kingjs/func.return-arg-0
  [return-arg-1]: https://www.npmjs.com/package/@kingjs/func.return-arg-1