src/index.js
function Providence(options = NOT_SET, skipDataCheck = false, skipProcessOptions = false) {

    if(options === NOT_SET) {
        throw new Error('Expected options to be a plain object or an Immutable Map');
    }

    // This will not support constructors that are extending Providence.
    // They should provide their own setup in their constructor function.
    if(!(this instanceof Providence)) {
        return new Providence(options, skipDataCheck, skipProcessOptions);
    }

    this._options = skipProcessOptions ? options : processOptions(options);

    // Used for caching value of the Providence object.
    // When the unboxed root data and this._refUnboxedRootData are equal,
    // then unboxed root data hasn't changed since the previous look up, and thus
    // this._cachedValue and value at path also hasn't changed.
    this._refUnboxedRootData = NOT_SET;
    this._cachedValue = NOT_SET;

    if(!skipDataCheck && this._options.getIn(DATA_PATH, NOT_SET) === NOT_SET) {
        throw new Error("value at path ['root', 'data'] is required!")
    }
}
function Providence(options = NOT_SET, skipDataCheck = false, skipProcessOptions = false) {

    if(options === NOT_SET) {
        throw new Error('Expected options to be a plain object or an Immutable Map');
    }

    // This will not support constructors that are extending Providence.
    // They should provide their own setup in their constructor function.
    if(!(this instanceof Providence)) {
        return new Providence(options, skipDataCheck, skipProcessOptions);
    }

    this._options = skipProcessOptions ? options : processOptions(options);

    // Used for caching value of the Providence object.
    // When the unboxed root data and this._refUnboxedRootData are equal,
    // then unboxed root data hasn't changed since the previous look up, and thus
    // this._cachedValue and value at path also hasn't changed.
    this._refUnboxedRootData = NOT_SET;
    this._cachedValue = NOT_SET;

    if(!skipDataCheck && this._options.getIn(DATA_PATH, NOT_SET) === NOT_SET) {
        throw new Error("value at path ['root', 'data'] is required!")
    }
}
function Providence ( options = NOT_SET , skipDataCheck = false , skipProcessOptions = false ) { if ( options === NOT_SET ) { throw new Error ( 'Expected options to be a plain object or an Immutable Map' ) ; } // This will not support constructors that are extending Providence. // They should provide their own setup in their constructor function. if ( ! ( this instanceof Providence ) ) { return new Providence ( options , skipDataCheck , skipProcessOptions ) ; } this . _options = skipProcessOptions ? options : processOptions ( options ) ; // Used for caching value of the Providence object. // When the unboxed root data and this._refUnboxedRootData are equal, // then unboxed root data hasn't changed since the previous look up, and thus // this._cachedValue and value at path also hasn't changed. this . _refUnboxedRootData = NOT_SET ; this . _cachedValue = NOT_SET ; if ( ! skipDataCheck && this . _options . getIn ( DATA_PATH , NOT_SET ) === NOT_SET ) { throw new Error ( "value at path ['root', 'data'] is required!" ) } }
Create a Providence cursor given options.
Options may either be plain object or an Immutable Map.

@param {Object | Immutable Map} options Defines the character of the providence cursor.
Create a Providence cursor given options . Options may either be plain object or an Immutable Map .