open-index/open-npm huggingface dataset:
npm package: @geronimus/coalesce
Description: As in SQL, returns its first argument that is neither null nor undefined.
Author: Graham Brown
Latest version: 0.1.3

# coalesce( [ value1, [ value2, [ ... ] ] ] )

As in SQL, `coalesce()` returns its first argument that is neither `null` nor `undefined`.

## Examples

```javascript
const coalesce = require( "@geronimus/coalesce" );

const result = coalesce(
  couldProduceNull( option1 ),
  couldProduceNull( option2 ),
  "default result"
);
```

## Parameters

`value1` *any*, `value2` *any*, ...

Any number of values or expressions. The first that does not evaluate to `null` or `undefined` will be returned.
npm package: @geronimus/deep-freeze
Description: Rcursively freezes an object, and any objects that its properties reference.
Author: Graham Brown
Latest version: 0.1.1

# deepFreeze( obj )

Recursively freezes an object, and all objects referenced in that object's properties. (And so on...)

## Examples

```javascript
const deepFreeze = require( "@geronimus/deep-freeze" );

const box = {
  height: 20,
  width: 30,
  colour: {
    name: "sea red",
    rgb: {
      red: 244,
      green: 112,
      blue: 112
    }
  }
};

const returnValue = deepFreeze( box );

// The object is frozen in place, as well as returned.
returnValue === box; // => true

// You can no longer mess with any of its properties,
// no matter how deeply nested.
box.height = 10;
box.colour.name = "smokey pink";
box.colour.rgb.red = 255;

box.height; // => 20
box.colour.name; // => "sea red"
box.colour.rgb.red; // => 244

Object.isFrozen( box.colour.rgb ); // => true
```

## Parameters

`obj` *object*

The object you wish to deeply freeze. It will be frozen in place, as well as returned. (No element of it is not copied.)

## Returns

*object*

The same object that gets passed in as `obj`, recursively frozen.