diff --git a/.babelrc b/.babelrc index ccd9248..2bea062 100644 --- a/.babelrc +++ b/.babelrc @@ -1,3 +1,3 @@ { - "presets": ["nodejs-lts"] + "plugins": ["transform-es2015-modules-commonjs"] } diff --git a/.eslintrc b/.eslintrc index f289950..b5e56f7 100644 --- a/.eslintrc +++ b/.eslintrc @@ -32,6 +32,7 @@ "no-mixed-spaces-and-tabs": 0, "no-cond-assign": 0, "no-unused-vars": 0, - "constructor-super": 0 + "constructor-super": 0, + "no-class-assign": 0 } } diff --git a/.travis.yml b/.travis.yml index 45b0108..92f2c7f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,7 @@ language: node_js node_js: - - "4" - - "5" - "6" + - "7" os: - linux sudo: false diff --git a/README.md b/README.md index 1b598fc..c65bb64 100644 --- a/README.md +++ b/README.md @@ -9,17 +9,11 @@ [![Dev Deps][david-dev-image]][david-dev-url] Gawk is a observable model that wraps JavaScript data types. Once a JavaScript -value is wrapped, it allows you to listen for changes. You can observe deeply -nested objects too. +value is gawked, you can listen for changes including deeply nested changes. -Gawk supports the common built-in data types such as string, boolean, number, -array, object, function, null, and undefined. Anything that you can represent -in a JSON object, you can gawk. +Only arrays and objects can be gawked. All other types are passed through. -Gawked arrays, objects, and functions have unique methods for common tasks. For -example, `GawkArray` instances have `push()` and `pop()` methods. - -> Note: gawk requires Node.js 4 or newer. +> Note: gawk uses ES2015 proxies and thus requires Node.js 6 or newer. ## Installation @@ -28,22 +22,20 @@ example, `GawkArray` instances have `push()` and `pop()` methods. ## Examples ```javascript -import { gawk } from 'gawk'; -// or if you're using CommonJS: -// const gawk = require('gawk').gawk; +import gawk from 'gawk'; const obj = gawk({ foo: 'bar' }); -obj.watch(evt => { +gawk.watch(obj, (obj, source) => { console.info('object changed!'); - console.info('new value =', evt.target.toJS()); + console.info('new value =', evt.target); }); -obj.set('foo', 'baz'); +obj.foo = 'baz'; -console.info(obj.toJS()); // { foo: 'baz' } +console.info(obj); // { foo: 'baz' } ``` You can also be notified if a deep child is changed: @@ -55,16 +47,39 @@ const obj = gawk({ } }); -obj.watch(evt => { +gawk.watch(obj, (obj, source) => { console.info('object changed!'); - console.info('new value =', evt.target.toJS()); + console.info('new value =', evt.target); }); -obj.get(['foo', 'bar']).push('c', 'd'); +obj.foo.bar.push('c', 'd'); + +console.info(obj); // { foo: { bar: ['a', 'b', 'c', 'd'] } } +``` + +You can also directly create `GawkObject` and `GawkArray` objects: + +```javascript +import { GawkArray, GawkObject } from 'gawk'; -console.info(obj.toJS()); // { foo: { bar: ['a', 'b', 'c', 'd'] } } +const obj = new GawkObject({ foo: 'bar' }); +const arr = new GawkArray('a', 'b', 'c'); ``` +## Upgrading to v3 + +Gawk v3 has dropped all gawk data types except `GawkArray` and `GawkObject`. + +Since Gawk v3 uses ES6 Proxies, you no longer need to call `obj.get()`, +`obj.set()`, `obj.delete()`, etc. + +Methods `obj.watch()`, `obj.merge()`, and `obj.mergeDeep()` have moved to +`gawk.watch()`, `gawk.merge()`, and `gawk.mergeDeep()`. The first argument must +be a gawk object. + +Gawk v3 no longer hashes values. This means speed. Gawk v3 is about 19 times +faster than v1 and v2. + ## License (The MIT License) diff --git a/benchmark/test.js b/benchmark/test.js new file mode 100644 index 0000000..acd9a93 --- /dev/null +++ b/benchmark/test.js @@ -0,0 +1,39 @@ +const gawk = require('../dist/index').gawk; + +const gobj = gawk({ + foo: { + bar: {} + } +}); + +let counter = 0; +gawk.watch(gobj, () => { + counter++; +}); + +const n = 100000; +console.log(`Set size: ${n}`); + +const start = Date.now(); + +for (let i = 0; i < n; i++) { + gawk.mergeDeep(gobj.foo, { + bar: { + baz: { + a: Math.random(), + b: Math.random(), + c: Math.random() + } + } + }); +} + +const delta = Date.now() - start; + +console.log('Finished in ' + (delta / 1000).toFixed(2) + 's'); + +if (counter === n) { + console.log(`Worked! Fired watcher ${counter} times`); +} else { + console.log(`Failed! Expected ${n} events, got ${counter}`); +} diff --git a/package.json b/package.json index 8023ae6..46a6557 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gawk", - "version": "2.0.0", + "version": "3.0.0", "description": "Observable JavaScript object model", "main": "./dist/index.js", "author": "Chris Barber (https://github.com/cb1kenobi)", @@ -23,30 +23,29 @@ "test": "gulp test" }, "dependencies": { - "object-hash": "^1.1.2", - "source-map-support": "^0.4.1" + "source-map-support": "^0.4.6" }, "devDependencies": { - "babel-eslint": "^6.1.0", - "babel-preset-nodejs-lts": "^1.2.2", + "babel-eslint": "^7.1.0", + "babel-plugin-transform-es2015-modules-commonjs": "^6.18.0", "chai": "^3.5.0", - "codeclimate-test-reporter": "^0.3.3", - "coveralls": "^2.11.9", - "del": "^2.2.1", + "codeclimate-test-reporter": "^0.4.0", + "coveralls": "^2.11.15", + "del": "^2.2.2", "esdoc-es7-plugin": "^0.0.3", "gulp": "^3.9.1", "gulp-babel": "^6.1.2", - "gulp-babel-istanbul": "^1.4.0", - "gulp-debug": "^2.1.2", - "gulp-esdoc": "^0.2.0", - "gulp-eslint": "^3.0.0", + "gulp-babel-istanbul": "^1.5.0", + "gulp-debug": "^3.0.0", + "gulp-esdoc": "^0.3.0", + "gulp-eslint": "^3.0.1", "gulp-filter": "^4.0.0", "gulp-inject-modules": "^1.0.0", - "gulp-load-plugins": "^1.2.4", - "gulp-mocha": "^2.2.0", + "gulp-load-plugins": "^1.4.0", + "gulp-mocha": "^3.0.1", "gulp-plumber": "^1.1.0", - "gulp-sourcemaps": "^2.0.0-alpha", - "sinon": "^1.17.4", + "gulp-sourcemaps": "^2.2.0", + "sinon": "^1.17.6", "sinon-chai": "^2.8.0" }, "homepage": "https://github.com/cb1kenobi/gawk", @@ -56,6 +55,6 @@ "url": "git://github.com/cb1kenobi/gawk.git" }, "engines": { - "node": ">=4.0.0" + "node": ">=6.0.0" } } diff --git a/src/index.js b/src/index.js index beec948..275a18c 100644 --- a/src/index.js +++ b/src/index.js @@ -1,1130 +1,483 @@ -import hash from 'object-hash'; - if (!Error.prepareStackTrace) { require('source-map-support/register'); } -/* - * Golden Rules: - * - Internal value must always be a JS data type, not a gawked type. - * - All gawk types must define a `val` setter and getter. - * - Gawk containers (such as GawkArray and GawkObject) must recompute their - * hash again if mutated or if a child changes. - * - Gawk containers must implement their own hasher(). - * - Gawk containers must duplicate their input values. - * - All methods or properties that return the value must returned the gawked - * value unless the `val` getter or `toJS()` method is invoked. - * - Gawk types may only have 1 and only 1 parent. - * - When setting a new value, detach the old value's parent. - */ +const WEAK_REF_KEY = {}; /** - * Creates a gawk object that wraps the input value. - * @param {*} value - A value to wrap. - * @param {GawkBase|Array} [parent] - The parent gawk object to notify of changes. - * @returns {GawkBase} + * Creates a gawk object that wraps the specified object. + * + * @param {*} value - A value to gawk. + * @param {GawkArray|GawkObject} [parent] - The parent gawk object. + * @returns {GawkArray|GawkObject|*} */ export default function gawk(value, parent) { - let cls; + if (parent && !(parent instanceof GawkArray) && !(parent instanceof GawkObject)) { + throw new TypeError('Expected parent to be a GawkArray or GawkObject'); + } - if (parent && !(parent instanceof GawkBase)) { - throw new TypeError('Expected parent to be a gawk data type'); + if (!value || typeof value !== 'object') { + return value; } - if (typeof value === 'undefined') { - value = undefined; - cls = GawkUndefined; - } else if (value === null) { - cls = GawkNull; - } else if (typeof value === 'number' || value instanceof Number) { - cls = GawkNumber; - } else if (typeof value === 'boolean' || value instanceof Boolean) { - cls = GawkBoolean; - } else if (typeof value === 'string' || value instanceof String) { - cls = GawkString; - } else if (Array.isArray(value)) { - cls = GawkArray; - } else if (value instanceof Date) { - cls = GawkDate; - } else if (typeof value === 'function') { - cls = GawkFunction; - } else if (typeof value === 'object') { - if (value instanceof GawkBase) { - if (value._parents.indexOf(parent) === -1) { - value._parents.push(parent); - } - return value; + let gawked; + if (value instanceof GawkArray || value instanceof GawkObject) { + if (value === parent) { + throw new Error('The parent must not be the same object as the value'); } - cls = GawkObject; + gawked = value; + + } else if (Array.isArray(value)) { + gawked = new GawkArray(); + gawked.push.apply(gawked, value); + } else { - throw new TypeError('Unsupported type'); + gawked = new GawkObject(value); + } + + if (parent) { + gawked.__gawk__.parents.add(parent); } - return new cls(value, parent); + return gawked; } export { gawk as gawk }; /** - * Event class. - */ -export class GawkEvent { - constructor({ source, targets, type }) { - this.source = source; - this.targets = targets; - this.type = type; - } -} - -/** - * The base class for all gawk data types. + * Internal function to wire up all gawk instances. Normally this would go in + * a base class that GawkObject and GawkArray extend, however JavaScript doesn't + * support multiple inheritance and so instead we tack the gawk functions onto + * the specified instance. + * + * @param {GawkArray|GawkObject} */ -export class GawkBase { - /** - * Constructs the base object. - * @param {*} value - The value being wrapped. - * @param {GawkBase|Array} [parent] - The parent gawk object to - * notify of changes. - * @access public - */ - constructor(value, parent = null) { - const parents = []; - if (parent) { - const pp = Array.isArray(parent) ? parent : [ parent ]; - for (const p of pp) { - if (!(p instanceof GawkBase)) { - throw new TypeError('Parent must be a gawk class'); - } - if (parents.indexOf(p) === -1) { - parents.push(p); - } - } - } - - Object.defineProperties(this, { +function gawkify(instance) { + const internal = Object.defineProperty(instance, '__gawk__', { + value: { /** - * The sha1 hash of this value. If the value is undefined, then the - * hash will always be `null`. - * @type {String} - * @access private + * A list of all the gawk object's parents. These parents are + * notified when a change occurs. + * @type {Set} */ - _hash: { enumerable: true, value: this.hasher(value), writable: true }, + parents: new Set, /** - * The actual value. This will always be a non-gawk type. - * @type {Array} - * @access private + * A list of listener functions call invoke when a change occurs. + * @type {Set} */ - _value: { enumerable: true, value, writable: true }, + listeners: new Set, /** - * The parent reference to notify if change occurs. - * @type {GawkBase} - * @access private + * A list of child objects that are modified while paused. + * @type {Set} */ - _parents: { value: parents, writable: true }, + queue: null, /** - * The list of all watchers to notify of changes. - * @type {Array} - * @access private + * Dispatches change notifications to the listeners. */ - _watchers: { value: [], writable: true }, + pause: () => { + if (!internal.queue) { + internal.queue = new Set; + } + }, /** - * An internal flag that if true when `resume()` is called, it sends - * out notifications if anything changed while paused. - * @type {Boolean} - * @access private + * Unpauses the gawk notifications and sends out any pending + * notifications. */ - _paused: { value: 0, writable: true }, + resume: () => { + if (internal.queue) { + const queue = internal.queue; + internal.queue = null; + for (const item of queue) { + internal.notify(item); + } + } + }, /** - * When set to a GawkEvent, then we are paused until `resume()` is - * been called. - * @type {GawkEvent|null} - * @access private + * Dispatches change notifications to the listeners. + * + * @param {GawkArray|GawkObject} [source] - The gawk object that was + * modified. */ - _pausedEvent: { value: null, writable: true } - }); - } - - /** - * Returns the value's hash. If the value is `undefined`, then the hash is `null`. - * @returns {String} - * @access public - */ - get hash() { - return this._hash; - } - - /** - * Returns the value as a pure JavaScript data type. - * @returns {*} - * @access public - */ - toJS() { - return this.val; - } - - /** - * Returns the value as a stringified JSON structure. Note that functions - * will be omitted. - * @param {Boolean} pretty - When `true`, adds whitespace to stringified output. - * @returns {String} - * @access public - */ - toJSON(pretty) { - return JSON.stringify(this.val, null, pretty ? ' ' : undefined); - } - - /** - * Returns a string of the value. - * @returns {String} - * @access public - */ - toString() { - if (typeof this._value === 'undefined' || this._value === null) { - return ''; - } - return String(this._value); - } - - /** - * Returns the raw value. - * @returns {*} - * @access public - */ - valueOf() { - const val = this.val; - if (typeof val === 'undefined' || val === null) { - return val; - } - return val.valueOf(); - } - - /** - * Determines if the value has changed. - * @param {{ newHash: String, newValue: *, oldHash: String, oldValue: * }} param - New and old hashes and values. - * @returns {Boolean} - * @access private - */ - didChange({ newHash, oldHash }) { - return oldHash !== newHash; - } - - /** - * Internal helper that hashes any value. This method can be overridden by - * classes. - * @param {*} value - The value to hash. - * @returns {String} - * @access private - */ - hasher(value) { - return typeof value === 'undefined' ? 'undefined' : hash(value); - } - - /** - * Removes the specified parent, if exists. This is intended for internal - * use only. - * @param {GawkBase} parent - The parent reference to remove. - * @access private - */ - removeParent(parent) { - for (let i = 0; i < this._parents.length; i++) { - if (this._parents[i] === parent) { - this._parents.splice(i--, 1); - } - } - } - - /** - * Detaches any child gawk objects. This is so containers such as `GawkArray` - * and `GawkObject` can disassociate themselves from their children. - * @access private - */ - detachChildren() { - // noop - } - - /** - * Sets the paused flag which pauses change notifications from being sent to - * watchers and parents. - * @access public - */ - pause() { - this._paused = true; - } - - /** - * Sets the paused flag which pauses change notifications from being sent to - * watchers and parents. - * @access public - */ - resume() { - const evt = this._paused && this._pausedEvent; - this._paused = false; - if (evt) { - // send notifications - for (const w of this._watchers) { - w(evt); - } - - for (const p of this._parents) { - p.notify(evt); - } - } - this._pausedEvent = null; - } - - /** - * Notifies watchers and the parent gawk object when this object changes. - * @param {*|GawkEvent} [newValue] - When value is a GawkEvent, that means - * a child gawk object was changed. Otherwise, if a value is present, then - * it is the new value. If there is no value passed in, then the existing - * value was mutated and we just need to recompute the hash and send out - * notifications. - * @access private - */ - notify(newValue) { - const oldValue = this._value; - const oldHash = this._hash; - - // newValue is a new value and not an event or undefined (mutation only) - const newishValue = arguments.length && !(newValue instanceof GawkEvent) ? newValue : oldValue; - const newHash = this.hasher(newishValue); - - if (!this.didChange({ newHash, newValue: newishValue, oldHash, oldValue })) { - return; - } - - // at this point, either this value or a child value changed - - this._hash = newHash; - - if (arguments.length && !(newValue instanceof GawkEvent)) { - // we have a new value, detach any children and set it - this.detachChildren(); - this._value = newValue; - } - - const targets = arguments.length && newValue instanceof GawkEvent ? newValue.targets : [ this ]; - - if (this._paused && this._pausedEvent) { - for (const target of targets) { - if (this._pausedEvent.targets.indexOf(target) === -1) { - this._pausedEvent.targets.push(target); + notify: (source = instance) => { + if (internal.queue) { + internal.queue.add(instance); + return; } - } - return; - } - const evt = new GawkEvent({ - source: this, - targets: targets, - type: 'change' - }); - - if (!this._paused) { - for (const w of this._watchers) { - w(evt); - } - for (const p of this._parents) { - p.notify(evt); - } - } else if (!this._pausedEvent) { - this._pausedEvent = evt; - } - } - - /** - * Adds a function to be invoked when this gawk object or any of its - * children are changed. - * @param {Function} fn - A callback to fire when something changes. - * @returns {Function} A function to stop watching. - * @access public - */ - watch(fn) { - if (typeof fn !== 'function') { - throw new TypeError('Listener must be a function'); - } - - this._watchers.push(fn); + // notify all of this object's listeners + for (const listener of internal.listeners) { + listener(instance, source); + } - return () => { - // remove all matches - for (let i = 0; i < this._watchers.length; i++) { - if (this._watchers[i] === fn) { - this._watchers.splice(i--, 1); + // notify all of this object's parents + for (const parent of internal.parents) { + parent.__gawk__.notify(source); } } - }; - } + } + }).__gawk__; } /** - * Gawk class to wrap undefined values. + * Gawk class to wrap arrays. + * + * @extends {Array} */ -export class GawkUndefined extends GawkBase { +export class GawkArray extends Array { /** - * Constructs the null object and makes sure the value is null. - * @param {Undefined} [value] - The value must be omitted or null. - * @param {GawkBase|Array} [parent] - The parent gawk object to notify of changes. - * @access public + * Constructs the array instance. + * + * @param {Number|*} [...args] - When argument is a number, sets the initial + * length of the array. When there are one or more arguments or the first + * argument is not a number, it populates the array upon initialization. */ - constructor(value, parent) { - if (typeof parent === 'undefined' && (value instanceof GawkBase || (Array.isArray(value) && value.every(v => v instanceof GawkBase)))) { - parent = value; - } - super(undefined, parent); - } + constructor(...args) { + super(); - /** - * Returns the value. - * @returns {null} - * @access public - */ - get val() { - return this._value; - } + const instance = new Proxy(this, { + set: (target, prop, value) => { + if (prop === '__gawk__') { + throw new Error('"__gawk__" is read-only'); + } - /** - * Stores undefined. - * @access public - */ - set val(value) { - this.notify(undefined); - } -} + // console.log('SETTING ' + prop); -/** - * Gawk class to wrap null values. - */ -export class GawkNull extends GawkBase { - /** - * Constructs the null object and makes sure the value is null. - * @param {null} value - The value must be omitted or null. - * @param {GawkBase|Array} [parent] - The parent gawk object to notify of changes. - * @access public - */ - constructor(value, parent) { - if (typeof parent === 'undefined' && (value instanceof GawkBase || (Array.isArray(value) && value.every(v => v instanceof GawkBase)))) { - parent = value; - } - super(null, parent); - } + const existing = target[prop]; + const changed = existing !== value; - /** - * Returns the value. - * @returns {null} - * @access public - */ - get val() { - return this._value; - } + if (!isNaN(parseInt(prop))) { + if (existing instanceof GawkArray || existing instanceof GawkObject) { + existing.__gawk__.parents.delete(instance); + } + target[prop] = gawk(value, instance); + } else { + target[prop] = value; + } - /** - * Stores null. - * @access public - */ - set val(value) { - this.notify(null); - } -} + if (changed) { + target.__gawk__.notify(); + } -/** - * Gawk class to wrap numbers. - */ -export class GawkNumber extends GawkBase { - /** - * Constructs the number object and makes sure the value is a number. - * @param {Number} value - The value to make a bool and set. - * @param {GawkBase|Array} [parent] - The parent gawk object to notify of changes. - * @access public - */ - constructor(value = 0, parent) { - super(value instanceof GawkUndefined ? 0 : value instanceof GawkBase ? +value.val : +value, parent); - } + return true; + }, - /** - * Returns the value. - * @returns {Number} - * @access public - */ - get val() { - return this._value; - } + deleteProperty: (target, prop) => { + if (prop === '__gawk__') { + throw new Error('"__gawk__" is read-only'); + } - /** - * Stores a new number value. - * @param {Number} value - The new number value to set. - * @access public - */ - set val(value) { - this.notify(typeof value === 'undefined' || value instanceof GawkUndefined ? 0 : value instanceof GawkBase ? +value.val : +value); - } -} + // console.log('DELETING ' + prop); -/** - * Gawk class to wrap bools. - */ -export class GawkBoolean extends GawkBase { - /** - * Constructs the boolean object and makes sure the value is a bool. - * @param {Boolean} value - The value to make a bool and set. - * @param {GawkBase|Array} [parent] - The parent gawk object to notify of changes. - * @access public - */ - constructor(value = false, parent) { - super(value instanceof Boolean ? value.valueOf() : value instanceof GawkBase ? !!value.val : !!value, parent); - } + let exists = true; + if (!isNaN(parseInt(prop))) { + const value = target[prop]; + if (value instanceof GawkArray || value instanceof GawkObject) { + value.__gawk__.parents.delete(instance); + } + exists = target[prop] !== undefined; + } - /** - * Returns the value. - * @returns {Boolean} - * @access public - */ - get val() { - return this._value; - } + const result = delete target[prop]; + if (exists && result) { + instance.__gawk__.notify(); + } - /** - * Stores a new boolean value. - * @param {Boolean} value - The new boolean value to set. - * @access public - */ - set val(value) { - this.notify(value instanceof Boolean ? value.valueOf() : value instanceof GawkBase ? !!value.val : !!value); - } -} + return result; + } + }); -/** - * Gawk class to wrap strings. - */ -export class GawkString extends GawkBase { - /** - * Constructs the string object and makes sure the value is a string. - * @param {String} value - The value to make a string and set. - * @param {GawkBase|Array} [parent] - The parent gawk object to notify of changes. - * @access public - */ - constructor(value, parent) { - if (typeof value === 'undefined' || value instanceof GawkUndefined) { - value = ''; - } - super(String(value instanceof GawkBase ? value.val : value), parent); - } + gawkify(instance); - /** - * Returns the value. - * @returns {String} - * @access public - */ - get val() { - return this._value; - } + instance.push.apply(instance, args.length === 1 && typeof args[0] === 'number' ? args : args.map(arg => gawk(arg, instance))); - /** - * Stores a new string value. - * @param {String} value - The new string value to set. - * @access public - */ - set val(value) { - if (typeof value === 'undefined' || value instanceof GawkUndefined) { - value = ''; - } - this.notify(String(value instanceof GawkBase ? value.val : value)); + return instance; } -} -/** - * Gawk class to wrap functions. - */ -export class GawkFunction extends GawkBase { /** - * Constructs the function object. - * @param {Function} value - The function to set. - * @param {GawkBase|Array} [parent] - The parent gawk object to notify of changes. + * Removes the last element of this array. + * + * @returns {*} * @access public */ - constructor(value, parent) { - if (typeof value !== 'function' && !(value instanceof GawkFunction)) { - throw new TypeError('Value must be a function'); - } - super(value instanceof GawkFunction ? value.val : value, parent); + pop() { + this.__gawk__.pause(); + const item = super.pop(); + this.__gawk__.resume(); + return item; } /** - * Returns the value. + * Removes the first element of this array. + * * @returns {*} * @access public */ - get val() { - return this._value; + shift() { + this.__gawk__.pause(); + const item = super.shift(); + this.__gawk__.resume(); + return item; } /** - * Sets the value. - * @param {Function} value - The value to set. + * Inserts or removes items from this array. + * + * @param {Number} [start] - The starting index. + * @param {Number} [deleteCount] - The number of items to delete. If not + * specified, but `start` is, then it defaults to the length of this array. + * @param {*} [...items] - Zero or more items to insert at the specified + * `start` index. + * @returns {GawkArray} * @access public */ - set val(value) { - if (typeof value !== 'function' && !(value instanceof GawkFunction)) { - throw new TypeError('Value must be a function'); + splice(start, deleteCount, ...items) { + if (start !== undefined && deleteCount === undefined) { + deleteCount = this.length - start; } - this.notify(value instanceof GawkFunction ? value.val : value); - } - - /** - * Determines if the value has changed. - * @param {{ newValue: Function, oldValue: Function }} param - New and old hashes and values. - * @returns {Boolean} - * @access private - */ - didChange({ newValue, oldValue }) { - return oldValue !== newValue; - } - - /** - * Runs the function. - * @param {...*} [args] - Zero or more arguments to pass in to the function. - * @returns {*} - * @access public - */ - exec(...args) { - return this._value.apply(this, args); - } -} -/** - * Gawk class to wrap dates. - */ -export class GawkDate extends GawkBase { - /** - * Constructs the date object by duplicating the input value. - * @param {Date} value - The date to set. - * @param {GawkBase|Array} [parent] - The parent gawk object to notify of changes. - * @access public - */ - constructor(value, parent) { - if (typeof value === 'undefined' || value instanceof GawkUndefined) { - value = new Date; + const arr = super.splice(start, deleteCount, ...items); + for (let i = start + items.length; i < this.length; i++) { + if (this[i] && typeof this[i] === 'object') { + this[i] = gawk(this[i], this); + } } - if (!(value instanceof Date) && !(value instanceof GawkDate)) { - throw new TypeError('Value must be a date'); + + for (const item of arr) { + if (item instanceof GawkArray || item instanceof GawkObject) { + item.__gawk__.parents.delete(this); + } } - super(new Date((value instanceof GawkDate ? value.val : value).getTime()), parent); - } - /** - * Returns the value. - * @returns {Date} - * @access public - */ - get val() { - return this._value; + this.__gawk__.notify(); + return arr; } /** - * Stores a new date value. - * @param {Date} value - The new date value to set. + * Adds zero or more items to the beginning of this array. + * + * @param {*} [...items] - The items to add. + * @returns {Number} The new length * @access public */ - set val(value) { - if (!(value instanceof Date) && !(value instanceof GawkDate)) { - throw new TypeError('Value must be a date'); - } - this.notify(value instanceof GawkDate ? value.val : value); + unshift(...items) { + this.__gawk__.pause(); + const len = super.unshift.apply(this, items.map(item => gawk(item, this))); + this.__gawk__.resume(); + return len; } } /** - * Gawk class to wrap arrays. + * Gawk class to wrap objects. */ -export class GawkArray extends GawkBase { +export class GawkObject { /** - * Constructs the array object by duplicating the input value. - * @param {Array} value - The value to set. - * @param {GawkBase|Array} [parent] - The parent gawk object to notify of changes. - * @access public + * Constructs a new GawkObject instance. + * + * @param {Object|GawkObject} [obj] - An object to copy into this instance. */ - constructor(value = [], parent) { - if (!Array.isArray(value) && !(value instanceof GawkArray)) { - throw new TypeError('Value must be an array'); + constructor(obj) { + if (obj === undefined || obj === null) { + obj = null; + } else if (typeof obj !== 'object' || Array.isArray(obj)) { + throw new TypeError('Expected obj to be an object or GawkObject'); } - const arr = []; - super(arr, parent); + // we create a proxy that allows us to listen for when properties change + const instance = new Proxy(this, { + set: (target, prop, value) => { + if (prop === '__gawk__') { + throw new Error('"__gawk__" is read-only'); + } - const isGawked = value instanceof GawkArray; - const len = arr.length = value.length; + // console.log('SETTING ' + prop); - if (len) { - // the initial hash is for an unpopulated array, so we need compute the - // real hash and we're going to do it as we copy each element to save - // ourselves from having to loop again - this._hash = ''; + const changed = !target.hasOwnProperty(prop) || target[prop] !== value; + delete target[prop]; + target[prop] = gawk(value, instance); + if (changed) { + target.__gawk__.notify(); + } - for (let i = 0; i < len; i++) { - arr[i] = gawk(isGawked ? value._value[i].val : value[i], this); - this._hash = hash(this._hash + arr[i]._hash); - } - } - } + return true; + }, - /** - * Internal helper that hashes any value. - * @param {Array} value - The array to hash. - * @returns {String} - * @access private - */ - hasher(value) { - return value.length ? value.reduce((prev, elem) => hash(prev + elem.hash), '') : hash([]); - } + deleteProperty: (target, prop) => { + if (prop === '__gawk__') { + throw new Error('"__gawk__" is read-only'); + } - /** - * Detaches any child gawk objects. - * @access private - */ - detachChildren() { - for (const elem of this._value) { - elem.removeParent(this); - } - } + // console.log('DELETING ' + prop); - /** - * Returns the a JSON value. - * @returns {Array} - * @access public - */ - get val() { - return this._value.map(i => i.val); - } + const value = target[prop]; + if (value instanceof GawkArray || value instanceof GawkObject) { + value.__gawk__.parents.delete(target); + } - /** - * Stores a new array value. - * @param {Array} value - The new array value to set. - * @access public - */ - set val(value) { - if (!Array.isArray(value) && !(value instanceof GawkArray)) { - throw new TypeError('Value must be an array'); - } - this.notify((value instanceof GawkArray ? value.val : value).map(elem => gawk(elem, this))); - } + const exists = target.hasOwnProperty(prop); + const result = delete target[prop]; + if (exists && result) { + instance.__gawk__.notify(); + } - /** - * Returns the gawked value at the specified index. - * @param {Number} index - The index to return. - * @returns {GawkBase} - * @access public - */ - get(index) { - return this._value[index]; - } + return result; + } + }); - /** - * Sets the value at the specified index. - * @param {Number} index - The index to insert the value - * @param {*} value - The value to set. - * @returns {GawkBase} - * @access public - */ - set(index, value) { - if (this._value[index] instanceof GawkBase) { - this._value[index].removeParent(this); - } - this._value[index] = gawk(value); - this.notify(); - return this; - } + gawkify(instance); - /** - * Returns the array length. - * @returns {Number} - * @access public - */ - get length() { - return this._value.length; - } + // if we have an object argument... + if (obj) { + // copy the props to our instance + for (const key of Object.keys(obj)) { + instance[key] = gawk(obj[key], instance); + } - /** - * Removes an item at the specified index. - * @param {Number} index - The index to remove. - * @returns {GawkBase} The removed item or `undefined` if nothing was removed. - * @access public - */ - delete(index) { - const value = this._value.splice(index, 1)[0]; - if (value instanceof GawkBase) { - value.removeParent(this); + // copy all listeners too + if (obj instanceof GawkObject) { + for (const w of obj.__gawk__.listeners) { + this.__gawk__.listeners.add(w); + } + } } - this.notify(); - return value; - } - /** - * Removes all items from the array. - * @returns {GawkArray} - * @access public - */ - clear() { - this.notify([]); - return this; - } - - /** - * Adds one or more items to the end of the array. - * @returns {Number} The new length. - * @access public - */ - push(...items) { - this._value.push.apply(this._value, items.map(i => gawk(i, this))); - this.notify(); - return this._value.length; + return instance; } +} - /** - * Removes the last item of the array and returns it. - * @returns {GawkBase} - * @access public - */ - pop() { - const result = this._value.pop(); - this.notify(); - return result; +/** + * Internal helper to perform validation and add/remove a listener. + * + * @param {String} action - Must be either "add" or "delete". + * @param {GawkArray|GawkObject} subject - The gawk object the listener is being + * added to or removed from. + * @param {Function} listener - The listener function to add or remove. + * @returns {GawkObject|GawkArray} Returns a gawked object or array depending on + * the input object. + */ +function handleWatchUnwatch(action, subject, listener) { + if (!(subject instanceof GawkArray) && !(subject instanceof GawkObject)) { + throw new TypeError('Expected source to be a GawkArray or GawkObject'); } - /** - * Adds one or more items to the beginning of the array. - * @param {...*} [items] - One or more items to add. - * @returns {Number} The new length. - * @access public - */ - unshift(...items) { - const result = this._value.unshift.apply(this._value, items.map(i => gawk(i, this))); - this.notify(); - return result; + if (typeof listener !== 'function') { + throw new TypeError('Expected listener to be a function'); } - /** - * Removes the first item of the array and returns it. - * @returns {GawkBase} - * @access public - */ - shift() { - const result = this._value.shift(); - this.notify(); - return result; - } + subject.__gawk__.listeners[action](listener); - /** - * Returns a deep copy of a portion of the array as a new `GawkArray`. - * @param {Number} [start] - The index to start the slice. - * @param {Number} [end] - The index to end the slice. - * @returns {GawkArray} - * @access public - */ - slice(start, end) { - return new GawkArray(this._value.slice(start, end).map(elem => elem.val)); - } + return subject; } /** - * Gawk class to wrap objects. + * Adds a listener to be called when the specified object or any of its + * properties/elements are changed. + * + * @param {Object|GawkObject|Array|GawkArray} subject - The object to watch. + * @param {Function} listener - The function to call when something changes. + * @returns {GawkObject|GawkArray} Returns a gawked object or array depending on + * the input object. */ -export class GawkObject extends GawkBase { - /** - * Constructs the object by duplicating the input value. - * @param {Object} value - The value to set. - * @param {GawkBase|Array} [parent] - The parent gawk object to notify of changes. - * @access public - */ - constructor(value = {}, parent) { - if (typeof value !== 'object' || value === null || Array.isArray(value)) { - throw new TypeError('Value must be an object'); - } - - const obj = {}; - super(obj, parent); - - const isGawked = value instanceof GawkObject; - if (!isGawked && value instanceof GawkBase) { - throw new TypeError('Value must be a GawkObject or non-gawk object'); - } - - const keys = Object.keys(isGawked ? value._value : value); - if (keys.length) { - // the initial hash is for an unpopulated object, so we need compute - // the real hash and we're going to do it as we copy each element to - // save ourselves from having to loop again - this._hash = ''; +gawk.watch = function watch(subject, listener) { + return handleWatchUnwatch('add', gawk(subject), listener); +}; - for (const key of keys) { - const v = obj[key] = gawk(isGawked ? value._value[key].val : value[key], this); - this._hash = hash(this._hash + v._hash); - } - } - } +/** + * Removes a listener from the specified gawked object. + * + * @param {Object|GawkObject|Array|GawkArray} subject - The object to unwatch. + * @param {Function} listener - The function to call when something changes. + * @returns {GawkObject|GawkArray} Returns a gawked object or array depending on + * the input object. + */ +gawk.unwatch = function unwatch(subject, listener) { + return handleWatchUnwatch('delete', subject, listener); +}; - /** - * Internal helper that hashes any value. - * @param {Object} value - The object to hash. - * @returns {String} - * @access private - */ - hasher(value) { - const keys = Object.keys(value); - return keys.length ? keys.reduce((prev, key) => hash(prev + value[key]._hash), '') : hash({}); +/** + * Mixes an array of objects or GawkObjects into this GawkObject. + * + * @param {Array} objs - An array of objects or GawkObjects. + * @param {Boolean} [deep=false] - When true, mixes subobjects into each other. + * @returns {GawkObject} + */ +function mix(objs, deep) { + const gobj = gawk(objs.shift()); + if (!(gobj instanceof GawkObject)) { + throw new TypeError('Expected destination to be a GawkObject'); } - /** - * Detaches any child gawk objects. - * @access private - */ - detachChildren() { - for (const key of Object.keys(this._value)) { - this._value[key].removeParent(this); - } + if (!objs.length) { + return gobj; } - /** - * Returns the a JSON value. - * @returns {Object} - * @access public - */ - get val() { - const obj = {}; - for (const key of Object.keys(this._value)) { - obj[key] = this._value[key].val; + // validate the objects are good + for (const obj of objs) { + if (!obj || typeof obj !== 'object' || Array.isArray(obj)) { + throw new TypeError('Expected source to be an object or GawkObject'); } - return obj; } - /** - * Stores a new object value. - * @param {Object} value - The new array value to set. - * @access public - */ - set val(value) { - if (typeof value !== 'object' || value === null || Array.isArray(value)) { - throw new TypeError('Value must be an object'); - } - - const isGawked = value instanceof GawkObject; - if (!isGawked && value instanceof GawkBase) { - throw new TypeError('Value must be a GawkObject or non-Gawk* object'); - } - - const newValue = {}; - for (const key of Object.keys(isGawked ? value._value : value)) { - newValue[key] = gawk(isGawked ? value._value[key].val : value[key], this); - } - this.notify(newValue); - } + // we need to detach the parent and all listeners so that they will be + // notified after everything has been merged + gobj.__gawk__.pause(); /** - * Gets the value for a specific key in the object. You may also pass in an - * array of keys to set the value for a deeply nested object value. - * @param {String|Array} key - The key or array of key segments. - * @returns {*} The gawked value. - * @access public + * Mix an object or GawkObject into a GawkObject. + * @param {GawkObject} gobj + * @param {Object} src */ - get(key) { - let obj = this; - if (Array.isArray(key)) { - for (let i = 0, len = key.length - 1; i < len; i++) { - obj = obj._value[key[i]]; - if (!(obj instanceof GawkObject)) { - return new GawkUndefined(this); - } - } - key = key.pop(); - } - if (typeof key === 'undefined') { - return this; - } else if (typeof obj._value[key] === 'undefined') { - return new GawkUndefined(this); - } - return obj._value[key]; - } + const mixer = (gobj, src) => { + for (const key of Object.keys(src)) { + const srcValue = src[key]; - /** - * Sets the value for a specific key in the object. You may also pass in an - * array of keys to set the value for a deeply nested object value. - * @param {String|Array} key - The key or array of key segments. - * @param {*} value - The value to set. - * @returns {*} The gawked value. - * @access public - */ - set(key, value) { - let obj = this; - if (Array.isArray(key)) { - for (let i = 0, len = key.length - 1; i < len; i++) { - let child = obj._value[key[i]]; - if (!(child instanceof GawkObject)) { - child = obj._value[key[i]] = new GawkObject({}, this); + if (deep && srcValue !== null && typeof srcValue === 'object' && + !Array.isArray(srcValue) && !(srcValue instanceof GawkArray) + ) { + if (!(gobj[key] instanceof GawkObject)) { + gobj[key] = gawk({}, gobj); } - obj = child; - } - key = key.pop(); - } - - if (obj._value[key] instanceof GawkBase) { - obj._value[key].removeParent(this); - } - - const oldValue = obj._value[key]; - let newValue = gawk(value, this); - - // if we had a previous gawk type and the new value is the same type, - // then just set the value instead of overwriting it so that existing - // watchers will be notified - if (oldValue && Object.getPrototypeOf(oldValue) === Object.getPrototypeOf(newValue)) { - oldValue.val = value; - newValue = oldValue; - } else { - obj._value[key] = newValue; - } - - this.notify(); - return newValue; - } - - /** - * Removes a key/value from the object. - * @param {String} key - The key to delete. - * @returns {*} The removed item. - * @access public - */ - delete(key) { - if (this._value.hasOwnProperty(key)) { - const value = this._value[key]; - if (value instanceof GawkBase) { - value.removeParent(this); + mixer(gobj[key], srcValue); + } else { + gobj[key] = gawk(srcValue, gobj); } - delete this._value[key]; - this.notify(); - return value; } - } - - /** - * Checks if a key exists. - * @returns {Boolean} - * @access public - */ - has(key) { - return this._value.hasOwnProperty(key); - } + }; - /** - * Removes all key/value pairs from the object. - * @returns {GawkObject} - * @access public - */ - clear() { - this.detachChildren(); - this.notify({}); - return this; + for (const obj of objs) { + mixer(gobj, obj); } - /** - * Returns an array of all keys. - * @returns {Array} - * @access public - */ - keys() { - return Object.keys(this._value); - } - - /** - * Mixes an array of objects or GawkObjects into this GawkObject. - * @param {Array} objs - An array of objects or GawkObjects. - * @param {Boolean} [deep=false] - When true, mixes subobjects into each other. - * @returns {GawkObject} - * @access private - */ - mix(objs, deep) { - if (!objs.length || objs.some(obj => { - return typeof obj !== 'object' || obj === null || Array.isArray(obj) || (obj instanceof GawkBase && !(obj instanceof GawkObject)); - })) { - throw new TypeError('Value must be an object or GawkObject'); - } - - // we need to detach the parent and all watchers so that they will be - // notified after everything has been merged - this.pause(); - - let changed = false; - - /** - * Mix an object or GawkObject into a GawkObject. - * @param {GawkObject} gobj - * @param {Object} src - */ - const mixer = (gobj, src) => { - for (const key of Object.keys(src)) { - const srcValue = src[key] instanceof GawkBase ? src[key]._value : src[key]; - const hashBefore = gobj._hash; - - if (deep && (typeof srcValue === 'object' && srcValue !== null && !Array.isArray(srcValue) && (!(srcValue instanceof GawkBase) || srcValue instanceof GawkObject))) { - let dest = gobj._value[key]; - if (!(dest instanceof GawkObject)) { - if (dest instanceof GawkBase) { - dest.removeParent(this); - } - dest = gobj._value[key] = new GawkObject({}, gobj); - } - mixer(dest, srcValue); - } else { - gobj.set(key, srcValue); - } + gobj.__gawk__.resume(); - if (!changed && hashBefore !== gobj._hash) { - changed = true; - } - } - }; - - for (const obj of objs) { - mixer(this, obj instanceof GawkObject ? obj._value : obj); - } - - if (changed) { - // We know a child hash changed, but because the last loop of mixer() - // set the correct object hash, notify() won't think anything changed. - // - // So we just set the hash to something that rocks and notify() will - // recompute the correct hash, detect the change, and send out the - // event notifications. - this._hash = 'gawk rocks'; - } - - this.notify(); - this.resume(); - - return this; - } + return gobj; +} - /** - * Performs a shallow merge of one or more objects and/or GawkObjects into - * this object. - * @param {...Object|GawkObject} objs - One or more objects to merge in. - * @returns {GawkObject} - * @access public - */ - merge(...objs) { - return this.mix(objs); - } +/** + * Performs a shallow merge of one or more objects or GawkObjects into the + * specified gawk object. + * + * @param {Object|GawkObject} gobj - The destination GawkObject. + * @param {...Object|GawkObject} objs - One or more objects to merge in. + * @returns {GawkObject} + */ +gawk.merge = function merge(...objs) { + return mix(objs); +}; - /** - * Performs a deep merge of another object or GawkObject into this object. - * @param {...Object|GawkObject} objs - One or more objects to deeply merge in. - * @returns {GawkObject} - * @access public - */ - mergeDeep(...objs) { - return this.mix(objs, true); - } -} +/** + * Performs a deep merge of one or more objects or GawkObjects into the + * specified gawk object. + * + * @param {Object|GawkObject} gobj - The destination GawkObject. + * @param {...Object|GawkObject} objs - One or more objects to deeply merge in. + * @returns {GawkObject} + */ +gawk.mergeDeep = function mergeDeep(...objs) { + return mix(objs, true); +}; diff --git a/test/test-array.js b/test/test-array.js index d51e9c5..2233254 100644 --- a/test/test-array.js +++ b/test/test-array.js @@ -1,122 +1,69 @@ -import { gawk, GawkArray, GawkString } from '../src/index'; +import gawk, { GawkArray, GawkObject } from '../src/index'; -describe('array', () => { - describe('gawking', () => { +describe('GawkArray', () => { + describe('gawk()', () => { it('should gawk empty array', () => { const arr = []; - const gobj = gawk(arr); - expect(gobj).to.be.an.instanceof(GawkArray); - expect(gobj.length).to.equal(0); - const val = gobj.val; - expect(val).to.be.an.array; - expect(val).to.have.lengthOf(0); - expect(val).to.deep.equal(arr); + const garr = gawk(arr); + expect(garr).to.be.an.instanceof(GawkArray); + expect(garr.length).to.equal(0); + expect(garr).to.be.an.array; + expect(garr).to.have.lengthOf(0); + expect(garr).to.deep.equal(arr); }); it('should gawk an array of mixed values', () => { const arr = ['a', 1, null, undefined, NaN, ['b', 2], function () {}]; - const gobj = gawk(arr); - expect(gobj).to.be.an.instanceof(GawkArray); - expect(gobj.length).to.equal(7); - const val = gobj.val; - expect(val).to.be.an.array; - expect(val).to.have.lengthOf(7); - expect(val).to.deep.equal(arr); + const garr = gawk(arr); + expect(garr).to.be.an.instanceof(GawkArray); + expect(garr.length).to.equal(7); + expect(garr).to.be.an.array; + expect(garr).to.have.lengthOf(7); + expect(garr).to.deep.equal(arr); }); it('should gawk an array object', () => { const arr = new Array('a', 1, null, undefined, NaN, ['b', 2], function () {}); - const gobj = gawk(arr); - expect(gobj).to.be.an.instanceof(GawkArray); - expect(gobj.length).to.equal(7); - const val = gobj.val; - expect(val).to.be.an.array; - expect(val).to.have.lengthOf(7); - expect(val).to.deep.equal(arr); + const garr = gawk(arr); + expect(garr).to.be.an.instanceof(GawkArray); + expect(garr.length).to.equal(7); + expect(garr).to.be.an.array; + expect(garr).to.have.lengthOf(7); + expect(garr).to.deep.equal(arr); }); it('should create a gawk object without an explicit value', () => { - const gobj = new GawkArray; - expect(gobj.val).to.deep.equal([]); + const garr = new GawkArray; + expect(garr).to.deep.equal([]); }); }); - describe('constructor casting', () => { - it('should throw TypeError for non-array value', () => { - expect(() => new GawkArray(null)).to.throw(TypeError); - expect(() => new GawkArray(true)).to.throw(TypeError); - expect(() => new GawkArray('foo')).to.throw(TypeError); - expect(() => new GawkArray(123)).to.throw(TypeError); - expect(() => new GawkArray(3.14)).to.throw(TypeError); - expect(() => new GawkArray(NaN)).to.throw(TypeError); - expect(() => new GawkArray({ foo: 'bar' })).to.throw(TypeError); - expect(() => new GawkArray(function () {})).to.throw(TypeError); - }); - - it('should throw TypeError for non-array gawk type', () => { - expect(() => new GawkArray(gawk(null))).to.throw(TypeError); - expect(() => new GawkArray(gawk(true))).to.throw(TypeError); - expect(() => new GawkArray(gawk('foo'))).to.throw(TypeError); - expect(() => new GawkArray(gawk(123))).to.throw(TypeError); - expect(() => new GawkArray(gawk(3.14))).to.throw(TypeError); - expect(() => new GawkArray(gawk(NaN))).to.throw(TypeError); - expect(() => new GawkArray(gawk({ foo: 'bar' }))).to.throw(TypeError); - expect(() => new GawkArray(gawk(function () {}))).to.throw(TypeError); - }); - - it('should copy another gawked array', () => { - const arr = ['a', 1, null, undefined, NaN, ['b', 2], function () {}]; - const garr = new GawkArray(gawk(arr)); - expect(garr.toJS()).to.deep.equal(arr); - }); - - it('should fail if parent is not a gawk object', () => { + describe('new GawkArray()', () => { + it('should not allow __gawk__ to be set', () => { + const gobj = new GawkArray; + expect(gobj).to.have.property('__gawk__'); expect(() => { - new GawkArray([], 'foo'); - }).to.throw(TypeError, 'Parent must be a gawk class'); + gobj.__gawk__ = 'foo'; + }).to.throw(Error); }); - }); - describe('set casting', () => { - it('should throw TypeError when setting non-array value', () => { - const arr = gawk(['a', 'b']); - expect(() => { arr.val = undefined; }).to.throw(TypeError); - expect(() => { arr.val = null; }).to.throw(TypeError); - expect(() => { arr.val = true; }).to.throw(TypeError); - expect(() => { arr.val = 'foo'; }).to.throw(TypeError); - expect(() => { arr.val = 123; }).to.throw(TypeError); - expect(() => { arr.val = 3.14; }).to.throw(TypeError); - expect(() => { arr.val = NaN; }).to.throw(TypeError); - expect(() => { arr.val = { foo: 'bar' }; }).to.throw(TypeError); - expect(() => { arr.val = function () {}; }).to.throw(TypeError); - }); - - it('should throw TypeError when setting non-array gawk type', () => { - const arr = gawk(['a', 'b']); - expect(() => { arr.val = gawk(); }).to.throw(TypeError); - expect(() => { arr.val = gawk(null); }).to.throw(TypeError); - expect(() => { arr.val = gawk(true); }).to.throw(TypeError); - expect(() => { arr.val = gawk('foo'); }).to.throw(TypeError); - expect(() => { arr.val = gawk(123); }).to.throw(TypeError); - expect(() => { arr.val = gawk(3.14); }).to.throw(TypeError); - expect(() => { arr.val = gawk(NaN); }).to.throw(TypeError); - expect(() => { arr.val = gawk({ foo: 'bar' }); }).to.throw(TypeError); - expect(() => { arr.val = gawk(function () {}); }).to.throw(TypeError); - }); - - it('should copy another gawked array', () => { - const arr = gawk(['a', 'b']); - arr.val = gawk(['c', 'd']); - expect(arr.val).to.deep.equal(['c', 'd']); + it('should not allow __gawk__ to be deleted', () => { + const gobj = new GawkArray; + expect(gobj).to.have.property('__gawk__'); + expect(() => { + delete gobj.__gawk__; + }).to.throw(Error); }); }); - describe('built-ins', () => { + describe('toString()', () => { it('should support toString()', () => { const garr = gawk(['a', null, undefined, 123, 3.14, NaN, Infinity]); expect(garr.toString()).to.equal('a,,,123,3.14,NaN,Infinity'); }); + }); + describe('valueOf()', () => { it('should support valueOf()', () => { const arr = ['a', null, undefined, 123, 3.14, NaN, Infinity]; const garr = gawk(arr); @@ -124,312 +71,279 @@ describe('array', () => { }); }); - describe('properties', () => { - it('length', () => { - it('should have correct length', () => { - expect(gawk([]).length).to.equal(0); - expect(gawk(['a']).length).to.equal(1); - expect(gawk(['a', undefined]).length).to.equal(2); - expect(gawk(['a', undefined, 'b']).length).to.equal(3); - }); + describe('length', () => { + it('should have correct length', () => { + expect(gawk([]).length).to.equal(0); + expect(gawk(['a']).length).to.equal(1); + expect(gawk(['a', undefined]).length).to.equal(2); + expect(gawk(['a', undefined, 'b']).length).to.equal(3); }); }); - describe('methods', () => { - describe('get()', () => { - it('should get the gawked value at a valid index', () => { - const garr = gawk(['a']); - const str = garr.get(0); - expect(str).to.be.an.instanceof(GawkString); - expect(str.val).to.equal('a'); - }); - - it('should get the gawked value at an invalid index', () => { - const arr = gawk(['a']); - expect(arr.get(1)).to.be.undefined; - }); - }); - - describe('set()', () => { - it('should set a value at the specified indices', () => { - const arr = gawk(['a']); - arr.set(0, 'b').set(1, 'c'); - expect(arr.val).to.deep.equal(['b', 'c']); - }); - }); - - describe('delete()', () => { - it('should delete an element at the valid positive index', () => { - const arr = gawk(['a', 'b', 'c', 'd']); - const removed = arr.delete(2); - expect(arr.length).to.equal(3); - expect(removed).to.be.instanceof(GawkString); - expect(removed.val).to.equal('c'); - expect(arr.val).to.deep.equal(['a', 'b', 'd']); - }); - - it('should delete an element at the valid negative index', () => { - const arr = gawk(['a', 'b', 'c', 'd']); - const removed = arr.delete(-2); - expect(arr.length).to.equal(3); - expect(removed).to.be.instanceof(GawkString); - expect(removed.val).to.equal('c'); - expect(arr.val).to.deep.equal(['a', 'b', 'd']); - }); - - it('should handle delete an element that does not exist', () => { - const arr = gawk(['a', 'b', 'c', 'd']); - const removed = arr.delete(10); - expect(arr.length).to.equal(4); - expect(removed).to.be.undefined; - expect(arr.val).to.deep.equal(['a', 'b', 'c', 'd']); - }); - }); - - describe('clear()', () => { - it('should delete an element at the valid positive index', () => { - const arr = gawk(['a', 'b', 'c', 'd']); - arr.clear(); - expect(arr.length).to.equal(0); - expect(arr.val).to.deep.equal([]); - }); - }); - - describe('push()', () => { - it('should add an element to the end of the array', () => { - const arr = gawk(['a']); - expect(arr.push('b')).to.equal(2); - expect(arr.length).to.equal(2); - expect(arr.val).to.deep.equal(['a', 'b']); - }); - - it('should add many elements to the end of the array', () => { - const arr = gawk(['a']); - expect(arr.push('b', 'c', 'd', 'e')).to.equal(5); - expect(arr.length).to.equal(5); - expect(arr.val).to.deep.equal(['a', 'b', 'c', 'd', 'e']); - }); - }); - - describe('pop()', () => { - it('should remove an element from the end of the array', () => { - const arr = gawk(['a', 'b']); - const str = arr.pop(); - expect(str.val).to.equal('b'); - expect(arr.length).to.equal(1); - expect(arr.val).to.deep.equal(['a']); - }); - - it('should return undefined when popping an empty array', () => { - const arr = gawk([]); - const str = arr.pop(); - expect(str).to.be.undefined; - expect(arr.length).to.equal(0); - expect(arr.val).to.deep.equal([]); - }); - }); - - describe('unshift()', () => { - it('should add an element to the beginning of the array', () => { - const arr = gawk(['a']); - expect(arr.unshift('b')).to.equal(2); - expect(arr.length).to.equal(2); - expect(arr.val).to.deep.equal(['b', 'a']); - }); - - it('should add many elements to the beginning of the array', () => { - const arr = gawk(['a']); - expect(arr.unshift('b', 'c', 'd', 'e')).to.equal(5); - expect(arr.length).to.equal(5); - expect(arr.val).to.deep.equal(['b', 'c', 'd', 'e', 'a']); - }); - }); - - describe('shift()', () => { - it('should remove an element from the beginning of the array', () => { - const arr = gawk(['a', 'b']); - const str = arr.shift(); - expect(str.val).to.equal('a'); - expect(arr.length).to.equal(1); - expect(arr.val).to.deep.equal(['b']); - }); - - it('should return undefined when shifting an empty array', () => { - const arr = gawk([]); - const str = arr.shift(); - expect(str).to.be.undefined; - expect(arr.length).to.equal(0); - expect(arr.val).to.deep.equal([]); - }); - }); - - describe('slice()', () => { - it('should slice an array with no start and no end', () => { - const orig = gawk(['a', 'b']); - const arr = orig.slice(); - expect(arr).to.be.instanceof(GawkArray); - expect(arr.length).to.equal(2); - expect(arr.hash).to.equal(orig.hash); - expect(arr.val).to.deep.equal(['a', 'b']); - expect(orig.val).to.deep.equal(['a', 'b']); - }); - - it('should slice an array with a start and no end', () => { - const orig = gawk(['a', 'b', 'c', 'd']); - const arr = orig.slice(2); - expect(arr).to.be.instanceof(GawkArray); - expect(arr.length).to.equal(2); - expect(arr.hash).not.to.equal(orig.hash); - expect(arr.val).to.deep.equal(['c', 'd']); - expect(orig.val).to.deep.equal(['a', 'b', 'c', 'd']); - }); - - it('should slice an array with a start and an end', () => { - const orig = gawk(['a', 'b', 'c', 'd']); - const arr = orig.slice(2, 3); - expect(arr).to.be.instanceof(GawkArray); - expect(arr.length).to.equal(1); - expect(arr.val).to.deep.equal(['c']); - expect(orig.val).to.deep.equal(['a', 'b', 'c', 'd']); - }); - - it('should slice an array with a negative start and no end', () => { - const orig = gawk(['a', 'b', 'c', 'd']); - const arr = orig.slice(-1); - expect(arr).to.be.instanceof(GawkArray); - expect(arr.length).to.equal(1); - expect(arr.val).to.deep.equal(['d']); - expect(orig.val).to.deep.equal(['a', 'b', 'c', 'd']); - }); - - it('should slice an array with a negative start and a negative end', () => { - const orig = gawk(['a', 'b', 'c', 'd']); - const arr = orig.slice(-2, -1); - expect(arr).to.be.instanceof(GawkArray); - expect(arr.length).to.equal(1); - expect(arr.val).to.deep.equal(['c']); - expect(orig.val).to.deep.equal(['a', 'b', 'c', 'd']); - }); + describe('get by index', () => { + it('should get the gawked value at a valid index', () => { + const garr = gawk(['a']); + const str = garr[0]; + expect(str).to.be.an.string; + expect(str).to.equal('a'); }); - }); - describe('notifications', () => { - it('should be notified when value changes', () => { - const arr = ['a', null, undefined, 123, 3.14, NaN, Infinity]; - const garr = gawk(arr); - - garr.watch(evt => { - expect(evt.source).to.equal(garr); - expect(evt.targets).to.deep.equal([ garr ]); - - const val = evt.targets[0].val; - expect(val).to.be.an.array; - expect(val).to.deep.equal(arr); - }); - - garr.val = arr; + it('should get the gawked value at an invalid index', () => { + const garr = gawk(['a']); + expect(garr[1]).to.be.undefined; }); + }); - it('should only notify if value is uniquely changed', () => { + describe('set by index', () => { + it('should set a value at the specified indices', () => { const garr = gawk(['a']); - let count = 0; - - garr.watch(evt => { - count++; - }); + garr[0] = 'b'; + garr[1] = 'c'; + expect(garr).to.deep.equal(['b', 'c']); + }); + }); - garr.val = ['b']; - expect(count).to.equal(1); + describe('concat()', () => { + it('should concat a GawkArray and an item', () => { + const garr = gawk(['a']); + const garr2 = garr.concat('b'); + expect(garr2).to.deep.equal(['a', 'b']); + }); - garr.val = ['b']; - expect(count).to.equal(1); + it('should concat a GawkArray and multiple items', () => { + const garr = gawk(['a']); + const garr2 = garr.concat('b', 'c'); + expect(garr2).to.deep.equal(['a', 'b', 'c']); }); - it('should unwatch changes', () => { + it('should concat a GawkArray and an array', () => { const garr = gawk(['a']); - let count = 0; + const garr2 = garr.concat(['b', 'c']); + expect(garr2).to.deep.equal(['a', 'b', 'c']); + }); - const unwatch = garr.watch(evt => { - count++; - }); + it('should concat two GawkArrays', () => { + const garr = gawk(['a']); + const garr2 = garr.concat(gawk(['b', 'c'])); + expect(garr2).to.deep.equal(['a', 'b', 'c']); + }); + }); - garr.val = ['b']; - garr.val = ['c']; + describe('fill()', () => { + it('should fill an array with objects', () => { + const garr = gawk(['a', 'b', 'c']); + const obj = { x: 1 }; + garr.fill(obj); + expect(garr).to.deep.equal([obj, obj, obj]); + expect(garr[0]).to.be.instanceof(GawkObject); + expect(garr[0].__gawk__.parents.has(garr)).to.be.true; + expect(garr[1]).to.be.instanceof(GawkObject); + expect(garr[1].__gawk__.parents.has(garr)).to.be.true; + expect(garr[2]).to.be.instanceof(GawkObject); + expect(garr[2].__gawk__.parents.has(garr)).to.be.true; + }); - unwatch(); + it('should fill an array with objects with start', () => { + const garr = gawk(['a', 'b', 'c']); + const obj = { x: 1 }; + garr.fill(obj, 1); + expect(garr).to.deep.equal(['a', obj, obj]); + expect(garr[1]).to.be.instanceof(GawkObject); + expect(garr[1].__gawk__.parents.has(garr)).to.be.true; + expect(garr[2]).to.be.instanceof(GawkObject); + expect(garr[2].__gawk__.parents.has(garr)).to.be.true; + }); - garr.val = ['d']; - garr.val = ['e']; + it('should fill an array with objects with start and end', () => { + const garr = gawk(['a', 'b', 'c', 'd', 'e']); + const obj = { x: 1 }; + garr.fill(obj, 1, 4); + expect(garr).to.deep.equal(['a', obj, obj, obj, 'e']); + expect(garr[1]).to.be.instanceof(GawkObject); + expect(garr[1].__gawk__.parents.has(garr)).to.be.true; + expect(garr[2]).to.be.instanceof(GawkObject); + expect(garr[2].__gawk__.parents.has(garr)).to.be.true; + expect(garr[3]).to.be.instanceof(GawkObject); + expect(garr[3].__gawk__.parents.has(garr)).to.be.true; + }); - expect(count).to.equal(2); + it('should detach existing gawk objects', () => { + const gobj = gawk({}); + const garr = gawk([gobj, 'a', 'b']); + expect(gobj.__gawk__.parents.has(garr)).to.be.true; + const obj = { x: 1 }; + garr.fill(obj); + expect(garr).to.deep.equal([obj, obj, obj]); + expect(garr[0]).to.be.instanceof(GawkObject); + expect(garr[0].__gawk__.parents.has(garr)).to.be.true; + expect(garr[1]).to.be.instanceof(GawkObject); + expect(garr[1].__gawk__.parents.has(garr)).to.be.true; + expect(garr[2]).to.be.instanceof(GawkObject); + expect(garr[2].__gawk__.parents.has(garr)).to.be.true; + expect(gobj.__gawk__.parents.has(garr)).to.be.false; }); + }); - it('should be notified when array changes', () => { - let count = 0; - const gobj = gawk(['a', 'b']); + describe('pop()', () => { + it('should remove an element from the end of the array', () => { + const garr = gawk(['a', 'b']); + const str = garr.pop(); + expect(str).to.equal('b'); + expect(garr.length).to.equal(1); + expect(garr).to.deep.equal(['a']); + }); - gobj.watch(evt => { - count++; - }); + it('should return undefined when popping an empty array', () => { + const garr = gawk([]); + const str = garr.pop(); + expect(str).to.be.undefined; + expect(garr.length).to.equal(0); + }); - gobj.push('c'); - gobj.pop(); - gobj.unshift('d'); - gobj.shift(); + it('should detach popped gawk object', () => { + const gobj = gawk({}); + const garr = gawk([gobj]); + expect(gobj.__gawk__.parents.has(garr)).to.be.true; + const gobj2 = garr.pop(); + expect(gobj2).to.equal(gobj); + expect(gobj.__gawk__.parents.has(garr)).to.be.false; + }); + }); - expect(count).to.equal(4); + describe('push()', () => { + it('should return 0 if not adding any elements', () => { + const garr = new GawkArray; + const n = garr.push(); + expect(n).to.equal(0); + expect(garr).to.have.lengthOf(0); }); - it('should be notified when deeply nested children change', () => { - let count1 = 0; - let count2 = 0; - let count3 = 0; + it('should add a new element', () => { + const garr = new GawkArray; + let n = garr.push('a'); + expect(n).to.equal(1); + expect(garr).to.have.lengthOf(1); + expect(garr).to.deep.equal(['a']); + + n = garr.push('b'); + expect(n).to.equal(2); + expect(garr).to.have.lengthOf(2); + expect(garr).to.deep.equal(['a', 'b']); + }); - const arr1 = gawk([]); - const arr2 = gawk([]); - const arr3 = gawk([]); + it('should add multiple new elements', () => { + const garr = new GawkArray; + let n = garr.push('a', { foo: 'bar' }, 'c'); + expect(n).to.equal(3); + expect(garr).to.have.lengthOf(3); + expect(garr).to.deep.equal(['a', { foo: 'bar' }, 'c']); + expect(garr[1].__gawk__.parents.has(garr)).to.be.true; + }); + }); - arr1.push(arr2); - arr2.push(arr3); + describe('shift()', () => { + it('should remove an element from the front of the array', () => { + const garr = gawk(['a', 'b']); + const str = garr.shift(); + expect(str).to.equal('a'); + expect(garr.length).to.equal(1); + expect(garr).to.deep.equal(['b']); + }); - expect(arr1._parents).to.have.lengthOf(0); - expect(arr2._parents).to.have.lengthOf(1); - expect(arr2._parents[0]).to.equal(arr1); - expect(arr3._parents).to.have.lengthOf(1); - expect(arr3._parents[0]).to.equal(arr2); + it('should return undefined when shifting an empty array', () => { + const garr = gawk([]); + const str = garr.shift(); + expect(str).to.be.undefined; + expect(garr.length).to.equal(0); + }); - arr1.watch(evt => { - count1++; - expect(evt.source).to.equal(arr1); - expect(evt.targets).to.deep.equal([ arr3 ]); - }); + it('should detach shifted gawk object', () => { + const gobj = gawk({}); + const garr = gawk([gobj]); + expect(gobj.__gawk__.parents.has(garr)).to.be.true; + const gobj2 = garr.shift(); + expect(gobj2).to.equal(gobj); + expect(gobj.__gawk__.parents.has(garr)).to.be.false; + }); + }); - arr2.watch(evt => { - count2++; - expect(evt.source).to.equal(arr2); - expect(evt.targets).to.deep.equal([ arr3 ]); - }); + describe('splice()', () => { + it('should do nothing if no args', () => { + const garr = new GawkArray('a', 'b', 'c'); + const arr = garr.splice(); + expect(arr).to.have.lengthOf(0); + expect(garr).to.deep.equal(['a', 'b', 'c']); + }); - arr3.watch(evt => { - count3++; - expect(evt.source).to.equal(arr3); - expect(evt.targets).to.deep.equal([ arr3 ]); - }); + it('should remove elements after the start index', () => { + const garr = new GawkArray('a', 'b', 'c'); + const arr = garr.splice(1); + expect(arr).to.have.lengthOf(2); + expect(arr).to.deep.equal(['b', 'c']); + expect(garr).to.deep.equal(['a']); + }); - arr3.push('foo'); + it('should detach and remove gawk objects after the start index', () => { + const garr = new GawkArray({ a: 1 }, { b: 2 }, { c: 3 }); + expect(garr[0].__gawk__.parents.has(garr)).to.be.true; + expect(garr[1].__gawk__.parents.has(garr)).to.be.true; + expect(garr[2].__gawk__.parents.has(garr)).to.be.true; + + const arr = garr.splice(1); + expect(arr).to.have.lengthOf(2); + expect(arr).to.deep.equal([ { b: 2 }, { c: 3 } ]); + expect(garr).to.deep.equal([ { a: 1 } ]); + expect(garr[0].__gawk__.parents.has(garr)).to.be.true; + expect(arr[0].__gawk__.parents.has(garr)).to.be.false; + expect(arr[0].__gawk__.parents.has(garr)).to.be.false; + }); - expect(count1).to.equal(1); - expect(count2).to.equal(1); - expect(count3).to.equal(1); + it('should remove elements and add elements', () => { + const garr = new GawkArray({ a: 1 }, { b: 2 }, { c: 3 }); + expect(garr[0].__gawk__.parents.has(garr)).to.be.true; + expect(garr[1].__gawk__.parents.has(garr)).to.be.true; + expect(garr[2].__gawk__.parents.has(garr)).to.be.true; + + const arr = garr.splice(1, 1, { d: 4 }, { e: 5 }); + expect(arr).to.have.lengthOf(1); + expect(arr).to.deep.equal([ { b: 2 } ]); + expect(garr).to.deep.equal([ { a: 1 }, { d: 4 }, { e: 5 }, { c: 3 } ]); + expect(garr[0].__gawk__.parents.has(garr)).to.be.true; + expect(garr[1].__gawk__.parents.has(garr)).to.be.true; + expect(garr[2].__gawk__.parents.has(garr)).to.be.true; + expect(garr[3].__gawk__.parents.has(garr)).to.be.true; + expect(arr[0].__gawk__.parents.has(garr)).to.be.false; + }); + }); - expect(arr3.length).to.equal(1); - expect(arr3.val).to.deep.equal(['foo']); + describe('unshift()', () => { + it('should return 0 if not adding any elements', () => { + const garr = new GawkArray; + const n = garr.unshift(); + expect(n).to.equal(0); + expect(garr).to.have.lengthOf(0); + }); - expect(arr2.length).to.equal(1); - expect(arr2.val).to.deep.equal([['foo']]); + it('should add a new element', () => { + const garr = new GawkArray; + let n = garr.unshift('a'); + expect(n).to.equal(1); + expect(garr).to.have.lengthOf(1); + expect(garr).to.deep.equal(['a']); + + n = garr.unshift('b'); + expect(n).to.equal(2); + expect(garr).to.have.lengthOf(2); + expect(garr).to.deep.equal(['b', 'a']); + }); - expect(arr1.length).to.equal(1); - expect(arr1.val).to.deep.equal([[['foo']]]); + it('should add multiple new elements', () => { + const garr = new GawkArray; + let n = garr.unshift('a', { foo: 'bar' }, 'c'); + expect(n).to.equal(3); + expect(garr).to.have.lengthOf(3); + expect(garr).to.deep.equal(['a', { foo: 'bar' }, 'c']); + expect(garr[1].__gawk__.parents.has(garr)).to.be.true; }); }); }); diff --git a/test/test-boolean.js b/test/test-boolean.js deleted file mode 100644 index 5a1f524..0000000 --- a/test/test-boolean.js +++ /dev/null @@ -1,174 +0,0 @@ -import { gawk, GawkBoolean } from '../src/index'; - -describe('boolean', () => { - describe('gawking', () => { - it('should gawk true', () => { - const bool = gawk(true); - expect(bool).to.be.an.instanceof(GawkBoolean); - expect(bool.val).to.be.true; - }); - - it('should gawk false', () => { - const bool = gawk(false); - expect(bool).to.be.an.instanceof(GawkBoolean); - expect(bool.val).to.be.false; - }); - - it('should gawk true from Boolean object', () => { - const bool = gawk(new Boolean(true)); - expect(bool).to.be.an.instanceof(GawkBoolean); - expect(bool.val).to.be.true; - }); - - it('should gawk false from Boolean object', () => { - const bool = gawk(new Boolean(false)); - expect(bool).to.be.an.instanceof(GawkBoolean); - expect(bool.val).to.be.false; - }); - }); - - describe('constructor casting', () => { - it('should cast non-boolean value', () => { - expect(new GawkBoolean().val).to.be.false; - expect(new GawkBoolean(null).val).to.be.false; - expect(new GawkBoolean('foo').val).to.be.true; - expect(new GawkBoolean(123).val).to.be.true; - expect(new GawkBoolean(3.14).val).to.be.true; - expect(new GawkBoolean(NaN).val).to.be.false; - expect(new GawkBoolean(['a', 'b']).val).to.be.true; - expect(new GawkBoolean({ foo: 'bar' }).val).to.be.true; - expect(new GawkBoolean(function () {}).val).to.be.true; - }); - - it('should cast another gawk type', () => { - expect(new GawkBoolean(gawk()).val).to.be.false; - expect(new GawkBoolean(gawk(null)).val).to.be.false; - expect(new GawkBoolean(gawk('foo')).val).to.be.true; - expect(new GawkBoolean(gawk(123)).val).to.be.true; - expect(new GawkBoolean(gawk(3.14)).val).to.be.true; - expect(new GawkBoolean(gawk(NaN)).val).to.be.false; - expect(new GawkBoolean(gawk(['a', 'b'])).val).to.be.true; - expect(new GawkBoolean(gawk({ foo: 'bar' })).val).to.be.true; - expect(new GawkBoolean(gawk(function () {})).val).to.be.true; - }); - - it('should copy another gawked boolean', () => { - const bool = new GawkBoolean(gawk(true)); - expect(bool.val).to.be.true; - }); - - it('should fail if parent is not a gawk object', () => { - expect(() => { - new GawkBoolean(true, 'foo'); - }).to.throw(TypeError, 'Parent must be a gawk class'); - }); - }); - - describe('set casting', () => { - it('should cast and set non-boolean value', () => { - const bool = gawk(true); - bool.val = undefined; expect(bool.val).to.be.false; - bool.val = null; expect(bool.val).to.be.false; - bool.val = 'foo'; expect(bool.val).to.be.true; - bool.val = 123; expect(bool.val).to.be.true; - bool.val = 3.14; expect(bool.val).to.be.true; - bool.val = NaN; expect(bool.val).to.be.false; - bool.val = ['a', 'b']; expect(bool.val).to.be.true; - bool.val = { foo: 'bar' }; expect(bool.val).to.be.true; - bool.val = function () {}; expect(bool.val).to.be.true; - }); - - it('should cast and set another gawk type', () => { - const bool = gawk(true); - bool.val = gawk(); expect(bool.val).to.be.false; - bool.val = gawk(null); expect(bool.val).to.be.false; - bool.val = gawk('foo'); expect(bool.val).to.be.true; - bool.val = gawk(123); expect(bool.val).to.be.true; - bool.val = gawk(3.14); expect(bool.val).to.be.true; - bool.val = gawk(NaN); expect(bool.val).to.be.false; - bool.val = gawk(['a', 'b']); expect(bool.val).to.be.true; - bool.val = gawk({ foo: 'bar' }); expect(bool.val).to.be.true; - bool.val = gawk(function () {}); expect(bool.val).to.be.true; - }); - - it('should copy another gawked boolean', () => { - const bool = gawk(true); - bool.val = gawk(false); - expect(bool.val).to.be.false; - }); - - it('should set from Boolean object', () => { - const bool = gawk(true); - bool.val = new Boolean(false); - expect(bool.val).to.be.false; - }); - }); - - describe('built-ins', () => { - it('should support toString() with true value', () => { - expect(gawk(true).toString()).to.equal('true'); - }); - - it('should support toString() with false value', () => { - expect(gawk(false).toString()).to.equal('false'); - }); - - it('should support valueOf() with true value', () => { - expect(gawk(true).valueOf()).to.be.true; - }); - - it('should support valueOf() with false value', () => { - expect(gawk(false).valueOf()).to.be.false; - }); - }); - - describe('notifications', () => { - it('should be notified when value changes', () => { - const bool = gawk(true); - - bool.watch(evt => { - expect(evt.targets[0]).to.equal(bool); - - const val = evt.targets[0].val; - expect(val).to.be.a.boolean; - expect(val).to.equal(false); - }); - - bool.val = false; - }); - - it('should only notify if value is uniquely changed', () => { - const bool = gawk(true); - let count = 0; - - bool.watch(evt => { - count++; - }); - - bool.val = false; - expect(count).to.equal(1); - - bool.val = false; - expect(count).to.equal(1); - }); - - it('should unwatch changes', () => { - const bool = gawk(true); - let count = 0; - - const unwatch = bool.watch(evt => { - count++; - }); - - bool.val = false; - bool.val = true; - - unwatch(); - - bool.val = false; - bool.val = true; - - expect(count).to.equal(2); - }); - }); -}); diff --git a/test/test-date.js b/test/test-date.js deleted file mode 100644 index e4a3c8e..0000000 --- a/test/test-date.js +++ /dev/null @@ -1,164 +0,0 @@ -import { gawk, GawkDate } from '../src/index'; - -describe('date', () => { - describe('gawking', () => { - it('should gawk a date', () => { - const date = new Date; - const gobj = gawk(date); - expect(gobj).to.be.an.instanceof(GawkDate); - const val = gobj.val; - expect(val).to.be.a.date; - expect(val.getTime()).to.equal(date.getTime()); - expect(val.toString()).to.equal(date.toString()); - }); - }); - - describe('constructor casting', () => { - it('should throw TypeError for non-date value', () => { - expect(() => new GawkDate(null)).to.throw(TypeError); - expect(() => new GawkDate(true)).to.throw(TypeError); - expect(() => new GawkDate('foo')).to.throw(TypeError); - expect(() => new GawkDate(123)).to.throw(TypeError); - expect(() => new GawkDate(3.14)).to.throw(TypeError); - expect(() => new GawkDate(NaN)).to.throw(TypeError); - expect(() => new GawkDate(['a', 'b'])).to.throw(TypeError); - expect(() => new GawkDate({ foo: 'bar' })).to.throw(TypeError); - expect(() => new GawkDate(function () {})).to.throw(TypeError); - }); - - it('should throw TypeError for non-date gawk type', () => { - expect(() => new GawkDate(gawk(null))).to.throw(TypeError); - expect(() => new GawkDate(gawk(true))).to.throw(TypeError); - expect(() => new GawkDate(gawk('foo'))).to.throw(TypeError); - expect(() => new GawkDate(gawk(123))).to.throw(TypeError); - expect(() => new GawkDate(gawk(3.14))).to.throw(TypeError); - expect(() => new GawkDate(gawk(NaN))).to.throw(TypeError); - expect(() => new GawkDate(gawk(['a', 'b']))).to.throw(TypeError); - expect(() => new GawkDate(gawk({ foo: 'bar' }))).to.throw(TypeError); - expect(() => new GawkDate(gawk(function () {}))).to.throw(TypeError); - }); - - it('should copy another gawked date', () => { - const date = new Date; - const gdate = new GawkDate(gawk(date)); - expect(gdate.val.getTime()).to.equal(date.getTime()); - expect(gdate.val).to.not.equal(date); - }); - - it('should create a gawk object without an explicit value', () => { - const gobj = new GawkDate; - expect(gobj.val).to.be.a.date; - }); - - it('should fail if parent is not a gawk object', () => { - expect(() => { - new GawkDate(new Date, 'foo'); - }).to.throw(TypeError, 'Parent must be a gawk class'); - }); - }); - - describe('set casting', () => { - it('should throw TypeError when setting non-date value', () => { - const date = gawk(new Date); - expect(() => { date.val = undefined; }).to.throw(TypeError); - expect(() => { date.val = null; }).to.throw(TypeError); - expect(() => { date.val = true; }).to.throw(TypeError); - expect(() => { date.val = 'foo'; }).to.throw(TypeError); - expect(() => { date.val = 123; }).to.throw(TypeError); - expect(() => { date.val = 3.14; }).to.throw(TypeError); - expect(() => { date.val = NaN; }).to.throw(TypeError); - expect(() => { date.val = ['a', 'b']; }).to.throw(TypeError); - expect(() => { date.val = { foo: 'bar' }; }).to.throw(TypeError); - expect(() => { date.val = function () {}; }).to.throw(TypeError); - }); - - it('should throw TypeError when setting non-date gawk type', () => { - const date = gawk(new Date); - expect(() => { date.val = gawk(); }).to.throw(TypeError); - expect(() => { date.val = gawk(null); }).to.throw(TypeError); - expect(() => { date.val = gawk(true); }).to.throw(TypeError); - expect(() => { date.val = gawk('foo'); }).to.throw(TypeError); - expect(() => { date.val = gawk(123); }).to.throw(TypeError); - expect(() => { date.val = gawk(3.14); }).to.throw(TypeError); - expect(() => { date.val = gawk(NaN); }).to.throw(TypeError); - expect(() => { date.val = gawk(['a', 'b']); }).to.throw(TypeError); - expect(() => { date.val = gawk({ foo: 'bar' }); }).to.throw(TypeError); - expect(() => { date.val = gawk(function () {}); }).to.throw(TypeError); - }); - - it('should copy another gawked date', () => { - const date = gawk(new Date); - const now = Date.now(); - date.val = gawk(new Date(now)); - expect(date.val.getTime()).to.equal(now); - }); - }); - - describe('built-ins', () => { - it('should support toString()', () => { - const date = new Date; - const gobj = gawk(date); - expect(gobj.toString()).to.equal(date.toString()); - }); - - it('should support valueOf()', () => { - const date = new Date; - const gobj = gawk(date); - expect(gobj.valueOf()).to.equal(date.valueOf()); - }); - }); - - describe('notifications', () => { - it('should be notified when value changes', () => { - const date = gawk(new Date); - const now = new Date; - - date.watch(evt => { - expect(evt.targets).to.deep.equal([ date ]); - - const val = evt.targets[0].val; - expect(val).to.be.a.date; - expect(val).to.equal(now); - }); - - date.val = now; - }); - - it('should only notify if value is uniquely changed', () => { - const date = gawk(new Date); - let count = 0; - - date.watch(evt => { - count++; - }); - - const now = Date.now() + 1e5; - - date.val = new Date(now); - expect(count).to.equal(1); - - date.val = new Date(now); - expect(count).to.equal(1); - }); - - it('should unwatch changes', () => { - let now = Date.now(); - const date = gawk(new Date(now)); - let count = 0; - - const unwatch = date.watch(evt => { - count++; - }); - - date.val = new Date(++now); - date.val = new Date(++now); - - unwatch(); - - date.val = new Date(++now); - date.val = new Date(++now); - - expect(count).to.equal(2); - }); - }); -}); diff --git a/test/test-function.js b/test/test-function.js deleted file mode 100644 index 4c863da..0000000 --- a/test/test-function.js +++ /dev/null @@ -1,194 +0,0 @@ -import { gawk, GawkFunction } from '../src/index'; - -describe('function', () => { - describe('gawking', () => { - it('should gawk a function', () => { - const fn = gawk(function () {}); - expect(fn).to.be.an.instanceof(GawkFunction); - expect(fn.val).to.be.a.function; - }); - - it('should gawk an arrow function', () => { - const fn = gawk(() => {}); - expect(fn).to.be.an.instanceof(GawkFunction); - expect(fn.val).to.be.a.function; - }); - - it('should gawk function from Function object', () => { - const fn = gawk(new Function('return 1')); - expect(fn).to.be.an.instanceof(GawkFunction); - expect(fn.val).to.be.a.function; - }); - }); - - describe('constructor casting', () => { - it('should throw TypeError for non-function value', () => { - expect(() => new GawkFunction).to.throw(TypeError); - expect(() => new GawkFunction(null)).to.throw(TypeError); - expect(() => new GawkFunction(true)).to.throw(TypeError); - expect(() => new GawkFunction('foo')).to.throw(TypeError); - expect(() => new GawkFunction(123)).to.throw(TypeError); - expect(() => new GawkFunction(3.14)).to.throw(TypeError); - expect(() => new GawkFunction(NaN)).to.throw(TypeError); - expect(() => new GawkFunction(['a', 'b'])).to.throw(TypeError); - expect(() => new GawkFunction({ foo: 'bar' })).to.throw(TypeError); - }); - - it('should throw TypeError for non-function gawk type', () => { - expect(() => new GawkFunction(gawk())).to.throw(TypeError); - expect(() => new GawkFunction(gawk(null))).to.throw(TypeError); - expect(() => new GawkFunction(gawk(true))).to.throw(TypeError); - expect(() => new GawkFunction(gawk('foo'))).to.throw(TypeError); - expect(() => new GawkFunction(gawk(123))).to.throw(TypeError); - expect(() => new GawkFunction(gawk(3.14))).to.throw(TypeError); - expect(() => new GawkFunction(gawk(NaN))).to.throw(TypeError); - expect(() => new GawkFunction(gawk(['a', 'b']))).to.throw(TypeError); - expect(() => new GawkFunction(gawk({ foo: 'bar' }))).to.throw(TypeError); - }); - - it('should copy another gawked function', () => { - const fn = new GawkFunction(gawk(function () {})); - expect(fn.val).to.be.a.function; - }); - - it('should fail if parent is not a gawk object', () => { - expect(() => { - new GawkFunction(function () {}, 'foo'); - }).to.throw(TypeError, 'Parent must be a gawk class'); - }); - }); - - describe('set casting', () => { - it('should throw TypeError when setting non-function value', () => { - const fn = gawk(function () {}); - expect(() => { fn.val = undefined; }).to.throw(TypeError); - expect(() => { fn.val = null; }).to.throw(TypeError); - expect(() => { fn.val = true; }).to.throw(TypeError); - expect(() => { fn.val = 'foo'; }).to.throw(TypeError); - expect(() => { fn.val = 123; }).to.throw(TypeError); - expect(() => { fn.val = 3.14; }).to.throw(TypeError); - expect(() => { fn.val = NaN; }).to.throw(TypeError); - expect(() => { fn.val = ['a', 'b']; }).to.throw(TypeError); - expect(() => { fn.val = { foo: 'bar' }; }).to.throw(TypeError); - }); - - it('should throw TypeError when setting non-function gawk type', () => { - const fn = gawk(function () {}); - expect(() => { fn.val = gawk(); }).to.throw(TypeError); - expect(() => { fn.val = gawk(null); }).to.throw(TypeError); - expect(() => { fn.val = gawk(true); }).to.throw(TypeError); - expect(() => { fn.val = gawk('foo'); }).to.throw(TypeError); - expect(() => { fn.val = gawk(123); }).to.throw(TypeError); - expect(() => { fn.val = gawk(3.14); }).to.throw(TypeError); - expect(() => { fn.val = gawk(NaN); }).to.throw(TypeError); - expect(() => { fn.val = gawk(['a', 'b']); }).to.throw(TypeError); - expect(() => { fn.val = gawk({ foo: 'bar' }); }).to.throw(TypeError); - }); - - it('should copy another gawked function', () => { - function foo() {} - function bar() {} - const fn = gawk(foo); - fn.val = gawk(bar); - expect(fn.val).to.equal(bar); - }); - }); - - describe('built-ins', () => { - it('should support toString()', () => { - function foo() {} - expect(gawk(foo).toString()).to.equal(foo.toString()); - }); - - it('should support valueOf()', () => { - function foo() {} - expect(gawk(foo).valueOf()).to.equal(foo); - }); - }); - - describe('methods', () => { - describe('exec()', () => { - it('should execute the function', () => { - let count = 0; - const fn = gawk((x, y) => { - count++; - return x + y; - }); - expect(fn).to.be.an.instanceof(GawkFunction); - - expect(fn.exec(3, 7)).to.equal(10); - - const fn2 = fn.val; - expect(fn2(3, 7)).to.equal(10); - - expect(count).to.equal(2); - }); - - it('should execute another gawked function', () => { - let count = 0; - const fn = gawk((x, y) => { - count++; - return x + y; - }); - expect(fn).to.be.an.instanceof(GawkFunction); - - const fn2 = new GawkFunction(fn); - expect(fn2.exec(3, 7)).to.equal(10); - - expect(count).to.equal(1); - }); - }); - }); - - describe('notifications', () => { - it('should be notified when value changes', () => { - function foo() {} - const fn = gawk(function () {}); - - fn.watch(evt => { - expect(evt.targets[0]).to.equal(fn); - - const val = evt.targets[0].val; - expect(val).to.be.a.function; - expect(val).to.equal(foo); - }); - - fn.val = foo; - }); - - it('should only notify if value is uniquely changed', () => { - function foo() {} - const fn = gawk(function () {}); - let count = 0; - - fn.watch(evt => { - count++; - }); - - fn.val = foo; - expect(count).to.equal(1); - - fn.val = foo; - expect(count).to.equal(1); - }); - - it('should unwatch changes', () => { - const fn = gawk(function () {}); - let count = 0; - - const unwatch = fn.watch(evt => { - count++; - }); - - fn.val = function () {}; - fn.val = function () {}; - - unwatch(); - - fn.val = function () {}; - fn.val = function () {}; - - expect(count).to.equal(2); - }); - }); -}); diff --git a/test/test-misc.js b/test/test-misc.js deleted file mode 100644 index 605b634..0000000 --- a/test/test-misc.js +++ /dev/null @@ -1,49 +0,0 @@ -import { gawk } from '../src/index'; - -describe('misc', () => { - it('should fail to gawk a symbol', () => { - expect(() => { - gawk(Symbol()); - }).to.throw(TypeError); - }); - - it('should fail to gawk if parent is not a gawk object', () => { - expect(() => { - gawk('foo', 'bar'); - }).to.throw(TypeError); - }); - - it('should fail to watch with non-function listener', () => { - expect(() => { - gawk('foo').watch('bar'); - }).to.throw(TypeError); - }); - - it('should return value as JS', () => { - expect(gawk().toJS()).to.be.undefined; - expect(gawk(null).toJS()).to.be.null; - expect(gawk(true).toJS()).to.equal(true); - expect(gawk('foo').toJS()).to.equal('foo'); - expect(gawk(123).toJS()).to.equal(123); - expect(gawk(3.14).toJS()).to.equal(3.14); - expect(gawk(NaN).toJS()).to.be.NaN; - expect(gawk(['a', 'b']).toJS()).to.deep.equal(['a', 'b']); - expect(gawk({ foo: 'bar' }).toJS()).to.deep.equal({ foo: 'bar' }); - function foo() {} - expect(gawk(foo).toJS()).to.equal(foo); - }); - - it('should return value as a JSON string', () => { - expect(gawk().toJSON()).to.be.undefined; - expect(gawk(null).toJSON()).to.equal('null'); - expect(gawk(true).toJSON()).to.equal('true'); - expect(gawk('foo').toJSON()).to.equal('"foo"'); - expect(gawk(123).toJSON()).to.equal('123'); - expect(gawk(3.14).toJSON()).to.equal('3.14'); - expect(gawk(NaN).toJSON()).to.equal('null'); - expect(gawk(['a', 'b']).toJSON()).to.equal('["a","b"]'); - expect(gawk({ foo: 'bar' }).toJSON()).to.equal('{"foo":"bar"}'); - expect(gawk({ foo: 'bar' }).toJSON(true)).to.equal('{\n "foo": "bar"\n}'); - expect(gawk(function () {}).toJSON()).to.be.undefined; - }); -}); diff --git a/test/test-null.js b/test/test-null.js deleted file mode 100644 index e2b7d19..0000000 --- a/test/test-null.js +++ /dev/null @@ -1,113 +0,0 @@ -import { gawk, GawkNull } from '../src/index'; - -describe('null', () => { - describe('gawking', () => { - it('should gawk null', () => { - const nil = gawk(null); - expect(nil).to.be.an.instanceof(GawkNull); - expect(nil.val).to.be.null; - }); - - it('should gawk explicit null', () => { - const nil = gawk(null); - expect(nil).to.be.an.instanceof(GawkNull); - expect(nil.val).to.be.null; - }); - }); - - describe('constructor casting', () => { - it('should cast non-null value', () => { - expect(new GawkNull().val).to.be.null; - expect(new GawkNull('foo').val).to.be.null; - expect(new GawkNull(true).val).to.be.null; - expect(new GawkNull(123).val).to.be.null; - expect(new GawkNull(3.14).val).to.be.null; - expect(new GawkNull(NaN).val).to.be.null; - expect(new GawkNull(['a', 'b']).val).to.be.null; - expect(new GawkNull({ foo: 'bar' }).val).to.be.null; - expect(new GawkNull(function () {}).val).to.be.null; - }); - - it('should cast another gawk type', () => { - expect(new GawkNull(gawk()).val).to.be.null; - expect(new GawkNull(gawk('foo')).val).to.be.null; - expect(new GawkNull(gawk(true)).val).to.be.null; - expect(new GawkNull(gawk(123)).val).to.be.null; - expect(new GawkNull(gawk(3.14)).val).to.be.null; - expect(new GawkNull(gawk(NaN)).val).to.be.null; - expect(new GawkNull(gawk(['a', 'b'])).val).to.be.null; - expect(new GawkNull(gawk({ foo: 'bar' })).val).to.be.null; - expect(new GawkNull(gawk(function () {})).val).to.be.null; - }); - - it('should copy another gawked null', () => { - const nil = new GawkNull(gawk(null)); - expect(nil.val).to.be.null; - }); - - it('should fail if parent is not a gawk object', () => { - expect(() => { - new GawkNull(null, 'foo'); - }).to.throw(TypeError, 'Parent must be a gawk class'); - }); - }); - - describe('set casting', () => { - it('should cast and set non-null value', () => { - const nil = gawk(null); - nil.val = undefined; expect(nil.val).to.be.null; - nil.val = 'foo'; expect(nil.val).to.be.null; - nil.val = true; expect(nil.val).to.be.null; - nil.val = 123; expect(nil.val).to.be.null; - nil.val = 3.14; expect(nil.val).to.be.null; - nil.val = NaN; expect(nil.val).to.be.null; - nil.val = ['a', 'b']; expect(nil.val).to.be.null; - nil.val = { foo: 'bar' }; expect(nil.val).to.be.null; - nil.val = function () {}; expect(nil.val).to.be.null; - }); - - it('should cast and set another gawk type', () => { - const nil = gawk(null); - nil.val = gawk(); expect(nil.val).to.be.null; - nil.val = gawk('foo'); expect(nil.val).to.be.null; - nil.val = gawk(true); expect(nil.val).to.be.null; - nil.val = gawk(123); expect(nil.val).to.be.null; - nil.val = gawk(3.14); expect(nil.val).to.be.null; - nil.val = gawk(NaN); expect(nil.val).to.be.null; - nil.val = gawk(['a', 'b']); expect(nil.val).to.be.null; - nil.val = gawk({ foo: 'bar' }); expect(nil.val).to.be.null; - nil.val = gawk(function () {}); expect(nil.val).to.be.null; - }); - - it('should copy another gawked null', () => { - const nil = gawk(null); - nil.val = gawk(null); - expect(nil.val).to.be.null; - }); - }); - - describe('built-ins', () => { - it('should support toString()', () => { - expect(gawk(null).toString()).to.equal(''); - }); - - it('should support valueOf()', () => { - expect(gawk(null).valueOf()).to.be.null; - }); - }); - - describe('notifications', () => { - it('should not send notifications', () => { - const nil = gawk(null); - let count = 0; - - nil.watch(evt => { - count++; - }); - - nil.val = 'bar'; - - expect(count).to.equal(0); - }); - }); -}); diff --git a/test/test-number.js b/test/test-number.js deleted file mode 100644 index 1c8ab68..0000000 --- a/test/test-number.js +++ /dev/null @@ -1,200 +0,0 @@ -import { gawk, GawkNumber } from '../src/index'; - -describe('number', () => { - describe('gawking', () => { - it('should gawk zero', () => { - const num = gawk(0); - expect(num).to.be.an.instanceof(GawkNumber); - expect(num.val).to.equal(0); - }); - - it('should gawk negative number', () => { - const num = gawk(-1); - expect(num).to.be.an.instanceof(GawkNumber); - expect(num.val).to.equal(-1); - }); - - it('should gawk positive number', () => { - const num = gawk(1); - expect(num).to.be.an.instanceof(GawkNumber); - expect(num.val).to.equal(1); - }); - - it('should gawk positive infinity', () => { - const num = gawk(Infinity); - expect(num).to.be.an.instanceof(GawkNumber); - expect(num.val).to.equal(Infinity); - }); - - it('should gawk negative infinity', () => { - const num = gawk(-Infinity); - expect(num).to.be.an.instanceof(GawkNumber); - expect(num.val).to.equal(-Infinity); - }); - - it('should gawk NaN', () => { - const num = gawk(NaN); - expect(num).to.be.an.instanceof(GawkNumber); - expect(num.val).to.be.NaN; - }); - - it('should gawk decimal', () => { - const num = gawk(3.14); - expect(num).to.be.an.instanceof(GawkNumber); - expect(num.val).to.equal(3.14); - }); - - it('should gawk zero from Number object', () => { - const num = gawk(new Number(0)); - expect(num).to.be.an.instanceof(GawkNumber); - expect(num.val).to.equal(0); - }); - - it('should gawk positive integer from Number object', () => { - const num = gawk(new Number(1)); - expect(num).to.be.an.instanceof(GawkNumber); - expect(num.val).to.equal(1); - }); - - it('should gawk negative integer from Number object', () => { - const num = gawk(new Number(-1)); - expect(num).to.be.an.instanceof(GawkNumber); - expect(num.val).to.equal(-1); - }); - }); - - describe('constructor casting', () => { - it('should cast non-number value', () => { - expect(new GawkNumber().val).to.be.equal(0); - expect(new GawkNumber(null).val).to.equal(0); - expect(new GawkNumber(true).val).to.equal(1); - expect(new GawkNumber('foo').val).to.be.NaN; - expect(new GawkNumber('123').val).to.equal(123); - expect(new GawkNumber(['a', 'b']).val).to.be.NaN; - expect(new GawkNumber({ foo: 'bar' }).val).to.be.NaN; - expect(new GawkNumber(function () {}).val).to.be.NaN; - }); - - it('should cast another gawk type', () => { - expect(new GawkNumber(gawk()).val).to.equal(0); - expect(new GawkNumber(gawk(null)).val).to.equal(0); - expect(new GawkNumber(gawk(true)).val).to.equal(1); - expect(new GawkNumber(gawk('foo')).val).to.be.NaN; - expect(new GawkNumber(gawk('123')).val).to.equal(123); - expect(new GawkNumber(gawk(['a', 'b'])).val).to.be.NaN; - expect(new GawkNumber(gawk({ foo: 'bar' })).val).to.be.NaN; - expect(new GawkNumber(gawk(function () {})).val).to.be.NaN; - }); - - it('should copy another gawked number', () => { - const num = new GawkNumber(gawk(123)); - expect(num.val).to.equal(123); - }); - - it('should fail if parent is not a gawk object', () => { - expect(() => { - new GawkNumber(123, 'foo'); - }).to.throw(TypeError, 'Parent must be a gawk class'); - }); - }); - - describe('set casting', () => { - it('should cast and set non-number value', () => { - const num = gawk(123); - num.val = undefined; expect(num.val).to.equal(0); - num.val = null; expect(num.val).to.equal(0); - num.val = true; expect(num.val).to.equal(1); - num.val = 'foo'; expect(num.val).to.be.NaN; - num.val = '123'; expect(num.val).to.equal(123); - num.val = ['a', 'b']; expect(num.val).to.be.NaN; - num.val = { foo: 'bar' }; expect(num.val).to.be.NaN; - num.val = function () {}; expect(num.val).to.be.NaN; - }); - - it('should cast and set another gawk type', () => { - const num = gawk(123); - num.val = gawk(); expect(num.val).to.equal(0); - num.val = gawk(null); expect(num.val).to.equal(0); - num.val = gawk(true); expect(num.val).to.equal(1); - num.val = gawk('foo'); expect(num.val).to.be.NaN; - num.val = gawk('123'); expect(num.val).to.equal(123); - num.val = gawk(['a', 'b']); expect(num.val).to.be.NaN; - num.val = gawk({ foo: 'bar' }); expect(num.val).to.be.NaN; - num.val = gawk(function () {}); expect(num.val).to.be.NaN; - }); - - it('should copy another gawked number', () => { - const num = gawk(123); - num.val = gawk(456); - expect(num.val).to.equal(456); - }); - }); - - describe('built-ins', () => { - it('should support toString() with positive integer', () => { - expect(gawk(123).toString()).to.equal('123'); - }); - - it('should support toString() with NaN', () => { - expect(gawk(NaN).toString()).to.equal('NaN'); - }); - - it('should support valueOf() with positive integer', () => { - expect(gawk(123).valueOf()).to.equal(123); - }); - - it('should support valueOf() with NaN', () => { - expect(gawk(NaN).valueOf()).to.be.NaN; - }); - }); - - describe('notifications', () => { - it('should be notified when value changes', () => { - const num = gawk(123); - - num.watch(evt => { - expect(evt.targets[0]).to.equal(num); - - const val = evt.targets[0].val; - expect(val).to.be.a.number; - expect(val).to.equal(456); - }); - - num.val = 456; - }); - - it('should only notify if value is uniquely changed', () => { - const num = gawk(123); - let count = 0; - - num.watch(evt => { - count++; - }); - - num.val = 456; - expect(count).to.equal(1); - - num.val = 456; - expect(count).to.equal(1); - }); - - it('should unwatch changes', () => { - const num = gawk(123); - let count = 0; - - const unwatch = num.watch(evt => { - count++; - }); - - num.val = 234; - num.val = 345; - - unwatch(); - - num.val = 456; - num.val = 567; - - expect(count).to.equal(2); - }); - }); -}); diff --git a/test/test-object.js b/test/test-object.js index 83540b5..d9f321c 100644 --- a/test/test-object.js +++ b/test/test-object.js @@ -1,13 +1,12 @@ -import { gawk, GawkObject, GawkString, GawkArray, GawkUndefined } from '../src/index'; +import gawk, { GawkArray, GawkObject } from '../src/index'; -describe('object', () => { - describe('gawking', () => { +describe('GawkObject', () => { + describe('gawk()', () => { it('should gawk empty object', () => { const obj = {}; const gobj = gawk(obj); expect(gobj).to.be.an.instanceof(GawkObject); - const val = gobj.val; - expect(val).to.deep.equal(obj); + expect(gobj).to.deep.equal(obj); }); it('should gawk object with mixed values', () => { @@ -23,36 +22,60 @@ describe('object', () => { }; const gobj = gawk(obj); expect(gobj).to.be.an.instanceof(GawkObject); - expect(gobj.keys()).to.deep.equal(Object.keys(obj)); - const val = gobj.val; - expect(val).to.be.an.object; - expect(val).to.deep.equal(obj); + expect(Object.keys(gobj)).to.deep.equal(Object.keys(obj)); + expect(gobj).to.be.an.object; + expect(gobj).to.deep.equal(obj); + expect(gobj.arr).to.be.instanceof(GawkArray); + expect(gobj.arr.__gawk__.parents.has(gobj)).to.be.true; }); it('should gawk object with nested objects', () => { const obj = { foo: { bar: 'baz' } }; const gobj = gawk(obj); expect(gobj).to.be.an.instanceof(GawkObject); - const val = gobj.val; - expect(val).to.be.an.object; - expect(val).to.deep.equal(obj); - }); - - it('should set a gawk object', () => { - const gobj = gawk({ foo: 'bar' }); - gobj.val = gawk({ pi: 3.14 }); - expect(gobj.val).to.deep.equal({ pi: 3.14 }); + expect(gobj).to.be.an.object; + expect(gobj).to.deep.equal(obj); + expect(gobj.foo).to.be.instanceof(GawkObject); + expect(gobj.foo.__gawk__.parents.has(gobj)).to.be.true; }); it('should create a gawk object without an explicit value', () => { const gobj = new GawkObject; - expect(gobj.val).to.deep.equal({}); + expect(gobj).to.deep.equal({}); + }); + + it('should fail if parent is not a gawk object', () => { + expect(() => { + gawk({}, 'foo'); + }).to.throw(TypeError, 'Expected parent to be a GawkArray or GawkObject'); }); }); - describe('constructor casting', () => { + describe('new GawkObject()', () => { + it('should not allow __gawk__ to be set', () => { + const gobj = new GawkObject; + expect(gobj).to.have.property('__gawk__'); + expect(() => { + gobj.__gawk__ = 'foo'; + }).to.throw(Error); + }); + + it('should not allow __gawk__ to be deleted', () => { + const gobj = new GawkObject; + expect(gobj).to.have.property('__gawk__'); + expect(() => { + delete gobj.__gawk__; + }).to.throw(Error); + }); + + it('should fail if gawking an object that is the parent', () => { + const gobj = new GawkObject; + expect(() => { + gawk(gobj, gobj); + }).to.throw(Error); + }); + it('should throw TypeError for non-object value', () => { - expect(() => new GawkObject(null)).to.throw(TypeError); expect(() => new GawkObject(true)).to.throw(TypeError); expect(() => new GawkObject('foo')).to.throw(TypeError); expect(() => new GawkObject(123)).to.throw(TypeError); @@ -63,7 +86,6 @@ describe('object', () => { }); it('should throw TypeError for non-object gawk type', () => { - expect(() => new GawkObject(gawk(null))).to.throw(TypeError); expect(() => new GawkObject(gawk(true))).to.throw(TypeError); expect(() => new GawkObject(gawk('foo'))).to.throw(TypeError); expect(() => new GawkObject(gawk(123))).to.throw(TypeError); @@ -76,57 +98,19 @@ describe('object', () => { it('should copy another gawked object', () => { const obj = { foo: 'bar' }; const gobj = new GawkObject(gawk(obj)); - expect(gobj.toJS()).to.deep.equal(obj); - }); - - it('should fail if parent is not a gawk object', () => { - expect(() => { - new GawkObject({}, 'foo'); - }).to.throw(TypeError, 'Parent must be a gawk class'); - }); - }); - - describe('set casting', () => { - it('should throw TypeError when setting non-object value', () => { - const gobj = gawk({}); - expect(() => { gobj.val = undefined; }).to.throw(TypeError); - expect(() => { gobj.val = null; }).to.throw(TypeError); - expect(() => { gobj.val = true; }).to.throw(TypeError); - expect(() => { gobj.val = 'foo'; }).to.throw(TypeError); - expect(() => { gobj.val = 123; }).to.throw(TypeError); - expect(() => { gobj.val = 3.14; }).to.throw(TypeError); - expect(() => { gobj.val = NaN; }).to.throw(TypeError); - expect(() => { gobj.val = ['a', 'b']; }).to.throw(TypeError); - expect(() => { gobj.val = function () {}; }).to.throw(TypeError); - }); - - it('should throw TypeError when setting non-object gawk type', () => { - const gobj = gawk({}); - expect(() => { gobj.val = gawk(); }).to.throw(TypeError); - expect(() => { gobj.val = gawk(null); }).to.throw(TypeError); - expect(() => { gobj.val = gawk(true); }).to.throw(TypeError); - expect(() => { gobj.val = gawk('foo'); }).to.throw(TypeError); - expect(() => { gobj.val = gawk(123); }).to.throw(TypeError); - expect(() => { gobj.val = gawk(3.14); }).to.throw(TypeError); - expect(() => { gobj.val = gawk(NaN); }).to.throw(TypeError); - expect(() => { gobj.val = gawk(['a', 'b']); }).to.throw(TypeError); - expect(() => { gobj.val = gawk(function () {}); }).to.throw(TypeError); - }); - - it('should copy another gawked object', () => { - const arr = gawk(['a', 'b']); - arr.val = gawk(['c', 'd']); - expect(arr.val).to.deep.equal(['c', 'd']); + expect(gobj).to.deep.equal(obj); }); }); - describe('built-ins', () => { + describe('toString()', () => { it('should support toString()', () => { const obj = { foo: 'bar' }; const gobj = gawk(obj); expect(gobj.toString()).to.equal('[object Object]'); }); + }); + describe('valueOf()', () => { it('should support valueOf()', () => { const obj = { foo: 'bar' }; const gobj = gawk(obj); @@ -134,588 +118,257 @@ describe('object', () => { }); }); - describe('methods', () => { - describe('get()', () => { - it('should get a value by key', () => { - const str = gawk({ foo: 'bar' }).get('foo'); - expect(str).to.be.an.instanceof(GawkString); - expect(str.val).to.equal('bar'); - }); - - it('should get undefined for non-existent key', () => { - const undef = gawk({}).get('foo'); - expect(undef).to.be.an.instanceOf(GawkUndefined); - }); - - it('should return object when not specifying a key', () => { - const gobj = gawk({ foo: 'bar' }); - expect(gobj.get()).to.equal(gobj); - }); - - it('should get a deeply nested object by key', () => { - const str = gawk({ foo: { bar: 'wiz' } }).get(['foo', 'bar']); - expect(str).to.be.an.instanceof(GawkString); - expect(str.val).to.equal('wiz'); - }); - - it('should get a deeply nested non-object by key', () => { - const undef = gawk({ foo: 'wiz' }).get(['foo', 'bar']); - expect(undef).to.be.an.instanceOf(GawkUndefined); - }); - - it('should get undefined for non-existent deeply nested key', () => { - const undef = gawk({ foo: { } }).get(['foo', 'bar']); - expect(undef).to.be.an.instanceOf(GawkUndefined); - }); + describe('get property', () => { + it('should get a value by key', () => { + const str = gawk({ foo: 'bar' }).foo; + expect(str).to.be.an.a.string; + expect(str).to.equal('bar'); }); - describe('set()', () => { - it('should set a value', () => { - const gobj = gawk({}); - gobj.set('foo', 'bar'); - expect(gobj.val).to.deep.equal({ foo: 'bar' }); - }); - - it('should create child object and set its value', () => { - const gobj = gawk({}); - gobj.set(['foo', 'bar'], 'wiz'); - expect(gobj.val).to.deep.equal({ foo: { bar: 'wiz' } }); - }); - - it('should override child value', () => { - const gobj = gawk({ - foo: { - bar: 'baz' - } - }); - - gobj.set(['foo', 'bar'], 'wiz'); - - expect(gobj.val).to.deep.equal({ foo: { bar: 'wiz' } }); - }); - - it('should override a different gawk type on set', () => { - const gobj = gawk({ - foo: null - }); - - gobj.set('foo', 'bar'); - - expect(gobj.val).to.deep.equal({ foo: 'bar' }); - }); + it('should get undefined for non-existent key', () => { + const undef = gawk({}).foo; + expect(undef).to.be.undefined; }); - describe('delete()', () => { - it('should delete an existing key/value', () => { - const gobj = gawk({ foo: 'bar' }); - const str = gobj.delete('foo'); - expect(str).to.be.instanceof(GawkString); - expect(str.val).to.equal('bar'); - expect(gobj.keys().length).to.equal(0); - expect(gobj.val).to.deep.equal({}); - }); - - it('should not error trying to delete non-existent key', () => { - const gobj = gawk({}); - const undef = gobj.delete('foo'); - expect(undef).to.be.undefined; - expect(gobj.keys().length).to.equal(0); - expect(gobj.val).to.deep.equal({}); - }); + it('should get a deeply nested object by key', () => { + const str = gawk({ foo: { bar: 'wiz' } }).foo.bar; + expect(str).to.be.a.string; + expect(str).to.equal('wiz'); }); - describe('has()', () => { - it('should tell if it has a key', () => { - const gobj = gawk({ foo: 'bar' }); - expect(gobj.has('foo')).to.be.true; - expect(gobj.has('baz')).to.be.false; - }); + it('should get a deeply nested non-object by key', () => { + const undef = gawk({ foo: 'wiz' }).foo.bar; + expect(undef).to.be.undefined; }); - describe('clear()', () => { - it('should wipe all key/values', () => { - const gobj = gawk({ - foo: 'bar', - pi: 3.14 - }); - - expect(gobj.keys().length).to.equal(2); - gobj.clear(); - expect(gobj.keys().length).to.equal(0); - expect(gobj.val).to.deep.equal({}); - }); + it('should get undefined for non-existent deeply nested key', () => { + const undef = gawk({ foo: { } }).foo.bar; + expect(undef).to.be.undefined; }); + }); - describe('keys()', () => { - it('should return an array of the keys in the object', () => { - const gobj = gawk({ - foo: 'bar', - pi: 3.14 - }); - const keys = gobj.keys(); - expect(keys).to.be.an.array; - expect(keys).to.have.lengthOf(2); - expect(keys).to.deep.equal(['foo', 'pi']); - }); + describe('set property', () => { + it('should set a value', () => { + const gobj = gawk({}); + gobj.foo = 'bar'; + expect(gobj).to.deep.equal({ foo: 'bar' }); }); - describe('merge()', () => { - it('should merge a JS object', () => { - const gobj = gawk({ foo: 'bar' }); - gobj.merge({ pi: 3.14 }); - expect(gobj.val).to.deep.equal({ foo: 'bar', pi: 3.14 }); - }); - - it('should merge a GawkObject', () => { - const gobj = gawk({ foo: 'bar' }); - gobj.merge(gawk({ pi: 3.14 })); - expect(gobj.val).to.deep.equal({ foo: 'bar', pi: 3.14 }); - }); - - it('should merge multiple JS objects and GawkObjects', () => { - const gobj = gawk({ foo: 'bar' }); - gobj.merge({ baz: 'wiz' }, gawk({ pi: 3.14 }), { num: 123 }, gawk({ arr: ['a', 'b'] })); - expect(gobj.val).to.deep.equal({ foo: 'bar', baz: 'wiz', pi: 3.14, num: 123, arr: ['a', 'b'] }); - }); - - it('should merge and overwrite', () => { - const gobj = gawk({ foo: 'bar' }); - gobj.merge({ foo: 'wiz' }); - expect(gobj.val).to.deep.equal({ foo: 'wiz' }); - }); - - it('should fail to merge if no args', () => { - const gobj = gawk({}); - expect(() => { gobj.merge(); }).to.throw(TypeError); - }); - - it('should fail to merge non-object and non-GawkObjects types', () => { - const gobj = gawk({}); - expect(() => { gobj.merge('foo'); }).to.throw(TypeError); - expect(() => { gobj.merge(gawk('foo')); }).to.throw(TypeError); - }); - - it('should shallow merge', () => { - const gobj = gawk({ foo: { bar: { baz: 'wiz' } } }); - gobj.merge({ foo: { pi: 3.14 } }); - expect(gobj.val).to.deep.equal({ foo: { pi: 3.14 }}); - }); - - it('should notify parent when child has a merge', () => { - const gobj = gawk({}); - let count = 0; - - gobj.watch(evt => { - count++; - }); - - const child = gawk({}); - gobj.set('foo', child); - // { foo: {} } - expect(count).to.equal(1); - expect(child._parents).to.have.lengthOf(1); - expect(child._parents[0]).to.equal(gobj); - - const bar = gawk({ bar: 'wiz' }); - child.merge(bar); - // { foo: { bar: 'wiz' } } - expect(count).to.equal(2); - expect(bar._parents).to.have.lengthOf(0); - - const foo = gobj.get('foo'); - expect(foo._parents).to.have.lengthOf(1); - expect(foo._parents[0]).to.equal(gobj); - - child.merge({ bar: 'wow' }); - // { foo: { bar: 'wow' } } - expect(count).to.equal(3); - expect(bar._parents).to.have.lengthOf(0); - expect(child._parents).to.have.lengthOf(1); - expect(child._parents[0]).to.equal(gobj); - - expect(gobj.val).to.deep.equal({ foo: { bar: 'wow' } }); - }); - - it('should only notify parent one time when merging multiple objects', () => { - const gobj = gawk({ foo: 'bar' }); - let count = 0; - - gobj.watch(evt => { - count++; - }); - - gobj.merge({ baz: 'wiz' }, gawk({ pi: 3.14 })); //, { num: 123 }, gawk({ arr: ['a', 'b'] })); - expect(gobj.val).to.deep.equal({ foo: 'bar', baz: 'wiz', pi: 3.14 }); //, num: 123, arr: ['a', 'b'] }); - expect(count).to.equal(1); - }); + it('should create child object and set its value', () => { + const gobj = gawk({}); + gobj.foo = {}; + gobj.foo.bar = 'wiz'; + expect(gobj.foo).to.be.instanceof(GawkObject); + expect(gobj.foo.__gawk__.parents.has(gobj)).to.be.true; + expect(gobj).to.deep.equal({ foo: { bar: 'wiz' } }); }); - describe('mergeDeep()', () => { - it('should merge a JS object', () => { - const gobj = gawk({ foo: 'bar' }); - gobj.mergeDeep({ pi: 3.14 }); - expect(gobj.val).to.deep.equal({ foo: 'bar', pi: 3.14 }); - }); - - it('should merge a GawkObject', () => { - const gobj = gawk({ foo: 'bar' }); - gobj.mergeDeep(gawk({ pi: 3.14 })); - expect(gobj.val).to.deep.equal({ foo: 'bar', pi: 3.14 }); - }); - - it('should merge multiple JS objects and GawkObjects', () => { - const gobj = gawk({ foo: 'bar' }); - gobj.mergeDeep({ baz: 'wiz' }, gawk({ pi: 3.14 }), { num: 123 }, gawk({ arr: ['a', 'b'] })); - expect(gobj.val).to.deep.equal({ foo: 'bar', baz: 'wiz', pi: 3.14, num: 123, arr: ['a', 'b'] }); - }); - - it('should merge and overwrite', () => { - const gobj = gawk({ foo: 'bar' }); - gobj.mergeDeep({ foo: 'wiz' }); - expect(gobj.val).to.deep.equal({ foo: 'wiz' }); - }); - - it('should fail to merge if no args', () => { - const gobj = gawk({}); - expect(() => { gobj.mergeDeep(); }).to.throw(TypeError); - }); - - it('should fail to merge non-object and non-GawkObjects types', () => { - const gobj = gawk({}); - expect(() => { gobj.mergeDeep('foo'); }).to.throw(TypeError); - expect(() => { gobj.mergeDeep(gawk('foo')); }).to.throw(TypeError); - }); - - it('should deep merge', () => { - const gobj = gawk({ foo: { bar: { baz: 'wiz' } } }); - gobj.mergeDeep({ foo: { pi: 3.14, biz: { wap: 'fip' } } }); - expect(gobj.val).to.deep.equal({ - foo: { - bar: { - baz: 'wiz' - }, - pi: 3.14, - biz: { - wap: 'fip' - } - } - }); + it('should override child value', () => { + const gobj = gawk({ + foo: { + bar: 'baz' + } }); - it('should notify parent one time when child has a deep merge', () => { - const gobj = gawk({}); - let count = 0; - - gobj.watch(evt => { - count++; - }); - - const child = gawk({ bar: { pow: 123 } }); - gobj.set('foo', child); - // { foo: { bar: { pow: 123 } } } - expect(count).to.equal(1); + gobj.foo.bar = 'wiz'; - const bar = gawk({ bar: { wiz: 456 } }); - child.mergeDeep(bar); - // { foo: { bar: { pow: 123, wiz: 456 } } } - expect(count).to.equal(2); - - const foo = gobj.get('foo'); - expect(foo._parents).to.have.lengthOf(1); - expect(foo._parents[0]).to.equal(gobj); - - child.mergeDeep({ bar: { paz: 789 } }); - // { foo: { bar: { pow: 123, wiz: 456, paz: 789 } } } - expect(count).to.equal(3); - expect(bar._parents).to.have.lengthOf(0); + expect(gobj).to.deep.equal({ foo: { bar: 'wiz' } }); + expect(gobj.foo).to.be.instanceof(GawkObject); + expect(gobj.foo.__gawk__.parents.has(gobj)).to.be.true; + }); - expect(gobj.val).to.deep.equal({ foo: { bar: { pow: 123, wiz: 456, paz: 789 } } }); + it('should override a different gawk type on set', () => { + const gobj = gawk({ + foo: null }); - it('should only notify parent one time when merging multiple objects', () => { - const gobj = gawk({ foo: { bar: { baz: 'wiz' } } }); - let count = 0; + gobj.foo = 'bar'; - gobj.watch(evt => { - count++; - }); - - gobj.mergeDeep({ foo: { bar: { baz: 'wow' } } }); - expect(gobj.val).to.deep.equal({ foo: { bar: { baz: 'wow' } } }); - expect(count).to.equal(1); - }); + expect(gobj).to.deep.equal({ foo: 'bar' }); }); }); - describe('notifications', () => { - it('should be notified when entire object changes', () => { + describe('delete property', () => { + it('should delete an existing key/value', () => { const gobj = gawk({ foo: 'bar' }); - gobj.watch(evt => { - expect(evt.source).to.equal(gobj); - expect(evt.targets).to.deep.equal([ gobj ]); - - const obj = evt.targets[0].val; - expect(obj).to.deep.equal({ bar: 'wiz' }); - }); - gobj.val = { bar: 'wiz' }; + const r = delete gobj.foo; + expect(r).to.be.tru; + expect(Object.keys(gobj).length).to.equal(0); + expect(gobj).to.deep.equal({}); }); - it('should be notified when a key/value is added', () => { - const gobj = gawk({ foo: 'bar' }); - gobj.watch(evt => { - expect(evt.source).to.equal(gobj); - expect(evt.targets).to.deep.equal([ gobj ]); - - const obj = evt.targets[0].val; - expect(obj).to.deep.equal({ foo: 'bar', pi: 3.14 }); - }); - gobj.set('pi', 3.14); + it('should not error trying to delete non-existent key', () => { + const gobj = gawk({}); + const r = delete gobj.foo; + expect(r).to.be.tru; + expect(Object.keys(gobj).length).to.equal(0); + expect(gobj).to.deep.equal({}); }); + }); - it('should be notified when a key/value changes', () => { + describe('hasOwnProperty()', () => { + it('should tell if it has a key', () => { const gobj = gawk({ foo: 'bar' }); - gobj.watch(evt => { - expect(evt.source).to.equal(gobj); - expect(evt.targets).to.deep.equal([ gobj ]); - - const obj = evt.targets[0].val; - expect(obj).to.deep.equal({ foo: 'wiz' }); - }); - gobj.set('foo', 'wiz'); + expect(gobj.hasOwnProperty('foo')).to.be.true; + expect(gobj.hasOwnProperty('baz')).to.be.false; }); + }); - it('should be notified when a key/value is deleted', () => { - const gobj = gawk({ foo: 'bar', pi: 3.14 }); - gobj.watch(evt => { - expect(evt.source).to.equal(gobj); - expect(evt.targets).to.deep.equal([ gobj ]); - - const obj = evt.targets[0].val; - expect(obj).to.deep.equal({ foo: 'bar' }); + describe('Object.keys()', () => { + it('should return an array of the keys in the object', () => { + const gobj = gawk({ + foo: 'bar', + pi: 3.14 }); - gobj.delete('pi'); + const keys = Object.keys(gobj); + expect(keys).to.be.an.array; + expect(keys).to.have.lengthOf(2); + expect(keys).to.deep.equal(['foo', 'pi']); }); + }); - it('should not notify when a non-existent key/value is deleted', () => { - const gobj = gawk({}); - gobj.watch(evt => { - throw new Error('Watcher should not have been invoked'); - }); - gobj.delete('foo'); + describe('JSON.stringify()', () => { + it('should stringify a GawkObject', () => { + expect(JSON.stringify(gawk({ foo: 'bar' }))).to.equal('{"foo":"bar"}'); + expect(JSON.stringify(gawk({ foo: 'bar' }), null, ' ')).to.equal('{\n "foo": "bar"\n}'); }); + }); - it('should be notified when the object is cleared', () => { - const gobj = gawk({ foo: 'bar', pi: 3.14 }); - gobj.watch(evt => { - expect(evt.source).to.equal(gobj); - expect(evt.targets).to.deep.equal([ gobj ]); + describe('merge()', () => { + it('should merge a JS object', () => { + let gobj = gawk({ foo: 'bar' }); + gobj = gawk.merge(gobj, { pi: 3.14 }); + expect(gobj).to.deep.equal({ foo: 'bar', pi: 3.14 }); + }); - const obj = evt.targets[0].val; - expect(obj).to.be.an.object; - expect(obj).to.deep.equal({}); - }); - gobj.clear(); + it('should merge a GawkObject', () => { + let gobj = gawk({ foo: 'bar' }); + gobj = gawk.merge(gobj, gawk({ pi: 3.14 })); + expect(gobj).to.deep.equal({ foo: 'bar', pi: 3.14 }); }); - it('should only notify if key/value is uniquely changed', () => { - const gobj = gawk({ foo: 'bar' }); - let count = 0; + it('should do nothing if not merging anything', () => { + let gobj = gawk({ foo: 'bar' }); + gobj = gawk.merge(gobj); + expect(gobj).to.deep.equal({ foo: 'bar' }); + }); - gobj.watch(evt => { - count++; - }); + it('should merge multiple JS objects and GawkObjects', () => { + let gobj = gawk({ foo: 'bar' }); + gobj = gawk.merge(gobj, { baz: 'wiz' }, gawk({ pi: 3.14 }), { num: 123 }, gawk({ arr: ['a', 'b'] })); + expect(gobj).to.deep.equal({ foo: 'bar', baz: 'wiz', pi: 3.14, num: 123, arr: ['a', 'b'] }); + expect(gobj.arr).to.be.instanceof(GawkArray); + expect(gobj.arr.__gawk__.parents.has(gobj)).to.be.true; + }); - gobj.set('foo', 'baz'); - expect(count).to.equal(1); + it('should merge and overwrite', () => { + let gobj = gawk({ foo: 'bar' }); + gobj = gawk.merge(gobj, { foo: 'wiz' }); + expect(gobj).to.deep.equal({ foo: 'wiz' }); + }); - gobj.set('foo', 'baz'); - expect(count).to.equal(1); + it('should throw TypeError if no args', () => { + expect(() => { gawk.merge(); }).to.throw(TypeError); }); - it('should unwatch changes', () => { + it('should fail to merge non-object and non-GawkObjects types', () => { const gobj = gawk({}); - let count = 0; - - const unwatch = gobj.watch(evt => { - count++; - }); - - gobj.set('a', 'b'); - gobj.set('c', 'd'); - - unwatch(); - - gobj.set('e', 'f'); - gobj.set('g', 'h'); - - expect(count).to.equal(2); + expect(() => { gawk.merge(gobj, undefined); }).to.throw(TypeError); + expect(() => { gawk.merge(gobj, null); }).to.throw(TypeError); + expect(() => { gawk.merge(gobj, true); }).to.throw(TypeError); + expect(() => { gawk.merge(gobj, 'foo'); }).to.throw(TypeError); + expect(() => { gawk.merge(gobj, 123); }).to.throw(TypeError); + expect(() => { gawk.merge(gobj, 3.14); }).to.throw(TypeError); + expect(() => { gawk.merge(gobj, NaN); }).to.throw(TypeError); + expect(() => { gawk.merge(gobj, ['a', 'b']); }).to.throw(TypeError); + expect(() => { gawk.merge(gobj, function () {}); }).to.throw(TypeError); }); - it('should be notified when child changes', () => { - const gobj = gawk({ foo: { bar: 'baz' } }); - const nested = gobj.get('foo'); - - gobj.watch(evt => { - expect(evt.source).to.equal(gobj); - expect(evt.targets).to.deep.equal([ nested ]); - - const obj = evt.source.val; - expect(obj).to.be.an.object; - expect(obj).to.deep.equal({ - foo: { - bar: 'baz', - pi: 3.14 - } - }); - }); - - nested.set('pi', 3.14); + it('should throw TypeError when setting non-object gawk type', () => { + const gobj = gawk({}); + expect(() => { gawk.merge(gobj, gawk()); }).to.throw(TypeError); + expect(() => { gawk.merge(gobj, gawk(null)); }).to.throw(TypeError); + expect(() => { gawk.merge(gobj, gawk(true)); }).to.throw(TypeError); + expect(() => { gawk.merge(gobj, gawk('foo')); }).to.throw(TypeError); + expect(() => { gawk.merge(gobj, gawk(123)); }).to.throw(TypeError); + expect(() => { gawk.merge(gobj, gawk(3.14)); }).to.throw(TypeError); + expect(() => { gawk.merge(gobj, gawk(NaN)); }).to.throw(TypeError); + expect(() => { gawk.merge(gobj, gawk(['a', 'b'])); }).to.throw(TypeError); + expect(() => { gawk.merge(gobj, gawk(function () {})); }).to.throw(TypeError); + }); + + it('should assign another gawk object', () => { + const gobj = gawk({ foo: 'bar' }); + const gobj2 = gawk({ pi: 3.14 }); + gawk.merge(gobj, gobj2); + expect(gobj).to.deep.equal({ foo: 'bar', pi: 3.14 }); }); - it('should notify child watchers if child changes', () => { - const gobj = gawk({ foo: { bar: 'baz' } }); - let count = 0; - - gobj.get('foo').watch(evt => { - count++; - }); - - gobj.mergeDeep({ foo: { bar: 'baz' + Date.now() } }); - - expect(count).to.equal(1); + it('should shallow merge', () => { + const gobj = gawk({ foo: { bar: { baz: 'wiz' } } }); + gawk.merge(gobj, { foo: { pi: 3.14 } }); + expect(gobj).to.deep.equal({ foo: { pi: 3.14 }}); + expect(gobj.foo).to.be.instanceof(GawkObject); + expect(gobj.foo.__gawk__.parents.has(gobj)).to.be.true; }); + }); - it('should only notify once after deep merge', () => { - const gobj = new GawkObject; - let counter = 0; - - gobj.watch(evt => { - counter++; - }); - - gobj.mergeDeep({ - foo: { - a: 'b', - c: 123, - d: { - e: 'f', - g: 'h' - } - } - }); - - expect(gobj.val).to.deep.equal({ - foo: { - a: 'b', - c: 123, - d: { - e: 'f', - g: 'h' - } - } - }); - - gobj.mergeDeep({ - bar: { - i: 'j', - k: 456, - l: { - m: 'n', - o: 'p' - } - } - }); - - expect(gobj.val).to.deep.equal({ - foo: { - a: 'b', - c: 123, - d: { - e: 'f', - g: 'h' - } - }, - bar: { - i: 'j', - k: 456, - l: { - m: 'n', - o: 'p' - } - } - }); - - expect(counter).to.equal(2); + describe('mergeDeep()', () => { + it('should merge a JS object', () => { + let gobj = gawk({ foo: 'bar' }); + gobj = gawk.mergeDeep(gobj, { pi: 3.14 }); + expect(gobj).to.deep.equal({ foo: 'bar', pi: 3.14 }); }); - it('should be notified when deep child changes', () => { - const gobj = gawk({}); - const arr = gobj - .set('foo', {}) - .set('bar', {}) - .set('baz', []); - - let count = 0; - gobj.watch(evt => { - count++; - }); - - arr.push('a'); - arr.push('b'); - expect(count).to.equal(2); + it('should merge a GawkObject', () => { + let gobj = gawk({ foo: 'bar' }); + gobj = gawk.mergeDeep(gobj, gawk({ pi: 3.14 })); + expect(gobj).to.deep.equal({ foo: 'bar', pi: 3.14 }); }); - it('should notify multiple parents', () => { - const gobjs = [ - new GawkObject, - new GawkObject, - new GawkObject - ]; - const child = gawk({}); - const arr = child.set('bar', []); - let count = 0; - - for (const gobj of gobjs) { - gobj.set('foo', child); - } + it('should merge multiple JS objects and GawkObjects', () => { + let gobj = gawk({ foo: 'bar' }); + gobj = gawk.mergeDeep(gobj, { baz: 'wiz' }, gawk({ pi: 3.14 }), { num: 123 }, gawk({ arr: ['a', 'b'] })); + expect(gobj).to.deep.equal({ foo: 'bar', baz: 'wiz', pi: 3.14, num: 123, arr: ['a', 'b'] }); + expect(gobj.arr).to.be.instanceof(GawkArray); + expect(gobj.arr.__gawk__.parents.has(gobj)).to.be.true; + }); - for (const gobj of gobjs) { - gobj.watch(evt => { - count++; - }); - } + it('should merge and overwrite', () => { + let gobj = gawk({ foo: 'bar' }); + gobj = gawk.mergeDeep(gobj, { foo: 'wiz' }); + expect(gobj).to.deep.equal({ foo: 'wiz' }); + }); - arr.push('a'); - arr.push('b'); - expect(count).to.equal(6); + it('should throw TypeError if no args', () => { + expect(() => { gawk.mergeDeep(); }).to.throw(TypeError); }); - it('should pause and resume notifications', () => { - const gobj = gawk({ foo: 'bar' }); - let counter = 0; + it('should fail to merge non-object and non-GawkObjects types', () => { + expect(() => { gawk.mergeDeep('foo'); }).to.throw(TypeError); + expect(() => { gawk.mergeDeep({}, gawk('foo')); }).to.throw(TypeError); + }); - gobj.watch(evt => { - counter++; + it('should deep merge', () => { + let gobj = gawk({ foo: { bar: { baz: 'wiz' } } }); + gobj = gawk.mergeDeep(gobj, { foo: { pi: 3.14, biz: { wap: 'fip' } } }); + expect(gobj).to.deep.equal({ + foo: { + bar: { + baz: 'wiz' + }, + pi: 3.14, + biz: { + wap: 'fip' + } + } }); - - gobj.set('pi', 3.14); - expect(counter).to.equal(1); - - const gobj2 = new GawkObject({ wiz: 123 }); - - gobj.pause(); - gobj.set('baz', gobj2); - expect(counter).to.equal(1); - gobj.resume(); - expect(counter).to.equal(2); - - gobj.pause(); - gobj.set('color', 'red'); - expect(counter).to.equal(2); - gobj2.set('lorum', 'ipsum'); - expect(counter).to.equal(2); - gobj.resume(); - expect(counter).to.equal(3); + expect(gobj.foo).to.be.instanceof(GawkObject); + expect(gobj.foo.__gawk__.parents.has(gobj)).to.be.true; + expect(gobj.foo.bar).to.be.instanceof(GawkObject); + expect(gobj.foo.bar.__gawk__.parents.has(gobj.foo)).to.be.true; + expect(gobj.foo.biz).to.be.instanceof(GawkObject); + expect(gobj.foo.biz.__gawk__.parents.has(gobj.foo)).to.be.true; }); }); }); diff --git a/test/test-string.js b/test/test-string.js deleted file mode 100644 index 55cee0c..0000000 --- a/test/test-string.js +++ /dev/null @@ -1,154 +0,0 @@ -import { gawk, GawkString } from '../src/index'; - -describe('string', () => { - describe('gawking', () => { - it('should gawk an empty string', () => { - const str = gawk(''); - expect(str).to.be.an.instanceof(GawkString); - expect(str.val).to.equal(''); - }); - - it('should gawk string', () => { - const str = gawk('foo'); - expect(str).to.be.an.instanceof(GawkString); - expect(str.val).to.equal('foo'); - }); - - it('should gawk string from String object', () => { - const str = gawk(new String('bar')); - expect(str).to.be.an.instanceof(GawkString); - expect(str.val).to.equal('bar'); - }); - }); - - describe('constructor casting', () => { - it('should cast non-string value', () => { - expect(new GawkString().val).to.equal(''); - expect(new GawkString(null).val).to.equal('null'); - expect(new GawkString(true).val).to.equal('true'); - expect(new GawkString(123).val).to.equal('123'); - expect(new GawkString(3.14).val).to.equal('3.14'); - expect(new GawkString(NaN).val).to.equal('NaN'); - expect(new GawkString(['a', 'b']).val).to.equal('a,b'); - expect(new GawkString({ foo: 'bar' }).val).to.equal('[object Object]'); - expect(new GawkString(function () {}).val).to.equal('function () {}'); - }); - - it('should cast another gawk type', () => { - expect(new GawkString(gawk()).val).to.equal(''); - expect(new GawkString(gawk(null)).val).to.equal('null'); - expect(new GawkString(gawk(true)).val).to.equal('true'); - expect(new GawkString(gawk(123)).val).to.equal('123'); - expect(new GawkString(gawk(3.14)).val).to.equal('3.14'); - expect(new GawkString(gawk(NaN)).val).to.equal('NaN'); - expect(new GawkString(gawk(['a', 'b'])).val).to.equal('a,b'); - expect(new GawkString(gawk({ foo: 'bar' })).val).to.equal('[object Object]'); - expect(new GawkString(gawk(function () {})).val).to.equal('function () {}'); - }); - - it('should copy another gawked string', () => { - const str = new GawkString(gawk('foo')); - expect(str.val).to.equal('foo'); - }); - - it('should fail if parent is not a gawk object', () => { - expect(() => { - new GawkString('foo', 'bar'); - }).to.throw(TypeError, 'Parent must be a gawk class'); - }); - }); - - describe('set casting', () => { - it('should cast and set non-string value', () => { - const str = gawk(''); - str.val = undefined; expect(str.val).to.equal(''); - str.val = null; expect(str.val).to.equal('null'); - str.val = true; expect(str.val).to.equal('true'); - str.val = 123; expect(str.val).to.equal('123'); - str.val = 3.14; expect(str.val).to.equal('3.14'); - str.val = NaN; expect(str.val).to.equal('NaN'); - str.val = ['a', 'b']; expect(str.val).to.equal('a,b'); - str.val = { foo: 'bar' }; expect(str.val).to.equal('[object Object]'); - str.val = function () {}; expect(str.val).to.equal('function () {}'); - }); - - it('should cast and set another gawk type', () => { - const str = gawk(''); - str.val = gawk(); expect(str.val).to.equal(''); - str.val = gawk(null); expect(str.val).to.equal('null'); - str.val = gawk(true); expect(str.val).to.equal('true'); - str.val = gawk(123); expect(str.val).to.equal('123'); - str.val = gawk(3.14); expect(str.val).to.equal('3.14'); - str.val = gawk(NaN); expect(str.val).to.equal('NaN'); - str.val = gawk(['a', 'b']); expect(str.val).to.equal('a,b'); - str.val = gawk({ foo: 'bar' }); expect(str.val).to.equal('[object Object]'); - str.val = gawk(function () {}); expect(str.val).to.equal('function () {}'); - }); - - it('should copy another gawked string', () => { - const str = gawk('foo'); - str.val = gawk('bar'); - expect(str.val).to.equal('bar'); - }); - }); - - describe('built-ins', () => { - it('should support toString()', () => { - expect(gawk('foo').toString()).to.equal('foo'); - }); - - it('should support valueOf()', () => { - expect(gawk('foo').valueOf()).to.equal('foo'); - }); - }); - - describe('notifications', () => { - it('should be notified when value changes', () => { - const str = gawk('foo'); - - str.watch(evt => { - expect(evt.targets).to.deep.equal([ str ]); - - const val = evt.targets[0].val; - expect(val).to.be.a.string; - expect(val).to.equal('bar'); - }); - - str.val = 'bar'; - }); - - it('should only notify if value is uniquely changed', () => { - const str = gawk('foo'); - let count = 0; - - str.watch(evt => { - count++; - }); - - str.val = 'bar'; - expect(count).to.equal(1); - - str.val = 'bar'; - expect(count).to.equal(1); - }); - - it('should unwatch changes', () => { - const str = gawk('a'); - let count = 0; - - const unwatch = str.watch(evt => { - count++; - }); - - str.val = 'b'; - str.val = 'c'; - - unwatch(); - - str.val = 'd'; - str.val = 'e'; - - expect(count).to.equal(2); - }); - }); -}); diff --git a/test/test-undefined.js b/test/test-undefined.js deleted file mode 100644 index d13d78f..0000000 --- a/test/test-undefined.js +++ /dev/null @@ -1,113 +0,0 @@ -import { gawk, GawkUndefined } from '../src/index'; - -describe('undefined', () => { - describe('gawking', () => { - it('should gawk undefined', () => { - const undef = gawk(); - expect(undef).to.be.an.instanceof(GawkUndefined); - expect(undef.val).to.be.undefined; - }); - - it('should gawk explicit undefined', () => { - const undef = gawk(undefined); - expect(undef).to.be.an.instanceof(GawkUndefined); - expect(undef.val).to.be.undefined; - }); - }); - - describe('constructor casting', () => { - it('should cast non-undefined value', () => { - expect(new GawkUndefined('foo').val).to.be.undefined; - expect(new GawkUndefined(true).val).to.be.undefined; - expect(new GawkUndefined(null).val).to.be.undefined; - expect(new GawkUndefined(123).val).to.be.undefined; - expect(new GawkUndefined(3.14).val).to.be.undefined; - expect(new GawkUndefined(NaN).val).to.be.undefined; - expect(new GawkUndefined(['a', 'b']).val).to.be.undefined; - expect(new GawkUndefined({ foo: 'bar' }).val).to.be.undefined; - expect(new GawkUndefined(function () {}).val).to.be.undefined; - }); - - it('should cast another gawk type', () => { - expect(new GawkUndefined(gawk('foo')).val).to.be.undefined; - expect(new GawkUndefined(gawk(true)).val).to.be.undefined; - expect(new GawkUndefined(gawk(null)).val).to.be.undefined; - expect(new GawkUndefined(gawk(123)).val).to.be.undefined; - expect(new GawkUndefined(gawk(3.14)).val).to.be.undefined; - expect(new GawkUndefined(gawk(NaN)).val).to.be.undefined; - expect(new GawkUndefined(gawk(['a', 'b'])).val).to.be.undefined; - expect(new GawkUndefined(gawk({ foo: 'bar' })).val).to.be.undefined; - expect(new GawkUndefined(gawk(function () {})).val).to.be.undefined; - }); - - it('should copy another gawked undefined', () => { - const undef = new GawkUndefined(gawk()); - expect(undef.val).to.be.undefined; - }); - - it('should fail if parent is not a gawk object', () => { - expect(() => { - new GawkUndefined(undefined, 'foo'); - }).to.throw(TypeError, 'Parent must be a gawk class'); - }); - }); - - describe('set casting', () => { - it('should cast and set non-undefined value', () => { - const undef = gawk(); - undef.val = 'foo'; expect(undef.val).to.be.undefined; - undef.val = true; expect(undef.val).to.be.undefined; - undef.val = null; expect(undef.val).to.be.undefined; - undef.val = 123; expect(undef.val).to.be.undefined; - undef.val = 3.14; expect(undef.val).to.be.undefined; - undef.val = NaN; expect(undef.val).to.be.undefined; - undef.val = ['a', 'b']; expect(undef.val).to.be.undefined; - undef.val = { foo: 'bar' }; expect(undef.val).to.be.undefined; - undef.val = function () {}; expect(undef.val).to.be.undefined; - }); - - it('should cast and set another gawk type', () => { - const undef = gawk(); - undef.val = gawk('foo'); expect(undef.val).to.be.undefined; - undef.val = gawk(true); expect(undef.val).to.be.undefined; - undef.val = gawk(null); expect(undef.val).to.be.undefined; - undef.val = gawk(123); expect(undef.val).to.be.undefined; - undef.val = gawk(3.14); expect(undef.val).to.be.undefined; - undef.val = gawk(NaN); expect(undef.val).to.be.undefined; - undef.val = gawk(['a', 'b']); expect(undef.val).to.be.undefined; - undef.val = gawk({ foo: 'bar' }); expect(undef.val).to.be.undefined; - undef.val = gawk(function () {}); expect(undef.val).to.be.undefined; - }); - - it('should copy another gawked undefined', () => { - const undef = gawk(); - undef.val = gawk(); - expect(undef.val).to.be.undefined; - }); - }); - - describe('built-ins', () => { - it('should support toString()', () => { - expect(gawk().toString()).to.equal(''); - }); - - it('should support valueOf()', () => { - expect(gawk().valueOf()).to.be.undefined; - }); - }); - - describe('notifications', () => { - it('should not send notifications', () => { - const undef = gawk(); - let count = 0; - - undef.watch(evt => { - count++; - }); - - undef.val = 'bar'; - - expect(count).to.equal(0); - }); - }); -}); diff --git a/test/test-watch.js b/test/test-watch.js new file mode 100644 index 0000000..6834c58 --- /dev/null +++ b/test/test-watch.js @@ -0,0 +1,519 @@ +import gawk, { GawkArray, GawkObject } from '../src/index'; + +describe('gawk.watch()', () => { + it('should fail to watch with non-gawk or object type', () => { + expect(() => { + gawk.watch('foo'); + }).to.throw(TypeError, 'Expected source to be a GawkArray or GawkObject'); + }); + + it('should fail to watch with non-function listener', () => { + expect(() => { + gawk.watch({}); + }).to.throw(TypeError, 'Expected listener to be a function'); + + expect(() => { + gawk.watch({}, 'foo'); + }).to.throw(TypeError, 'Expected listener to be a function'); + }); + + it('should be notified after merge', () => { + const gobj = gawk({ foo: 'bar' }); + gawk.watch(gobj, obj => { + expect(obj).to.equal(gobj); + expect(obj).to.deep.equal({ foo: 'bar', bar: 'wiz' }); + }); + gawk.merge(gobj, { bar: 'wiz' }); + }); + + it('should be notified when a key/value is added', () => { + const gobj = gawk({ foo: 'bar' }); + gawk.watch(gobj, obj => { + expect(obj).to.equal(gobj); + expect(obj).to.deep.equal({ foo: 'bar', pi: 3.14 }); + }); + gobj.pi = 3.14; + }); + + it('should be notified when a key/value changes', () => { + const gobj = gawk({ foo: 'bar' }); + gawk.watch(gobj, obj => { + expect(obj).to.equal(gobj); + expect(obj).to.deep.equal({ foo: 'wiz' }); + }); + gobj.foo = 'wiz'; + }); + + it('should be notified when a key/value is deleted', () => { + const gobj = gawk({ foo: 'bar', pi: 3.14 }); + gawk.watch(gobj, obj => { + expect(obj).to.equal(gobj); + expect(obj).to.deep.equal({ foo: 'bar' }); + }); + delete gobj.pi; + }); + + it('should not notify when a non-existent key/value is deleted', () => { + const gobj = gawk({}); + gawk.watch(gobj, obj => { + throw new Error('Listener should not have been invoked'); + }); + delete gobj.foo; + }); + + it('should only notify if key/value is uniquely changed', () => { + const gobj = gawk({ foo: 'bar' }); + let count = 0; + + gawk.watch(gobj, obj => { + count++; + }); + + gobj.foo = 'baz'; + expect(count).to.equal(1); + + gobj.foo = 'baz'; + expect(count).to.equal(1); + }); + + it('should be notified when child changes', () => { + const gobj = gawk({ foo: { bar: 'baz' } }); + const nested = gobj.foo; + + expect(nested).to.be.instanceof(GawkObject); + expect(nested.__gawk__.parents.has(gobj)).to.be.true; + + gawk.watch(gobj, (obj, source) => { + expect(obj).to.equal(gobj); + expect(obj).to.deep.equal({ + foo: { + bar: 'baz', + pi: 3.14 + } + }); + expect(source).to.deep.equal({ + bar: 'baz', + pi: 3.14 + }); + }); + + nested.pi = 3.14; + }); + + it('should notify child watchers if child changes', () => { + const gobj = gawk({ foo: { bar: 'baz' } }); + let count = 0; + + gawk.watch(gobj.foo, (obj, source) => { + count++; + }); + + gawk.mergeDeep(gobj, { foo: { bar: 'baz' + Date.now() } }); + + expect(count).to.equal(1); + }); + + it('should only notify once after deep merge', () => { + const gobj = new GawkObject; + let counter = 0; + + gawk.watch(gobj, obj => { + counter++; + }); + + gawk.mergeDeep(gobj, { + foo: { + a: 'b', + c: 123, + d: { + e: 'f', + g: 'h' + } + } + }); + + expect(gobj).to.deep.equal({ + foo: { + a: 'b', + c: 123, + d: { + e: 'f', + g: 'h' + } + } + }); + + gawk.mergeDeep(gobj, { + bar: { + i: 'j', + k: 456, + l: { + m: 'n', + o: 'p' + } + } + }); + + expect(gobj).to.deep.equal({ + foo: { + a: 'b', + c: 123, + d: { + e: 'f', + g: 'h' + } + }, + bar: { + i: 'j', + k: 456, + l: { + m: 'n', + o: 'p' + } + } + }); + + expect(counter).to.equal(2); + }); + + it('should be notified when deep child changes', () => { + const gobj = gawk({}); + gobj.foo = {}; + gobj.foo.bar = {}; + gobj.foo.bar.baz = []; + const arr = gobj.foo.bar.baz; + + let count = 0; + gawk.watch(gobj, obj => { + count++; + }); + + arr.push('a'); + arr.push('b'); + expect(count).to.equal(2); + }); + + it('should notify multiple parents', () => { + const gobjs = [ + new GawkObject, + new GawkObject, + new GawkObject + ]; + const child = gawk({}); + child.bar = []; + const arr = child.bar; + let count = 0; + + for (const gobj of gobjs) { + gobj.foo = child; + } + + for (const gobj of gobjs) { + gawk.watch(gobj, obj => { + count++; + }); + } + + arr.push('a'); + arr.push('b'); + expect(count).to.equal(6); + }); + + it('should pause and resume notifications', () => { + const gobj = gawk({ foo: 'bar' }); + let counter = 0; + + gawk.watch(gobj, obj => { + counter++; + }); + + gobj.pi = 3.14; + expect(counter).to.equal(1); + + const gobj2 = new GawkObject({ wiz: 123 }); + + gobj.__gawk__.pause(); + gobj.baz = gobj2; + expect(counter).to.equal(1); + gobj.__gawk__.resume(); + expect(counter).to.equal(2); + + gobj.__gawk__.pause(); + gobj.color = 'red'; + expect(counter).to.equal(2); + gobj2.lorum = 'ipsum'; + expect(counter).to.equal(2); + gobj.__gawk__.resume(); + expect(counter).to.equal(3); + }); + + it('should notify parent when child has a merge', () => { + const gobj = gawk({}); + let count = 0; + + gawk.watch(gobj, obj => { + count++; + }); + + const child = gawk({}); + gobj.foo = child; + // { foo: {} } + expect(count).to.equal(1); + expect(child.__gawk__.parents.has(gobj)).to.be.true; + + const bar = gawk({ bar: 'wiz' }); + gawk.merge(child, bar); + // { foo: { bar: 'wiz' } } + expect(count).to.equal(2); + expect(bar.__gawk__.parents.has(child)).to.be.false; + + const foo = gobj.foo; + expect(foo.__gawk__.parents.has(gobj)).to.be.true; + + gawk.merge(child, { bar: 'wow' }); + // { foo: { bar: 'wow' } } + expect(count).to.equal(3); + expect(bar.__gawk__.parents.has(child)).to.be.false; + expect(child.__gawk__.parents.has(gobj)).to.be.true; + + expect(gobj).to.deep.equal({ foo: { bar: 'wow' } }); + }); + + it('should only notify parent one time when merging multiple objects', () => { + const gobj = gawk({ foo: 'bar' }); + let count = 0; + + gawk.watch(gobj, obj => { + count++; + }); + + gawk.merge(gobj, { baz: 'wiz' }, gawk({ pi: 3.14 })); //, { num: 123 }, gawk({ arr: ['a', 'b'] })); + expect(gobj).to.deep.equal({ foo: 'bar', baz: 'wiz', pi: 3.14 }); //, num: 123, arr: ['a', 'b'] }); + expect(count).to.equal(1); + }); + + it('should notify parent one time when child has a deep merge', () => { + const gobj = gawk({}); + let count = 0; + + gawk.watch(gobj, obj => { + count++; + }); + + const child = gawk({ bar: { pow: 123 } }); + gobj.foo = child; + // { foo: { bar: { pow: 123 } } } + expect(count).to.equal(1); + + const bar = gawk({ bar: { wiz: 456 } }); + gawk.mergeDeep(child, bar); + // { foo: { bar: { pow: 123, wiz: 456 } } } + expect(count).to.equal(2); + + const foo = gobj.foo; + expect(foo.__gawk__.parents.has(gobj)).to.be.true; + + gawk.mergeDeep(child, { bar: { paz: 789 } }); + // { foo: { bar: { pow: 123, wiz: 456, paz: 789 } } } + expect(count).to.equal(3); + expect(bar.__gawk__.parents.has(child)).to.be.false; + + expect(gobj).to.deep.equal({ foo: { bar: { pow: 123, wiz: 456, paz: 789 } } }); + }); + + it('should only notify parent one time when merging multiple objects', () => { + const gobj = gawk({ foo: { bar: { baz: 'wiz' } } }); + let count = 0; + + gawk.watch(gobj, obj => { + count++; + }); + + gawk.mergeDeep(gobj, { foo: { bar: { baz: 'wow' } } }); + expect(gobj).to.deep.equal({ foo: { bar: { baz: 'wow' } } }); + expect(count).to.equal(1); + }); + + it('should only notify if value is uniquely changed', () => { + const garr = gawk(['a']); + let count = 0; + + gawk.watch(garr, obj => { + count++; + }); + + garr.push('b'); + expect(count).to.equal(1); + + garr[1] = 'b'; + expect(count).to.equal(1); + + garr[1] = 'c'; + expect(count).to.equal(2); + }); + + it('should be notified when array changes', () => { + let count = 0; + const gobj = gawk(['a', 'b']); + + gawk.watch(gobj, obj => { + count++; + }); + + gobj.push('c'); + gobj.pop(); + gobj.unshift('d'); + gobj.shift(); + }); + + it('should be notified when deeply nested children change', () => { + let count1 = 0; + let count2 = 0; + let count3 = 0; + + const arr1 = gawk([]); + const arr2 = gawk([]); + const arr3 = gawk([]); + + arr1.push(arr2); + arr2.push(arr3); + + expect(arr2.__gawk__.parents.has(arr1)).to.be.true; + expect(arr3.__gawk__.parents.has(arr2)).to.be.true; + + gawk.watch(arr1, obj => { + count1++; + }); + + gawk.watch(arr2, obj => { + count2++; + }); + + gawk.watch(arr3, obj => { + count3++; + }); + + arr3.push('foo'); + + expect(count1).to.equal(1); + expect(count2).to.equal(1); + expect(count3).to.equal(1); + + expect(arr3.length).to.equal(1); + expect(arr3).to.deep.equal(['foo']); + + expect(arr2.length).to.equal(1); + expect(arr2).to.deep.equal([['foo']]); + + expect(arr1.length).to.equal(1); + expect(arr1).to.deep.equal([[['foo']]]); + }); + + it('should notify parent if property is deleted', () => { + const gobj = gawk({ foo: { bar: 'baz' } }); + + let count = 0; + gawk.watch(gobj, obj => { + count++; + }); + + expect(gobj).to.deep.equal({ foo: { bar: 'baz' } }); + delete gobj.foo; + expect(gobj).to.deep.equal({}); + + expect(count).to.equal(1); + }); + + it('should notify parent if index is deleted', () => { + const gobj = gawk({ foo: { bar: [ 'baz' ] } }); + + let count = 0; + gawk.watch(gobj, obj => { + count++; + }); + + expect(gobj).to.deep.equal({ foo: { bar: [ 'baz' ] } }); + delete gobj.foo.bar[0]; + expect(gobj).to.deep.equal({ foo: { bar: [] } }); + + expect(count).to.equal(1); + }); + + it('should copy listeners from another gawk object', () => { + const gobj = gawk({ foo: 'bar' }); + + let count = 0; + gawk.watch(gobj, obj => { + count++; + }); + + const gobj2 = new GawkObject(gobj); + expect(gobj2).to.deep.equal({ foo: 'bar' }); + + gobj2.baz = 'wiz'; + expect(gobj2).to.deep.equal({ foo: 'bar', baz: 'wiz' }); + expect(count).to.equal(1); + }); +}); + +describe('gawk.unwatch()', () => { + it('should fail to unwatch with non-gawk or object type', () => { + expect(() => { + gawk.unwatch('foo'); + }).to.throw(TypeError, 'Expected source to be a GawkArray or GawkObject'); + + expect(() => { + gawk.unwatch({}); + }).to.throw(TypeError, 'Expected source to be a GawkArray or GawkObject'); + }); + + it('should fail to unwatch with non-function listener', () => { + expect(() => { + gawk.unwatch(gawk({})); + }).to.throw(TypeError, 'Expected listener to be a function'); + + expect(() => { + gawk.unwatch(gawk({}), 'foo'); + }).to.throw(TypeError, 'Expected listener to be a function'); + }); + + it('should unwatch GawkObject changes', () => { + const gobj = gawk({}); + let count = 0; + const listener = () => { + count++; + }; + + gawk.watch(gobj, listener); + + gobj.a = 'b'; + gobj.c = 'd'; + + gawk.unwatch(gobj, listener); + + gobj.e = 'f'; + gobj.g = 'h'; + + expect(count).to.equal(2); + }); + + it('should unwatch GawkArray changes', () => { + const garr = gawk(['a']); + let count = 0; + const listener = obj => { + count++; + }; + + gawk.watch(garr, listener); + + garr.unshift('b'); + garr.unshift('c'); + + gawk.unwatch(garr, listener); + + garr.unshift('d'); + garr.unshift('e'); + + expect(count).to.equal(2); + }); +}); diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..ea78d96 --- /dev/null +++ b/yarn.lock @@ -0,0 +1,3617 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 +abab@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.3.tgz#b81de5f7274ec4e756d797cd834f303642724e5d" + +abbrev@1, abbrev@1.0.x: + version "1.0.9" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" + +acorn-globals@^1.0.4: + version "1.0.9" + resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-1.0.9.tgz#55bb5e98691507b74579d0513413217c380c54cf" + dependencies: + acorn "^2.1.0" + +acorn-jsx@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b" + dependencies: + acorn "^3.0.4" + +acorn@^2.1.0, acorn@^2.4.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-2.7.0.tgz#ab6e7d9d886aaca8b085bc3312b79a198433f0e7" + +acorn@^3.0.4: + version "3.3.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" + +acorn@^4.0.1, acorn@4.X: + version "4.0.3" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.3.tgz#1a3e850b428e73ba6b09d1cc527f5aaad4d03ef1" + +ajv-keywords@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.1.1.tgz#02550bc605a3e576041565628af972e06c549d50" + +ajv@^4.7.0: + version "4.8.2" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.8.2.tgz#65486936ca36fea39a1504332a78bebd5d447bdc" + dependencies: + co "^4.6.0" + json-stable-stringify "^1.0.1" + +align-text@^0.1.1, align-text@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" + dependencies: + kind-of "^3.0.2" + longest "^1.0.1" + repeat-string "^1.5.2" + +amdefine@>=0.0.4: + version "1.0.1" + resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" + +ansi-escapes@^1.1.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" + +ansi-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.0.0.tgz#c5061b6e0ef8a81775e50f5d66151bf6bf371107" + +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + +archy@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40" + +argparse@^1.0.7: + version "1.0.9" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86" + dependencies: + sprintf-js "~1.0.2" + +arr-diff@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" + dependencies: + arr-flatten "^1.0.1" + +arr-flatten@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.0.1.tgz#e5ffe54d45e19f32f216e91eb99c8ce892bb604b" + +array-differ@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-1.0.0.tgz#eff52e3758249d33be402b8bb8e564bb2b5d4031" + +array-find-index@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" + +array-union@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" + dependencies: + array-uniq "^1.0.1" + +array-uniq@^1.0.1, array-uniq@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" + +array-unique@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" + +arrify@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + +asn1@~0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" + +assert-plus@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" + +assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + +assertion-error@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.0.2.tgz#13ca515d86206da0bac66e834dd397d87581094c" + +async@^1.4.0, async@~1.5.2, async@1.x: + version "1.5.2" + resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" + +async@^2.0.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/async/-/async-2.1.2.tgz#612a4ab45ef42a70cde806bad86ee6db047e8385" + dependencies: + lodash "^4.14.0" + +async@~0.2.6: + version "0.2.10" + resolved "https://registry.yarnpkg.com/async/-/async-0.2.10.tgz#b6bbe0b0674b9d719708ca38de8c237cb526c3d1" + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + +atob@~1.1.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/atob/-/atob-1.1.3.tgz#95f13629b12c3a51a5d215abdce2aa9f32f80773" + +aws-sign2@~0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" + +aws4@^1.2.1: + version "1.5.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.5.0.tgz#0a29ffb79c31c9e712eeb087e8e7a64b4a56d755" + +babel-code-frame@^6.16.0: + version "6.16.0" + resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.16.0.tgz#f90e60da0862909d3ce098733b5d3987c97cb8de" + dependencies: + chalk "^1.1.0" + esutils "^2.0.2" + js-tokens "^2.0.0" + +babel-core@^6.0.2, babel-core@^6.14.0, babel-core@^6.18.0: + version "6.18.2" + resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.18.2.tgz#d8bb14dd6986fa4f3566a26ceda3964fa0e04e5b" + dependencies: + babel-code-frame "^6.16.0" + babel-generator "^6.18.0" + babel-helpers "^6.16.0" + babel-messages "^6.8.0" + babel-register "^6.18.0" + babel-runtime "^6.9.1" + babel-template "^6.16.0" + babel-traverse "^6.18.0" + babel-types "^6.18.0" + babylon "^6.11.0" + convert-source-map "^1.1.0" + debug "^2.1.1" + json5 "^0.5.0" + lodash "^4.2.0" + minimatch "^3.0.2" + path-is-absolute "^1.0.0" + private "^0.1.6" + slash "^1.0.0" + source-map "^0.5.0" + +babel-eslint@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-7.1.0.tgz#d506a5174ba224e25a2d17e128e2ba8987139ddc" + dependencies: + babel-traverse "^6.15.0" + babel-types "^6.15.0" + babylon "^6.11.2" + lodash.pickby "^4.6.0" + +babel-generator@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.18.0.tgz#e4f104cb3063996d9850556a45aae4a022060a07" + dependencies: + babel-messages "^6.8.0" + babel-runtime "^6.9.0" + babel-types "^6.18.0" + detect-indent "^4.0.0" + jsesc "^1.3.0" + lodash "^4.2.0" + source-map "^0.5.0" + +babel-helper-call-delegate@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.18.0.tgz#05b14aafa430884b034097ef29e9f067ea4133bd" + dependencies: + babel-helper-hoist-variables "^6.18.0" + babel-runtime "^6.0.0" + babel-traverse "^6.18.0" + babel-types "^6.18.0" + +babel-helper-define-map@^6.18.0, babel-helper-define-map@^6.8.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.18.0.tgz#8d6c85dc7fbb4c19be3de40474d18e97c3676ec2" + dependencies: + babel-helper-function-name "^6.18.0" + babel-runtime "^6.9.0" + babel-types "^6.18.0" + lodash "^4.2.0" + +babel-helper-function-name@^6.18.0, babel-helper-function-name@^6.8.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.18.0.tgz#68ec71aeba1f3e28b2a6f0730190b754a9bf30e6" + dependencies: + babel-helper-get-function-arity "^6.18.0" + babel-runtime "^6.0.0" + babel-template "^6.8.0" + babel-traverse "^6.18.0" + babel-types "^6.18.0" + +babel-helper-get-function-arity@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.18.0.tgz#a5b19695fd3f9cdfc328398b47dafcd7094f9f24" + dependencies: + babel-runtime "^6.0.0" + babel-types "^6.18.0" + +babel-helper-hoist-variables@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.18.0.tgz#a835b5ab8b46d6de9babefae4d98ea41e866b82a" + dependencies: + babel-runtime "^6.0.0" + babel-types "^6.18.0" + +babel-helper-optimise-call-expression@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.18.0.tgz#9261d0299ee1a4f08a6dd28b7b7c777348fd8f0f" + dependencies: + babel-runtime "^6.0.0" + babel-types "^6.18.0" + +babel-helper-regex@^6.8.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-helper-regex/-/babel-helper-regex-6.18.0.tgz#ae0ebfd77de86cb2f1af258e2cc20b5fe893ecc6" + dependencies: + babel-runtime "^6.9.0" + babel-types "^6.18.0" + lodash "^4.2.0" + +babel-helper-replace-supers@^6.18.0, babel-helper-replace-supers@^6.8.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.18.0.tgz#28ec69877be4144dbd64f4cc3a337e89f29a924e" + dependencies: + babel-helper-optimise-call-expression "^6.18.0" + babel-messages "^6.8.0" + babel-runtime "^6.0.0" + babel-template "^6.16.0" + babel-traverse "^6.18.0" + babel-types "^6.18.0" + +babel-helpers@^6.16.0: + version "6.16.0" + resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.16.0.tgz#1095ec10d99279460553e67eb3eee9973d3867e3" + dependencies: + babel-runtime "^6.0.0" + babel-template "^6.16.0" + +babel-istanbul@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/babel-istanbul/-/babel-istanbul-0.11.0.tgz#86b86aab9fed21af9fed5a495ccc7231fcaad1d5" + dependencies: + abbrev "1.0.x" + async "1.x" + escodegen "1.8.x" + esprima "2.7.x" + fileset "0.2.x" + handlebars "4.0.x" + js-yaml "3.x" + mkdirp "0.5.x" + nopt "3.x" + object-assign "^4.0.1" + once "1.x" + resolve "1.1.x" + source-map "0.4.x" + supports-color "3.1.x" + which "1.2.x" + wordwrap "1.0.x" + +babel-messages@^6.8.0: + version "6.8.0" + resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.8.0.tgz#bf504736ca967e6d65ef0adb5a2a5f947c8e0eb9" + dependencies: + babel-runtime "^6.0.0" + +babel-plugin-check-es2015-constants@^6.3.13: + version "6.8.0" + resolved "https://registry.yarnpkg.com/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.8.0.tgz#dbf024c32ed37bfda8dee1e76da02386a8d26fe7" + dependencies: + babel-runtime "^6.0.0" + +babel-plugin-transform-es2015-arrow-functions@^6.3.13: + version "6.8.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.8.0.tgz#5b63afc3181bdc9a8c4d481b5a4f3f7d7fef3d9d" + dependencies: + babel-runtime "^6.0.0" + +babel-plugin-transform-es2015-block-scoped-functions@^6.3.13: + version "6.8.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.8.0.tgz#ed95d629c4b5a71ae29682b998f70d9833eb366d" + dependencies: + babel-runtime "^6.0.0" + +babel-plugin-transform-es2015-block-scoping@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.18.0.tgz#3bfdcfec318d46df22525cdea88f1978813653af" + dependencies: + babel-runtime "^6.9.0" + babel-template "^6.15.0" + babel-traverse "^6.18.0" + babel-types "^6.18.0" + lodash "^4.2.0" + +babel-plugin-transform-es2015-classes@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.18.0.tgz#ffe7a17321bf83e494dcda0ae3fc72df48ffd1d9" + dependencies: + babel-helper-define-map "^6.18.0" + babel-helper-function-name "^6.18.0" + babel-helper-optimise-call-expression "^6.18.0" + babel-helper-replace-supers "^6.18.0" + babel-messages "^6.8.0" + babel-runtime "^6.9.0" + babel-template "^6.14.0" + babel-traverse "^6.18.0" + babel-types "^6.18.0" + +babel-plugin-transform-es2015-computed-properties@^6.3.13: + version "6.8.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.8.0.tgz#f51010fd61b3bd7b6b60a5fdfd307bb7a5279870" + dependencies: + babel-helper-define-map "^6.8.0" + babel-runtime "^6.0.0" + babel-template "^6.8.0" + +babel-plugin-transform-es2015-destructuring@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.18.0.tgz#a08fb89415ab82058649558bedb7bf8dafa76ba5" + dependencies: + babel-runtime "^6.9.0" + +babel-plugin-transform-es2015-duplicate-keys@^6.6.0: + version "6.8.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.8.0.tgz#fd8f7f7171fc108cc1c70c3164b9f15a81c25f7d" + dependencies: + babel-runtime "^6.0.0" + babel-types "^6.8.0" + +babel-plugin-transform-es2015-for-of@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.18.0.tgz#4c517504db64bf8cfc119a6b8f177211f2028a70" + dependencies: + babel-runtime "^6.0.0" + +babel-plugin-transform-es2015-function-name@^6.9.0: + version "6.9.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.9.0.tgz#8c135b17dbd064e5bba56ec511baaee2fca82719" + dependencies: + babel-helper-function-name "^6.8.0" + babel-runtime "^6.9.0" + babel-types "^6.9.0" + +babel-plugin-transform-es2015-literals@^6.3.13: + version "6.8.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.8.0.tgz#50aa2e5c7958fc2ab25d74ec117e0cc98f046468" + dependencies: + babel-runtime "^6.0.0" + +babel-plugin-transform-es2015-modules-amd@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.18.0.tgz#49a054cbb762bdf9ae2d8a807076cfade6141e40" + dependencies: + babel-plugin-transform-es2015-modules-commonjs "^6.18.0" + babel-runtime "^6.0.0" + babel-template "^6.8.0" + +babel-plugin-transform-es2015-modules-commonjs@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.18.0.tgz#c15ae5bb11b32a0abdcc98a5837baa4ee8d67bcc" + dependencies: + babel-plugin-transform-strict-mode "^6.18.0" + babel-runtime "^6.0.0" + babel-template "^6.16.0" + babel-types "^6.18.0" + +babel-plugin-transform-es2015-modules-systemjs@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.18.0.tgz#f09294707163edae4d3b3e8bfacecd01d920b7ad" + dependencies: + babel-helper-hoist-variables "^6.18.0" + babel-runtime "^6.11.6" + babel-template "^6.14.0" + +babel-plugin-transform-es2015-modules-umd@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.18.0.tgz#23351770ece5c1f8e83ed67cb1d7992884491e50" + dependencies: + babel-plugin-transform-es2015-modules-amd "^6.18.0" + babel-runtime "^6.0.0" + babel-template "^6.8.0" + +babel-plugin-transform-es2015-object-super@^6.3.13: + version "6.8.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.8.0.tgz#1b858740a5a4400887c23dcff6f4d56eea4a24c5" + dependencies: + babel-helper-replace-supers "^6.8.0" + babel-runtime "^6.0.0" + +babel-plugin-transform-es2015-parameters@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.18.0.tgz#9b2cfe238c549f1635ba27fc1daa858be70608b1" + dependencies: + babel-helper-call-delegate "^6.18.0" + babel-helper-get-function-arity "^6.18.0" + babel-runtime "^6.9.0" + babel-template "^6.16.0" + babel-traverse "^6.18.0" + babel-types "^6.18.0" + +babel-plugin-transform-es2015-shorthand-properties@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.18.0.tgz#e2ede3b7df47bf980151926534d1dd0cbea58f43" + dependencies: + babel-runtime "^6.0.0" + babel-types "^6.18.0" + +babel-plugin-transform-es2015-spread@^6.3.13: + version "6.8.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.8.0.tgz#0217f737e3b821fa5a669f187c6ed59205f05e9c" + dependencies: + babel-runtime "^6.0.0" + +babel-plugin-transform-es2015-sticky-regex@^6.3.13: + version "6.8.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.8.0.tgz#e73d300a440a35d5c64f5c2a344dc236e3df47be" + dependencies: + babel-helper-regex "^6.8.0" + babel-runtime "^6.0.0" + babel-types "^6.8.0" + +babel-plugin-transform-es2015-template-literals@^6.6.0: + version "6.8.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.8.0.tgz#86eb876d0a2c635da4ec048b4f7de9dfc897e66b" + dependencies: + babel-runtime "^6.0.0" + +babel-plugin-transform-es2015-typeof-symbol@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.18.0.tgz#0b14c48629c90ff47a0650077f6aa699bee35798" + dependencies: + babel-runtime "^6.0.0" + +babel-plugin-transform-es2015-unicode-regex@^6.3.13: + version "6.11.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.11.0.tgz#6298ceabaad88d50a3f4f392d8de997260f6ef2c" + dependencies: + babel-helper-regex "^6.8.0" + babel-runtime "^6.0.0" + regexpu-core "^2.0.0" + +babel-plugin-transform-regenerator@^6.16.0: + version "6.16.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.16.1.tgz#a75de6b048a14154aae14b0122756c5bed392f59" + dependencies: + babel-runtime "^6.9.0" + babel-types "^6.16.0" + private "~0.1.5" + +babel-plugin-transform-strict-mode@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.18.0.tgz#df7cf2991fe046f44163dcd110d5ca43bc652b9d" + dependencies: + babel-runtime "^6.0.0" + babel-types "^6.18.0" + +babel-preset-es2015@^6.14.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-preset-es2015/-/babel-preset-es2015-6.18.0.tgz#b8c70df84ec948c43dcf2bf770e988eb7da88312" + dependencies: + babel-plugin-check-es2015-constants "^6.3.13" + babel-plugin-transform-es2015-arrow-functions "^6.3.13" + babel-plugin-transform-es2015-block-scoped-functions "^6.3.13" + babel-plugin-transform-es2015-block-scoping "^6.18.0" + babel-plugin-transform-es2015-classes "^6.18.0" + babel-plugin-transform-es2015-computed-properties "^6.3.13" + babel-plugin-transform-es2015-destructuring "^6.18.0" + babel-plugin-transform-es2015-duplicate-keys "^6.6.0" + babel-plugin-transform-es2015-for-of "^6.18.0" + babel-plugin-transform-es2015-function-name "^6.9.0" + babel-plugin-transform-es2015-literals "^6.3.13" + babel-plugin-transform-es2015-modules-amd "^6.18.0" + babel-plugin-transform-es2015-modules-commonjs "^6.18.0" + babel-plugin-transform-es2015-modules-systemjs "^6.18.0" + babel-plugin-transform-es2015-modules-umd "^6.18.0" + babel-plugin-transform-es2015-object-super "^6.3.13" + babel-plugin-transform-es2015-parameters "^6.18.0" + babel-plugin-transform-es2015-shorthand-properties "^6.18.0" + babel-plugin-transform-es2015-spread "^6.3.13" + babel-plugin-transform-es2015-sticky-regex "^6.3.13" + babel-plugin-transform-es2015-template-literals "^6.6.0" + babel-plugin-transform-es2015-typeof-symbol "^6.18.0" + babel-plugin-transform-es2015-unicode-regex "^6.3.13" + babel-plugin-transform-regenerator "^6.16.0" + +babel-register@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.18.0.tgz#892e2e03865078dd90ad2c715111ec4449b32a68" + dependencies: + babel-core "^6.18.0" + babel-runtime "^6.11.6" + core-js "^2.4.0" + home-or-tmp "^2.0.0" + lodash "^4.2.0" + mkdirp "^0.5.1" + source-map-support "^0.4.2" + +babel-runtime@^6.0.0, babel-runtime@^6.11.6, babel-runtime@^6.9.0, babel-runtime@^6.9.1: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.18.0.tgz#0f4177ffd98492ef13b9f823e9994a02584c9078" + dependencies: + core-js "^2.4.0" + regenerator-runtime "^0.9.5" + +babel-template@^6.14.0, babel-template@^6.15.0, babel-template@^6.16.0, babel-template@^6.8.0: + version "6.16.0" + resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.16.0.tgz#e149dd1a9f03a35f817ddbc4d0481988e7ebc8ca" + dependencies: + babel-runtime "^6.9.0" + babel-traverse "^6.16.0" + babel-types "^6.16.0" + babylon "^6.11.0" + lodash "^4.2.0" + +babel-traverse@^6.15.0, babel-traverse@^6.16.0, babel-traverse@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.18.0.tgz#5aeaa980baed2a07c8c47329cd90c3b90c80f05e" + dependencies: + babel-code-frame "^6.16.0" + babel-messages "^6.8.0" + babel-runtime "^6.9.0" + babel-types "^6.18.0" + babylon "^6.11.0" + debug "^2.2.0" + globals "^9.0.0" + invariant "^2.2.0" + lodash "^4.2.0" + +babel-types@^6.15.0, babel-types@^6.16.0, babel-types@^6.18.0, babel-types@^6.8.0, babel-types@^6.9.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.18.0.tgz#1f7d5a73474c59eb9151b2417bbff4e4fce7c3f8" + dependencies: + babel-runtime "^6.9.1" + esutils "^2.0.2" + lodash "^4.2.0" + to-fast-properties "^1.0.1" + +babylon@^6.11.0, babylon@^6.11.2: + version "6.13.1" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.13.1.tgz#adca350e088f0467647157652bafead6ddb8dfdb" + +babylon@5.8.20: + version "5.8.20" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-5.8.20.tgz#0d7a3504c796656f79c998dd3dd5a1a41cd908ba" + +balanced-match@^0.4.1: + version "0.4.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" + +bcrypt-pbkdf@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.0.tgz#3ca76b85241c7170bf7d9703e7b9aa74630040d4" + dependencies: + tweetnacl "^0.14.3" + +beeper@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/beeper/-/beeper-1.1.1.tgz#e6d5ea8c5dad001304a70b22638447f69cb2f809" + +bl@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/bl/-/bl-1.1.2.tgz#fdca871a99713aa00d19e3bbba41c44787a65398" + dependencies: + readable-stream "~2.0.5" + +boolbase@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" + +boom@2.x.x: + version "2.10.1" + resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" + dependencies: + hoek "2.x.x" + +brace-expansion@^1.0.0: + version "1.1.6" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.6.tgz#7197d7eaa9b87e648390ea61fc66c84427420df9" + dependencies: + balanced-match "^0.4.1" + concat-map "0.0.1" + +braces@^1.8.2: + version "1.8.5" + resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" + dependencies: + expand-range "^1.8.1" + preserve "^0.2.0" + repeat-element "^1.1.2" + +browser-stdout@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.0.tgz#f351d32969d32fa5d7a5567154263d928ae3bd1f" + +buffer-shims@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/buffer-shims/-/buffer-shims-1.0.0.tgz#9978ce317388c649ad8793028c3477ef044a8b51" + +bufferstreams@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/bufferstreams/-/bufferstreams-1.1.1.tgz#0161373060ac5988eff99058731114f6e195d51e" + dependencies: + readable-stream "^2.0.2" + +builtin-modules@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" + +caller-path@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f" + dependencies: + callsites "^0.2.0" + +callsites@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" + +camelcase-keys@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7" + dependencies: + camelcase "^2.0.0" + map-obj "^1.0.0" + +camelcase@^1.0.2: + version "1.2.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" + +camelcase@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" + +caseless@~0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.11.0.tgz#715b96ea9841593cc33067923f5ec60ebda4f7d7" + +center-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" + dependencies: + align-text "^0.1.3" + lazy-cache "^1.0.3" + +chai@^3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/chai/-/chai-3.5.0.tgz#4d02637b067fe958bdbfdd3a40ec56fef7373247" + dependencies: + assertion-error "^1.0.1" + deep-eql "^0.1.3" + type-detect "^1.0.0" + +chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + +cheerio@0.20.0: + version "0.20.0" + resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-0.20.0.tgz#5c710f2bab95653272842ba01c6ea61b3545ec35" + dependencies: + css-select "~1.2.0" + dom-serializer "~0.1.0" + entities "~1.1.1" + htmlparser2 "~3.8.1" + lodash "^4.1.0" + optionalDependencies: + jsdom "^7.0.2" + +circular-json@^0.3.0: + version "0.3.1" + resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.1.tgz#be8b36aefccde8b3ca7aa2d6afc07a37242c0d2d" + +cli-cursor@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987" + dependencies: + restore-cursor "^1.0.1" + +cli-width@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.1.0.tgz#b234ca209b29ef66fc518d9b98d5847b00edf00a" + +cliui@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" + dependencies: + center-align "^0.1.1" + right-align "^0.1.1" + wordwrap "0.0.2" + +clone-stats@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-0.0.1.tgz#b88f94a82cf38b8791d58046ea4029ad88ca99d1" + +clone@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/clone/-/clone-0.2.0.tgz#c6126a90ad4f72dbf5acdb243cc37724fe93fc1f" + +clone@^1.0.0, clone@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.2.tgz#260b7a99ebb1edfe247538175f783243cb19d149" + +co@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + +codeclimate-test-reporter@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/codeclimate-test-reporter/-/codeclimate-test-reporter-0.4.0.tgz#b5ce10aeed7898016a1b2411acdfaba3c67c2c28" + dependencies: + async "~1.5.2" + commander "2.9.0" + lcov-parse "0.0.10" + request "~2.74.0" + +color-logger@0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/color-logger/-/color-logger-0.0.3.tgz#d9b22dd1d973e166b18bf313f9f481bba4df2018" + +combined-stream@^1.0.5, combined-stream@~1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009" + dependencies: + delayed-stream "~1.0.0" + +commander@^2.9.0, commander@2.9.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4" + dependencies: + graceful-readlink ">= 1.0.0" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + +concat-stream@^1.4.6: + version "1.5.2" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.5.2.tgz#708978624d856af41a5a741defdd261da752c266" + dependencies: + inherits "~2.0.1" + readable-stream "~2.0.0" + typedarray "~0.0.5" + +convert-source-map@^1.1.0, convert-source-map@1.X: + version "1.3.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.3.0.tgz#e9f3e9c6e2728efc2676696a70eb382f73106a67" + +core-js@^2.4.0: + version "2.4.1" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.4.1.tgz#4de911e667b0eae9124e34254b53aea6fc618d3e" + +core-js@0.9.18: + version "0.9.18" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-0.9.18.tgz#13f458e430232b0f4ec1f480da7c2f5288e9d095" + +core-js@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.0.1.tgz#82d2284b718a03bf8bf2813d5c17177c6adacf08" + +core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + +coveralls@^2.11.15: + version "2.11.15" + resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-2.11.15.tgz#37d3474369d66c14f33fa73a9d25cee6e099fca0" + dependencies: + js-yaml "3.6.1" + lcov-parse "0.0.10" + log-driver "1.2.5" + minimist "1.2.0" + request "2.75.0" + +cryptiles@2.x.x: + version "2.0.5" + resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" + dependencies: + boom "2.x.x" + +css-select@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/css-select/-/css-select-1.2.0.tgz#2b3a110539c5355f1cd8d314623e870b121ec858" + dependencies: + boolbase "~1.0.0" + css-what "2.1" + domutils "1.5.1" + nth-check "~1.0.1" + +css-what@2.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.0.tgz#9467d032c38cfaefb9f2d79501253062f87fa1bd" + +css@2.X: + version "2.2.1" + resolved "https://registry.yarnpkg.com/css/-/css-2.2.1.tgz#73a4c81de85db664d4ee674f7d47085e3b2d55dc" + dependencies: + inherits "^2.0.1" + source-map "^0.1.38" + source-map-resolve "^0.3.0" + urix "^0.1.0" + +"cssom@>= 0.3.0 < 0.4.0", cssom@0.3.x: + version "0.3.1" + resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.1.tgz#c9e37ef2490e64f6d1baa10fda852257082c25d3" + +"cssstyle@>= 0.2.29 < 0.3.0": + version "0.2.37" + resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-0.2.37.tgz#541097234cb2513c83ceed3acddc27ff27987d54" + dependencies: + cssom "0.3.x" + +currently-unhandled@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea" + dependencies: + array-find-index "^1.0.1" + +d@^0.1.1, d@~0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/d/-/d-0.1.1.tgz#da184c535d18d8ee7ba2aa229b914009fae11309" + dependencies: + es5-ext "~0.10.2" + +dashdash@^1.12.0: + version "1.14.0" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.0.tgz#29e486c5418bf0f356034a993d51686a33e84141" + dependencies: + assert-plus "^1.0.0" + +dateformat@^1.0.11: + version "1.0.12" + resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-1.0.12.tgz#9f124b67594c937ff706932e4a642cca8dbbfee9" + dependencies: + get-stdin "^4.0.1" + meow "^3.3.0" + +debug-fabulous@0.0.X: + version "0.0.4" + resolved "https://registry.yarnpkg.com/debug-fabulous/-/debug-fabulous-0.0.4.tgz#fa071c5d87484685424807421ca4b16b0b1a0763" + dependencies: + debug "2.X" + lazy-debug-legacy "0.0.X" + object-assign "4.1.0" + +debug@^2.1.1, debug@^2.2.0, debug@2.X: + version "2.3.2" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.3.2.tgz#94cb466ef7d6d2c7e5245cdd6e4104f2d0d70d30" + dependencies: + ms "0.7.2" + +debug@2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" + dependencies: + ms "0.7.1" + +decamelize@^1.0.0, decamelize@^1.1.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + +deep-eql@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-0.1.3.tgz#ef558acab8de25206cd713906d74e56930eb69f2" + dependencies: + type-detect "0.1.1" + +deep-is@~0.1.2, deep-is@~0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" + +defaults@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" + dependencies: + clone "^1.0.2" + +del@^2.0.2, del@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" + dependencies: + globby "^5.0.0" + is-path-cwd "^1.0.0" + is-path-in-cwd "^1.0.0" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + rimraf "^2.2.8" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + +deprecated@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/deprecated/-/deprecated-0.0.1.tgz#f9c9af5464afa1e7a971458a8bdef2aa94d5bb19" + +detect-file@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/detect-file/-/detect-file-0.1.0.tgz#4935dedfd9488648e006b0129566e9386711ea63" + dependencies: + fs-exists-sync "^0.1.0" + +detect-indent@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" + dependencies: + repeating "^2.0.0" + +detect-newline@2.X: + version "2.1.0" + resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2" + +diff@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-1.4.0.tgz#7f28d2eb9ee7b15a97efd89ce63dcfdaa3ccbabf" + +doctrine@^1.2.2: + version "1.5.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" + dependencies: + esutils "^2.0.2" + isarray "^1.0.0" + +dom-serializer@~0.1.0, dom-serializer@0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.0.tgz#073c697546ce0780ce23be4a28e293e40bc30c82" + dependencies: + domelementtype "~1.1.1" + entities "~1.1.1" + +domelementtype@~1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.1.3.tgz#bd28773e2642881aec51544924299c5cd822185b" + +domelementtype@1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.0.tgz#b17aed82e8ab59e52dd9c19b1756e0fc187204c2" + +domhandler@2.3: + version "2.3.0" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.3.0.tgz#2de59a0822d5027fabff6f032c2b25a2a8abe738" + dependencies: + domelementtype "1" + +domutils@1.5, domutils@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf" + dependencies: + dom-serializer "0" + domelementtype "1" + +duplexer2@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.0.2.tgz#c614dcf67e2fb14995a91711e5a617e8a60a31db" + dependencies: + readable-stream "~1.1.9" + +ecc-jsbn@~0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" + dependencies: + jsbn "~0.1.0" + +end-of-stream@~0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-0.1.5.tgz#8e177206c3c80837d85632e8b9359dfe8b2f6eaf" + dependencies: + once "~1.3.0" + +entities@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.1.tgz#6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0" + +entities@1.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-1.0.0.tgz#b2987aa3821347fcde642b24fdfc9e4fb712bf26" + +error-ex@^1.2.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.0.tgz#e67b43f3e82c96ea3a584ffee0b9fc3325d802d9" + dependencies: + is-arrayish "^0.2.1" + +es5-ext@^0.10.7, es5-ext@^0.10.8, es5-ext@~0.10.11, es5-ext@~0.10.2, es5-ext@~0.10.7: + version "0.10.12" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.12.tgz#aa84641d4db76b62abba5e45fd805ecbab140047" + dependencies: + es6-iterator "2" + es6-symbol "~3.1" + +es6-iterator@2: + version "2.0.0" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.0.tgz#bd968567d61635e33c0b80727613c9cb4b096bac" + dependencies: + d "^0.1.1" + es5-ext "^0.10.7" + es6-symbol "3" + +es6-map@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/es6-map/-/es6-map-0.1.4.tgz#a34b147be224773a4d7da8072794cefa3632b897" + dependencies: + d "~0.1.1" + es5-ext "~0.10.11" + es6-iterator "2" + es6-set "~0.1.3" + es6-symbol "~3.1.0" + event-emitter "~0.3.4" + +es6-set@~0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.4.tgz#9516b6761c2964b92ff479456233a247dc707ce8" + dependencies: + d "~0.1.1" + es5-ext "~0.10.11" + es6-iterator "2" + es6-symbol "3" + event-emitter "~0.3.4" + +es6-symbol@~3.1, es6-symbol@~3.1.0, es6-symbol@3: + version "3.1.0" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.0.tgz#94481c655e7a7cad82eba832d97d5433496d7ffa" + dependencies: + d "~0.1.1" + es5-ext "~0.10.11" + +es6-weak-map@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.1.tgz#0d2bbd8827eb5fb4ba8f97fbfea50d43db21ea81" + dependencies: + d "^0.1.1" + es5-ext "^0.10.8" + es6-iterator "2" + es6-symbol "3" + +escape-html@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.2.tgz#d77d32fa98e38c2f41ae85e9278e0e0e6ba1022c" + +escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5, escape-string-regexp@1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + +escodegen@^1.6.1, escodegen@1.8.x: + version "1.8.1" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018" + dependencies: + esprima "^2.7.1" + estraverse "^1.9.1" + esutils "^2.0.2" + optionator "^0.8.1" + optionalDependencies: + source-map "~0.2.0" + +escodegen@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.7.0.tgz#4e299d8cc33087b7f29c19e2b9e84362abe35453" + dependencies: + esprima "^1.2.2" + estraverse "^1.9.1" + esutils "^2.0.2" + optionator "^0.5.0" + optionalDependencies: + source-map "~0.2.0" + +escope@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/escope/-/escope-3.6.0.tgz#e01975e812781a163a6dadfdd80398dc64c889c3" + dependencies: + es6-map "^0.1.3" + es6-weak-map "^2.0.1" + esrecurse "^4.1.0" + estraverse "^4.1.1" + +esdoc-es7-plugin@^0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/esdoc-es7-plugin/-/esdoc-es7-plugin-0.0.3.tgz#e31d2a531d08c334dd457927324b5a02f3e663a5" + dependencies: + babylon "5.8.20" + core-js "1.0.1" + estraverse "4.1.0" + +esdoc@^0.4.8: + version "0.4.8" + resolved "https://registry.yarnpkg.com/esdoc/-/esdoc-0.4.8.tgz#4972e2b6de85e2b929a330ed54b8c5f3fdcebd33" + dependencies: + cheerio "0.20.0" + color-logger "0.0.3" + core-js "0.9.18" + escape-html "1.0.2" + escodegen "1.7.0" + espree "2.2.0" + estraverse "4.1.0" + fs-extra "0.26.5" + ice-cap "0.0.4" + marked "0.3.5" + minimist "1.1.1" + taffydb "2.7.2" + +eslint@^3.0.0: + version "3.10.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.10.0.tgz#4a90079046b3a89099eaa47787eafeb081e78209" + dependencies: + babel-code-frame "^6.16.0" + chalk "^1.1.3" + concat-stream "^1.4.6" + debug "^2.1.1" + doctrine "^1.2.2" + escope "^3.6.0" + espree "^3.3.1" + estraverse "^4.2.0" + esutils "^2.0.2" + file-entry-cache "^2.0.0" + glob "^7.0.3" + globals "^9.2.0" + ignore "^3.2.0" + imurmurhash "^0.1.4" + inquirer "^0.12.0" + is-my-json-valid "^2.10.0" + is-resolvable "^1.0.0" + js-yaml "^3.5.1" + json-stable-stringify "^1.0.0" + levn "^0.3.0" + lodash "^4.0.0" + mkdirp "^0.5.0" + natural-compare "^1.4.0" + optionator "^0.8.2" + path-is-inside "^1.0.1" + pluralize "^1.2.1" + progress "^1.1.8" + require-uncached "^1.0.2" + shelljs "^0.7.5" + strip-bom "^3.0.0" + strip-json-comments "~1.0.1" + table "^3.7.8" + text-table "~0.2.0" + user-home "^2.0.0" + +espree@^3.3.1: + version "3.3.2" + resolved "https://registry.yarnpkg.com/espree/-/espree-3.3.2.tgz#dbf3fadeb4ecb4d4778303e50103b3d36c88b89c" + dependencies: + acorn "^4.0.1" + acorn-jsx "^3.0.0" + +espree@2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/espree/-/espree-2.2.0.tgz#01dc927a7ea5081d1a7b6d610249e624e7fef3d6" + +esprima@^1.2.2: + version "1.2.5" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-1.2.5.tgz#0993502feaf668138325756f30f9a51feeec11e9" + +esprima@^2.6.0, esprima@^2.7.1, esprima@2.7.x: + version "2.7.3" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" + +esrecurse@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.1.0.tgz#4713b6536adf7f2ac4f327d559e7756bff648220" + dependencies: + estraverse "~4.1.0" + object-assign "^4.0.1" + +estraverse@^1.9.1: + version "1.9.3" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44" + +estraverse@^4.1.1, estraverse@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" + +estraverse@~4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.1.1.tgz#f6caca728933a850ef90661d0e17982ba47111a2" + +estraverse@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.1.0.tgz#40f23a76092041be6467d7f235c933b670766e05" + +esutils@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" + +event-emitter@~0.3.4: + version "0.3.4" + resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.4.tgz#8d63ddfb4cfe1fae3b32ca265c4c720222080bb5" + dependencies: + d "~0.1.1" + es5-ext "~0.10.7" + +exit-hook@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8" + +expand-brackets@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" + dependencies: + is-posix-bracket "^0.1.0" + +expand-range@^1.8.1: + version "1.8.2" + resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" + dependencies: + fill-range "^2.1.0" + +expand-tilde@^1.2.1, expand-tilde@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-1.2.2.tgz#0b81eba897e5a3d31d1c3d102f8f01441e559449" + dependencies: + os-homedir "^1.0.1" + +extend@^3.0.0, extend@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.0.tgz#5a474353b9f3353ddd8176dfd37b91c83a46f1d4" + +extglob@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" + dependencies: + is-extglob "^1.0.0" + +extsprintf@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.0.2.tgz#e1080e0658e300b06294990cc70e1502235fd550" + +fancy-log@^1.1.0, fancy-log@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-1.2.0.tgz#d5a51b53e9ab22ca07d558f2b67ae55fdb5fcbd8" + dependencies: + chalk "^1.1.1" + time-stamp "^1.0.0" + +fast-levenshtein@~1.0.0: + version "1.0.7" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-1.0.7.tgz#0178dcdee023b92905193af0959e8a7639cfdcb9" + +fast-levenshtein@~2.0.4: + version "2.0.5" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.5.tgz#bd33145744519ab1c36c3ee9f31f08e9079b67f2" + +figures@^1.3.5: + version "1.7.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" + dependencies: + escape-string-regexp "^1.0.5" + object-assign "^4.1.0" + +file-entry-cache@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-2.0.0.tgz#c392990c3e684783d838b8c84a45d8a048458361" + dependencies: + flat-cache "^1.2.1" + object-assign "^4.0.1" + +filename-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.0.tgz#996e3e80479b98b9897f15a8a58b3d084e926775" + +fileset@0.2.x: + version "0.2.1" + resolved "https://registry.yarnpkg.com/fileset/-/fileset-0.2.1.tgz#588ef8973c6623b2a76df465105696b96aac8067" + dependencies: + glob "5.x" + minimatch "2.x" + +fill-range@^2.1.0: + version "2.2.3" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723" + dependencies: + is-number "^2.1.0" + isobject "^2.0.0" + randomatic "^1.1.3" + repeat-element "^1.1.2" + repeat-string "^1.5.2" + +find-index@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/find-index/-/find-index-0.1.1.tgz#675d358b2ca3892d795a1ab47232f8b6e2e0dde4" + +find-up@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" + dependencies: + path-exists "^2.0.0" + pinkie-promise "^2.0.0" + +findup-sync@^0.4.0, findup-sync@^0.4.2: + version "0.4.3" + resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-0.4.3.tgz#40043929e7bc60adf0b7f4827c4c6e75a0deca12" + dependencies: + detect-file "^0.1.0" + is-glob "^2.0.1" + micromatch "^2.3.7" + resolve-dir "^0.1.0" + +fined@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/fined/-/fined-1.0.2.tgz#5b28424b760d7598960b7ef8480dff8ad3660e97" + dependencies: + expand-tilde "^1.2.1" + lodash.assignwith "^4.0.7" + lodash.isempty "^4.2.1" + lodash.isplainobject "^4.0.4" + lodash.isstring "^4.0.1" + lodash.pick "^4.2.1" + parse-filepath "^1.0.1" + +first-chunk-stream@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz#59bfb50cd905f60d7c394cd3d9acaab4e6ad934e" + +flagged-respawn@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/flagged-respawn/-/flagged-respawn-0.3.2.tgz#ff191eddcd7088a675b2610fffc976be9b8074b5" + +flat-cache@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.2.1.tgz#6c837d6225a7de5659323740b36d5361f71691ff" + dependencies: + circular-json "^0.3.0" + del "^2.0.2" + graceful-fs "^4.1.2" + write "^0.2.1" + +for-in@^0.1.5: + version "0.1.6" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-0.1.6.tgz#c9f96e89bfad18a545af5ec3ed352a1d9e5b4dc8" + +for-own@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.4.tgz#0149b41a39088c7515f51ebe1c1386d45f935072" + dependencies: + for-in "^0.1.5" + +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + +form-data@~1.0.0-rc4: + version "1.0.1" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-1.0.1.tgz#ae315db9a4907fa065502304a66d7733475ee37c" + dependencies: + async "^2.0.1" + combined-stream "^1.0.5" + mime-types "^2.1.11" + +form-data@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.0.0.tgz#6f0aebadcc5da16c13e1ecc11137d85f9b883b25" + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.5" + mime-types "^2.1.11" + +form-data@~2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.2.tgz#89c3534008b97eada4cbb157d58f6f5df025eae4" + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.5" + mime-types "^2.1.12" + +formatio@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/formatio/-/formatio-1.1.1.tgz#5ed3ccd636551097383465d996199100e86161e9" + dependencies: + samsam "~1.1" + +fs-exists-sync@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz#982d6893af918e72d08dec9e8673ff2b5a8d6add" + +fs-extra@0.26.5: + version "0.26.5" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.26.5.tgz#53ac74667ca083fd2dc1712c813039ca32d69a7f" + dependencies: + graceful-fs "^4.1.2" + jsonfile "^2.1.0" + klaw "^1.0.0" + path-is-absolute "^1.0.0" + rimraf "^2.2.8" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + +gaze@^0.5.1: + version "0.5.2" + resolved "https://registry.yarnpkg.com/gaze/-/gaze-0.5.2.tgz#40b709537d24d1d45767db5a908689dfe69ac44f" + dependencies: + globule "~0.1.0" + +generate-function@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74" + +generate-object-property@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/generate-object-property/-/generate-object-property-1.2.0.tgz#9c0e1c40308ce804f4783618b937fa88f99d50d0" + dependencies: + is-property "^1.0.0" + +get-stdin@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" + +getpass@^0.1.1: + version "0.1.6" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.6.tgz#283ffd9fc1256840875311c1b60e8c40187110e6" + dependencies: + assert-plus "^1.0.0" + +glob-base@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" + dependencies: + glob-parent "^2.0.0" + is-glob "^2.0.0" + +glob-parent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" + dependencies: + is-glob "^2.0.0" + +glob-stream@^3.1.5: + version "3.1.18" + resolved "https://registry.yarnpkg.com/glob-stream/-/glob-stream-3.1.18.tgz#9170a5f12b790306fdfe598f313f8f7954fd143b" + dependencies: + glob "^4.3.1" + glob2base "^0.0.12" + minimatch "^2.0.1" + ordered-read-streams "^0.1.0" + through2 "^0.6.1" + unique-stream "^1.0.0" + +glob-watcher@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/glob-watcher/-/glob-watcher-0.0.6.tgz#b95b4a8df74b39c83298b0c05c978b4d9a3b710b" + dependencies: + gaze "^0.5.1" + +glob@^4.3.1: + version "4.5.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-4.5.3.tgz#c6cb73d3226c1efef04de3c56d012f03377ee15f" + dependencies: + inflight "^1.0.4" + inherits "2" + minimatch "^2.0.1" + once "^1.3.0" + +glob@^7.0.0, glob@^7.0.3, glob@^7.0.5: + version "7.1.1" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.2" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@~3.1.21: + version "3.1.21" + resolved "https://registry.yarnpkg.com/glob/-/glob-3.1.21.tgz#d29e0a055dea5138f4d07ed40e8982e83c2066cd" + dependencies: + graceful-fs "~1.2.0" + inherits "1" + minimatch "~0.2.11" + +glob@5.x: + version "5.0.15" + resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" + dependencies: + inflight "^1.0.4" + inherits "2" + minimatch "2 || 3" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@7.0.5: + version "7.0.5" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.0.5.tgz#b4202a69099bbb4d292a7c1b95b6682b67ebdc95" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.2" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob2base@^0.0.12: + version "0.0.12" + resolved "https://registry.yarnpkg.com/glob2base/-/glob2base-0.0.12.tgz#9d419b3e28f12e83a362164a277055922c9c0d56" + dependencies: + find-index "^0.1.1" + +global-modules@^0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-0.2.3.tgz#ea5a3bed42c6d6ce995a4f8a1269b5dae223828d" + dependencies: + global-prefix "^0.1.4" + is-windows "^0.2.0" + +global-prefix@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-0.1.4.tgz#05158db1cde2dd491b455e290eb3ab8bfc45c6e1" + dependencies: + ini "^1.3.4" + is-windows "^0.2.0" + osenv "^0.1.3" + which "^1.2.10" + +globals@^9.0.0, globals@^9.2.0: + version "9.13.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-9.13.0.tgz#d97706b61600d8dbe94708c367d3fdcf48470b8f" + +globby@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" + dependencies: + array-union "^1.0.1" + arrify "^1.0.0" + glob "^7.0.3" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +globule@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/globule/-/globule-0.1.0.tgz#d9c8edde1da79d125a151b79533b978676346ae5" + dependencies: + glob "~3.1.21" + lodash "~1.0.1" + minimatch "~0.2.11" + +glogg@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/glogg/-/glogg-1.0.0.tgz#7fe0f199f57ac906cf512feead8f90ee4a284fc5" + dependencies: + sparkles "^1.0.0" + +graceful-fs@^3.0.0: + version "3.0.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-3.0.11.tgz#7613c778a1afea62f25c630a086d7f3acbbdd818" + dependencies: + natives "^1.1.0" + +graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@4.X: + version "4.1.10" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.10.tgz#f2d720c22092f743228775c75e3612632501f131" + +graceful-fs@~1.2.0: + version "1.2.3" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-1.2.3.tgz#15a4806a57547cb2d2dbf27f42e89a8c3451b364" + +"graceful-readlink@>= 1.0.0": + version "1.0.1" + resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" + +growl@1.9.2: + version "1.9.2" + resolved "https://registry.yarnpkg.com/growl/-/growl-1.9.2.tgz#0ea7743715db8d8de2c5ede1775e1b45ac85c02f" + +gulp-babel-istanbul@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/gulp-babel-istanbul/-/gulp-babel-istanbul-1.5.0.tgz#2f6d97e6cfecbee9a2159f8731c417147b2b2260" + dependencies: + babel-core "^6.14.0" + babel-istanbul "^0.11.0" + babel-preset-es2015 "^6.14.0" + gulp-util "^3.0.7" + lodash "^4.15.0" + through2 "^2.0.1" + +gulp-babel@^6.1.2: + version "6.1.2" + resolved "https://registry.yarnpkg.com/gulp-babel/-/gulp-babel-6.1.2.tgz#7c0176e4ba3f244c60588a0c4b320a45d1adefce" + dependencies: + babel-core "^6.0.2" + gulp-util "^3.0.0" + object-assign "^4.0.1" + replace-ext "0.0.1" + through2 "^2.0.0" + vinyl-sourcemaps-apply "^0.2.0" + +gulp-debug@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/gulp-debug/-/gulp-debug-3.0.0.tgz#8388308e00753b9122b0f88e4ffaf2a3e1c4d0d5" + dependencies: + chalk "^1.0.0" + gulp-util "^3.0.0" + plur "^2.0.0" + stringify-object "^3.0.0" + through2 "^2.0.0" + tildify "^1.1.2" + +gulp-esdoc@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/gulp-esdoc/-/gulp-esdoc-0.3.0.tgz#1ef2e63fb8bc280a356d4a41225e6de1f33a0bad" + dependencies: + esdoc "^0.4.8" + gulp-util "^3.0.7" + through2 "^2.0.1" + +gulp-eslint@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/gulp-eslint/-/gulp-eslint-3.0.1.tgz#04e57e3e18c6974267c12cf6855dc717d4a313bd" + dependencies: + bufferstreams "^1.1.1" + eslint "^3.0.0" + gulp-util "^3.0.6" + +gulp-filter@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/gulp-filter/-/gulp-filter-4.0.0.tgz#395f58a256c559cdb9e0d157f1caaf5248a38dcb" + dependencies: + gulp-util "^3.0.6" + multimatch "^2.0.0" + streamfilter "^1.0.5" + +gulp-inject-modules@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/gulp-inject-modules/-/gulp-inject-modules-1.0.0.tgz#16aaaf7c365239fd950858b5a7e4314ec66a8cbe" + dependencies: + source-map-support "^0.4.0" + through2 "^2.0.1" + +gulp-load-plugins@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/gulp-load-plugins/-/gulp-load-plugins-1.4.0.tgz#82fab03715ecf1838a958ec643a4d74274ddfece" + dependencies: + array-unique "^0.2.1" + fancy-log "^1.2.0" + findup-sync "^0.4.0" + gulplog "^1.0.0" + has-gulplog "^0.1.0" + micromatch "^2.3.8" + resolve "^1.1.7" + +gulp-mocha@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/gulp-mocha/-/gulp-mocha-3.0.1.tgz#ab0ca2c39403718174dddad750e63a61be17e041" + dependencies: + gulp-util "^3.0.0" + mocha "^3.0.0" + plur "^2.1.0" + req-cwd "^1.0.1" + temp "^0.8.3" + through "^2.3.4" + +gulp-plumber@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/gulp-plumber/-/gulp-plumber-1.1.0.tgz#f12176c2d0422f60306c242fff6a01a394faba09" + dependencies: + gulp-util "^3" + through2 "^2" + +gulp-sourcemaps@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/gulp-sourcemaps/-/gulp-sourcemaps-2.2.0.tgz#dea8a4dc9aa74630a04ae9cf1871a7a08bc1310d" + dependencies: + acorn "4.X" + convert-source-map "1.X" + css "2.X" + debug-fabulous "0.0.X" + detect-newline "2.X" + graceful-fs "4.X" + source-map "0.X" + strip-bom "3.X" + through2 "2.X" + vinyl "1.X" + +gulp-util@^3, gulp-util@^3.0.0, gulp-util@^3.0.6, gulp-util@^3.0.7: + version "3.0.7" + resolved "https://registry.yarnpkg.com/gulp-util/-/gulp-util-3.0.7.tgz#78925c4b8f8b49005ac01a011c557e6218941cbb" + dependencies: + array-differ "^1.0.0" + array-uniq "^1.0.2" + beeper "^1.0.0" + chalk "^1.0.0" + dateformat "^1.0.11" + fancy-log "^1.1.0" + gulplog "^1.0.0" + has-gulplog "^0.1.0" + lodash._reescape "^3.0.0" + lodash._reevaluate "^3.0.0" + lodash._reinterpolate "^3.0.0" + lodash.template "^3.0.0" + minimist "^1.1.0" + multipipe "^0.1.2" + object-assign "^3.0.0" + replace-ext "0.0.1" + through2 "^2.0.0" + vinyl "^0.5.0" + +gulp@^3.9.1: + version "3.9.1" + resolved "https://registry.yarnpkg.com/gulp/-/gulp-3.9.1.tgz#571ce45928dd40af6514fc4011866016c13845b4" + dependencies: + archy "^1.0.0" + chalk "^1.0.0" + deprecated "^0.0.1" + gulp-util "^3.0.0" + interpret "^1.0.0" + liftoff "^2.1.0" + minimist "^1.1.0" + orchestrator "^0.3.0" + pretty-hrtime "^1.0.0" + semver "^4.1.0" + tildify "^1.0.0" + v8flags "^2.0.2" + vinyl-fs "^0.3.0" + +gulplog@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/gulplog/-/gulplog-1.0.0.tgz#e28c4d45d05ecbbed818363ce8f9c5926229ffe5" + dependencies: + glogg "^1.0.0" + +handlebars@4.0.x: + version "4.0.5" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.5.tgz#92c6ed6bb164110c50d4d8d0fbddc70806c6f8e7" + dependencies: + async "^1.4.0" + optimist "^0.6.1" + source-map "^0.4.4" + optionalDependencies: + uglify-js "^2.6" + +har-validator@~2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-2.0.6.tgz#cdcbc08188265ad119b6a5a7c8ab70eecfb5d27d" + dependencies: + chalk "^1.1.1" + commander "^2.9.0" + is-my-json-valid "^2.12.4" + pinkie-promise "^2.0.0" + +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + dependencies: + ansi-regex "^2.0.0" + +has-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" + +has-gulplog@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/has-gulplog/-/has-gulplog-0.1.0.tgz#6414c82913697da51590397dafb12f22967811ce" + dependencies: + sparkles "^1.0.0" + +hawk@~3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" + dependencies: + boom "2.x.x" + cryptiles "2.x.x" + hoek "2.x.x" + sntp "1.x.x" + +hoek@2.x.x: + version "2.16.3" + resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" + +home-or-tmp@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.1" + +hosted-git-info@^2.1.4: + version "2.1.5" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.1.5.tgz#0ba81d90da2e25ab34a332e6ec77936e1598118b" + +htmlparser2@~3.8.1: + version "3.8.3" + resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.8.3.tgz#996c28b191516a8be86501a7d79757e5c70c1068" + dependencies: + domelementtype "1" + domhandler "2.3" + domutils "1.5" + entities "1.0" + readable-stream "1.1" + +http-signature@~1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" + dependencies: + assert-plus "^0.2.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +ice-cap@0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/ice-cap/-/ice-cap-0.0.4.tgz#8a6d31ab4cac8d4b56de4fa946df3352561b6e18" + dependencies: + cheerio "0.20.0" + color-logger "0.0.3" + +ignore@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.2.0.tgz#8d88f03c3002a0ac52114db25d2c673b0bf1e435" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + +indent-string@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80" + dependencies: + repeating "^2.0.0" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@^2.0.1, inherits@~2.0.1, inherits@2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + +inherits@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-1.0.2.tgz#ca4309dadee6b54cc0b8d247e8d7c7a0975bdc9b" + +inherits@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" + +ini@^1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" + +inquirer@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-0.12.0.tgz#1ef2bfd63504df0bc75785fff8c2c41df12f077e" + dependencies: + ansi-escapes "^1.1.0" + ansi-regex "^2.0.0" + chalk "^1.0.0" + cli-cursor "^1.0.1" + cli-width "^2.0.0" + figures "^1.3.5" + lodash "^4.3.0" + readline2 "^1.0.1" + run-async "^0.1.0" + rx-lite "^3.1.2" + string-width "^1.0.1" + strip-ansi "^3.0.0" + through "^2.3.6" + +interpret@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.1.tgz#d579fb7f693b858004947af39fa0db49f795602c" + +invariant@^2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.1.tgz#b097010547668c7e337028ebe816ebe36c8a8d54" + dependencies: + loose-envify "^1.0.0" + +irregular-plurals@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/irregular-plurals/-/irregular-plurals-1.2.0.tgz#38f299834ba8c00c30be9c554e137269752ff3ac" + +is-absolute@^0.2.3: + version "0.2.6" + resolved "https://registry.yarnpkg.com/is-absolute/-/is-absolute-0.2.6.tgz#20de69f3db942ef2d87b9c2da36f172235b1b5eb" + dependencies: + is-relative "^0.2.1" + is-windows "^0.2.0" + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + +is-buffer@^1.0.2: + version "1.1.4" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.4.tgz#cfc86ccd5dc5a52fa80489111c6920c457e2d98b" + +is-builtin-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" + dependencies: + builtin-modules "^1.0.0" + +is-dotfile@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.2.tgz#2c132383f39199f8edc268ca01b9b007d205cc4d" + +is-equal-shallow@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" + dependencies: + is-primitive "^2.0.0" + +is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + +is-extglob@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" + +is-finite@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + +is-glob@^2.0.0, is-glob@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" + dependencies: + is-extglob "^1.0.0" + +is-my-json-valid@^2.10.0, is-my-json-valid@^2.12.4: + version "2.15.0" + resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.15.0.tgz#936edda3ca3c211fd98f3b2d3e08da43f7b2915b" + dependencies: + generate-function "^2.0.0" + generate-object-property "^1.1.0" + jsonpointer "^4.0.0" + xtend "^4.0.0" + +is-number@^2.0.2, is-number@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" + dependencies: + kind-of "^3.0.2" + +is-obj@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" + +is-path-cwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" + +is-path-in-cwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz#6477582b8214d602346094567003be8a9eac04dc" + dependencies: + is-path-inside "^1.0.0" + +is-path-inside@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.0.tgz#fc06e5a1683fbda13de667aff717bbc10a48f37f" + dependencies: + path-is-inside "^1.0.1" + +is-posix-bracket@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" + +is-primitive@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" + +is-property@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" + +is-regexp@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-regexp/-/is-regexp-1.0.0.tgz#fd2d883545c46bac5a633e7b9a09e87fa2cb5069" + +is-relative@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-relative/-/is-relative-0.2.1.tgz#d27f4c7d516d175fb610db84bbeef23c3bc97aa5" + dependencies: + is-unc-path "^0.1.1" + +is-resolvable@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.0.0.tgz#8df57c61ea2e3c501408d100fb013cf8d6e0cc62" + dependencies: + tryit "^1.0.1" + +is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + +is-unc-path@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-unc-path/-/is-unc-path-0.1.1.tgz#ab2533d77ad733561124c3dc0f5cd8b90054c86b" + dependencies: + unc-path-regex "^0.1.0" + +is-utf8@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" + +is-windows@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-0.2.0.tgz#de1aa6d63ea29dd248737b69f1ff8b8002d2108c" + +isarray@^1.0.0, isarray@~1.0.0, isarray@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + +isarray@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + +isexe@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-1.1.2.tgz#36f3e22e60750920f5e7241a476a8c6a42275ad0" + +isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + dependencies: + isarray "1.0.0" + +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + +jodid25519@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/jodid25519/-/jodid25519-1.0.2.tgz#06d4912255093419477d425633606e0e90782967" + dependencies: + jsbn "~0.1.0" + +js-tokens@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-2.0.0.tgz#79903f5563ee778cc1162e6dcf1a0027c97f9cb5" + +js-yaml@^3.5.1, js-yaml@3.x: + version "3.7.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80" + dependencies: + argparse "^1.0.7" + esprima "^2.6.0" + +js-yaml@3.6.1: + version "3.6.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.6.1.tgz#6e5fe67d8b205ce4d22fad05b7781e8dadcc4b30" + dependencies: + argparse "^1.0.7" + esprima "^2.6.0" + +jsbn@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.0.tgz#650987da0dd74f4ebf5a11377a2aa2d273e97dfd" + +jsdom@^7.0.2: + version "7.2.2" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-7.2.2.tgz#40b402770c2bda23469096bee91ab675e3b1fc6e" + dependencies: + abab "^1.0.0" + acorn "^2.4.0" + acorn-globals "^1.0.4" + cssom ">= 0.3.0 < 0.4.0" + cssstyle ">= 0.2.29 < 0.3.0" + escodegen "^1.6.1" + nwmatcher ">= 1.3.7 < 2.0.0" + parse5 "^1.5.1" + request "^2.55.0" + sax "^1.1.4" + symbol-tree ">= 3.1.0 < 4.0.0" + tough-cookie "^2.2.0" + webidl-conversions "^2.0.0" + whatwg-url-compat "~0.6.5" + xml-name-validator ">= 2.0.1 < 3.0.0" + +jsesc@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" + +jsesc@~0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" + +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + +json-stable-stringify@^1.0.0, json-stable-stringify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" + dependencies: + jsonify "~0.0.0" + +json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + +json3@3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.2.tgz#3c0434743df93e2f5c42aee7b19bcb483575f4e1" + +json5@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.0.tgz#9b20715b026cbe3778fd769edccd822d8332a5b2" + +jsonfile@^2.1.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" + optionalDependencies: + graceful-fs "^4.1.6" + +jsonify@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" + +jsonpointer@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.0.tgz#6661e161d2fc445f19f98430231343722e1fcbd5" + +jsprim@^1.2.2: + version "1.3.1" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.3.1.tgz#2a7256f70412a29ee3670aaca625994c4dcff252" + dependencies: + extsprintf "1.0.2" + json-schema "0.2.3" + verror "1.3.6" + +kind-of@^3.0.2: + version "3.0.4" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.0.4.tgz#7b8ecf18a4e17f8269d73b501c9f232c96887a74" + dependencies: + is-buffer "^1.0.2" + +klaw@^1.0.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439" + optionalDependencies: + graceful-fs "^4.1.9" + +lazy-cache@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" + +lazy-debug-legacy@0.0.X: + version "0.0.1" + resolved "https://registry.yarnpkg.com/lazy-debug-legacy/-/lazy-debug-legacy-0.0.1.tgz#537716c0776e4cf79e3ed1b621f7658c2911b1b1" + +lcov-parse@0.0.10: + version "0.0.10" + resolved "https://registry.yarnpkg.com/lcov-parse/-/lcov-parse-0.0.10.tgz#1b0b8ff9ac9c7889250582b70b71315d9da6d9a3" + +levn@^0.3.0, levn@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + dependencies: + prelude-ls "~1.1.2" + type-check "~0.3.2" + +levn@~0.2.5: + version "0.2.5" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.2.5.tgz#ba8d339d0ca4a610e3a3f145b9caf48807155054" + dependencies: + prelude-ls "~1.1.0" + type-check "~0.3.1" + +liftoff@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/liftoff/-/liftoff-2.3.0.tgz#a98f2ff67183d8ba7cfaca10548bd7ff0550b385" + dependencies: + extend "^3.0.0" + findup-sync "^0.4.2" + fined "^1.0.1" + flagged-respawn "^0.3.2" + lodash.isplainobject "^4.0.4" + lodash.isstring "^4.0.1" + lodash.mapvalues "^4.4.0" + rechoir "^0.6.2" + resolve "^1.1.7" + +load-json-file@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + pinkie-promise "^2.0.0" + strip-bom "^2.0.0" + +lodash._baseassign@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz#8c38a099500f215ad09e59f1722fd0c52bfe0a4e" + dependencies: + lodash._basecopy "^3.0.0" + lodash.keys "^3.0.0" + +lodash._basecopy@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36" + +lodash._basecreate@^3.0.0: + version "3.0.3" + resolved "https://registry.yarnpkg.com/lodash._basecreate/-/lodash._basecreate-3.0.3.tgz#1bc661614daa7fc311b7d03bf16806a0213cf821" + +lodash._basetostring@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz#d1861d877f824a52f669832dcaf3ee15566a07d5" + +lodash._basevalues@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz#5b775762802bde3d3297503e26300820fdf661b7" + +lodash._getnative@^3.0.0: + version "3.9.1" + resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" + +lodash._isiterateecall@^3.0.0: + version "3.0.9" + resolved "https://registry.yarnpkg.com/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz#5203ad7ba425fae842460e696db9cf3e6aac057c" + +lodash._reescape@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._reescape/-/lodash._reescape-3.0.0.tgz#2b1d6f5dfe07c8a355753e5f27fac7f1cde1616a" + +lodash._reevaluate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz#58bc74c40664953ae0b124d806996daca431e2ed" + +lodash._reinterpolate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" + +lodash._root@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/lodash._root/-/lodash._root-3.0.1.tgz#fba1c4524c19ee9a5f8136b4609f017cf4ded692" + +lodash.assignwith@^4.0.7: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.assignwith/-/lodash.assignwith-4.2.0.tgz#127a97f02adc41751a954d24b0de17e100e038eb" + +lodash.create@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/lodash.create/-/lodash.create-3.1.1.tgz#d7f2849f0dbda7e04682bb8cd72ab022461debe7" + dependencies: + lodash._baseassign "^3.0.0" + lodash._basecreate "^3.0.0" + lodash._isiterateecall "^3.0.0" + +lodash.escape@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/lodash.escape/-/lodash.escape-3.2.0.tgz#995ee0dc18c1b48cc92effae71a10aab5b487698" + dependencies: + lodash._root "^3.0.0" + +lodash.isarguments@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a" + +lodash.isarray@^3.0.0: + version "3.0.4" + resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55" + +lodash.isempty@^4.2.1: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.isempty/-/lodash.isempty-4.4.0.tgz#6f86cbedd8be4ec987be9aaf33c9684db1b31e7e" + +lodash.isplainobject@^4.0.4: + version "4.0.6" + resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" + +lodash.isstring@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451" + +lodash.keys@^3.0.0: + version "3.1.2" + resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a" + dependencies: + lodash._getnative "^3.0.0" + lodash.isarguments "^3.0.0" + lodash.isarray "^3.0.0" + +lodash.mapvalues@^4.4.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.mapvalues/-/lodash.mapvalues-4.6.0.tgz#1bafa5005de9dd6f4f26668c30ca37230cc9689c" + +lodash.pick@^4.2.1: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3" + +lodash.pickby@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.pickby/-/lodash.pickby-4.6.0.tgz#7dea21d8c18d7703a27c704c15d3b84a67e33aff" + +lodash.restparam@^3.0.0: + version "3.6.1" + resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805" + +lodash.template@^3.0.0: + version "3.6.2" + resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-3.6.2.tgz#f8cdecc6169a255be9098ae8b0c53d378931d14f" + dependencies: + lodash._basecopy "^3.0.0" + lodash._basetostring "^3.0.0" + lodash._basevalues "^3.0.0" + lodash._isiterateecall "^3.0.0" + lodash._reinterpolate "^3.0.0" + lodash.escape "^3.0.0" + lodash.keys "^3.0.0" + lodash.restparam "^3.0.0" + lodash.templatesettings "^3.0.0" + +lodash.templatesettings@^3.0.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz#fb307844753b66b9f1afa54e262c745307dba8e5" + dependencies: + lodash._reinterpolate "^3.0.0" + lodash.escape "^3.0.0" + +lodash@^4.0.0, lodash@^4.1.0, lodash@^4.14.0, lodash@^4.15.0, lodash@^4.2.0, lodash@^4.3.0: + version "4.16.6" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.16.6.tgz#d22c9ac660288f3843e16ba7d2b5d06cca27d777" + +lodash@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-1.0.2.tgz#8f57560c83b59fc270bd3d561b690043430e2551" + +log-driver@1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.5.tgz#7ae4ec257302fd790d557cb10c97100d857b0056" + +lolex@1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/lolex/-/lolex-1.3.2.tgz#7c3da62ffcb30f0f5a80a2566ca24e45d8a01f31" + +longest@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" + +loose-envify@^1.0.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.0.tgz#6b26248c42f6d4fa4b0d8542f78edfcde35642a8" + dependencies: + js-tokens "^2.0.0" + +loud-rejection@^1.0.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" + dependencies: + currently-unhandled "^0.4.1" + signal-exit "^3.0.0" + +lru-cache@2: + version "2.7.3" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.7.3.tgz#6d4524e8b955f95d4f5b58851ce21dd72fb4e952" + +map-cache@^0.2.0: + version "0.2.2" + resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" + +map-obj@^1.0.0, map-obj@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" + +marked@0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/marked/-/marked-0.3.5.tgz#4113a15ac5d7bca158a5aae07224587b9fa15b94" + +meow@^3.3.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb" + dependencies: + camelcase-keys "^2.0.0" + decamelize "^1.1.2" + loud-rejection "^1.0.0" + map-obj "^1.0.1" + minimist "^1.1.3" + normalize-package-data "^2.3.4" + object-assign "^4.0.1" + read-pkg-up "^1.0.1" + redent "^1.0.0" + trim-newlines "^1.0.0" + +micromatch@^2.3.7, micromatch@^2.3.8: + version "2.3.11" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" + dependencies: + arr-diff "^2.0.0" + array-unique "^0.2.1" + braces "^1.8.2" + expand-brackets "^0.1.4" + extglob "^0.3.1" + filename-regex "^2.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.1" + kind-of "^3.0.2" + normalize-path "^2.0.1" + object.omit "^2.0.0" + parse-glob "^3.0.4" + regex-cache "^0.4.2" + +mime-db@~1.24.0: + version "1.24.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.24.0.tgz#e2d13f939f0016c6e4e9ad25a8652f126c467f0c" + +mime-types@^2.1.11, mime-types@^2.1.12, mime-types@~2.1.7: + version "2.1.12" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.12.tgz#152ba256777020dd4663f54c2e7bc26381e71729" + dependencies: + mime-db "~1.24.0" + +minimatch@^2.0.1, minimatch@2.x: + version "2.0.10" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-2.0.10.tgz#8d087c39c6b38c001b97fca7ce6d0e1e80afbac7" + dependencies: + brace-expansion "^1.0.0" + +minimatch@^3.0.0, minimatch@^3.0.2, "minimatch@2 || 3": + version "3.0.3" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" + dependencies: + brace-expansion "^1.0.0" + +minimatch@~0.2.11: + version "0.2.14" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-0.2.14.tgz#c74e780574f63c6f9a090e90efbe6ef53a6a756a" + dependencies: + lru-cache "2" + sigmund "~1.0.0" + +minimist@^1.1.0, minimist@^1.1.3, minimist@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + +minimist@~0.0.1: + version "0.0.10" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" + +minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + +minimist@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.1.1.tgz#1bc2bc71658cdca5712475684363615b0b4f695b" + +mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@0.5.1, mkdirp@0.5.x: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + dependencies: + minimist "0.0.8" + +mocha@^3.0.0: + version "3.1.2" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-3.1.2.tgz#51f93b432bf7e1b175ffc22883ccd0be32dba6b5" + dependencies: + browser-stdout "1.3.0" + commander "2.9.0" + debug "2.2.0" + diff "1.4.0" + escape-string-regexp "1.0.5" + glob "7.0.5" + growl "1.9.2" + json3 "3.3.2" + lodash.create "3.1.1" + mkdirp "0.5.1" + supports-color "3.1.2" + +ms@0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" + +ms@0.7.2: + version "0.7.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.2.tgz#ae25cf2512b3885a1d95d7f037868d8431124765" + +multimatch@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-2.1.0.tgz#9c7906a22fb4c02919e2f5f75161b4cdbd4b2a2b" + dependencies: + array-differ "^1.0.0" + array-union "^1.0.1" + arrify "^1.0.0" + minimatch "^3.0.0" + +multipipe@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/multipipe/-/multipipe-0.1.2.tgz#2a8f2ddf70eed564dff2d57f1e1a137d9f05078b" + dependencies: + duplexer2 "0.0.2" + +mute-stream@0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.5.tgz#8fbfabb0a98a253d3184331f9e8deb7372fac6c0" + +natives@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/natives/-/natives-1.1.0.tgz#e9ff841418a6b2ec7a495e939984f78f163e6e31" + +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + +node-uuid@~1.4.7: + version "1.4.7" + resolved "https://registry.yarnpkg.com/node-uuid/-/node-uuid-1.4.7.tgz#6da5a17668c4b3dd59623bda11cf7fa4c1f60a6f" + +nopt@3.x: + version "3.0.6" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" + dependencies: + abbrev "1" + +normalize-package-data@^2.3.2, normalize-package-data@^2.3.4: + version "2.3.5" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.3.5.tgz#8d924f142960e1777e7ffe170543631cc7cb02df" + dependencies: + hosted-git-info "^2.1.4" + is-builtin-module "^1.0.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +normalize-path@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.0.1.tgz#47886ac1662760d4261b7d979d241709d3ce3f7a" + +nth-check@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.1.tgz#9929acdf628fc2c41098deab82ac580cf149aae4" + dependencies: + boolbase "~1.0.0" + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + +"nwmatcher@>= 1.3.7 < 2.0.0": + version "1.3.9" + resolved "https://registry.yarnpkg.com/nwmatcher/-/nwmatcher-1.3.9.tgz#8bab486ff7fa3dfd086656bbe8b17116d3692d2a" + +oauth-sign@~0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" + +object-assign@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-3.0.0.tgz#9bedd5ca0897949bca47e7ff408062d549f587f2" + +object-assign@^4.0.1, object-assign@^4.1.0, object-assign@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.0.tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0" + +object.omit@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" + dependencies: + for-own "^0.1.4" + is-extendable "^0.1.1" + +once@^1.3.0, once@1.x: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + dependencies: + wrappy "1" + +once@~1.3.0: + version "1.3.3" + resolved "https://registry.yarnpkg.com/once/-/once-1.3.3.tgz#b2e261557ce4c314ec8304f3fa82663e4297ca20" + dependencies: + wrappy "1" + +onetime@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789" + +optimist@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" + dependencies: + minimist "~0.0.1" + wordwrap "~0.0.2" + +optionator@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.5.0.tgz#b75a8995a2d417df25b6e4e3862f50aa88651368" + dependencies: + deep-is "~0.1.2" + fast-levenshtein "~1.0.0" + levn "~0.2.5" + prelude-ls "~1.1.1" + type-check "~0.3.1" + wordwrap "~0.0.2" + +optionator@^0.8.1, optionator@^0.8.2: + version "0.8.2" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" + dependencies: + deep-is "~0.1.3" + fast-levenshtein "~2.0.4" + levn "~0.3.0" + prelude-ls "~1.1.2" + type-check "~0.3.2" + wordwrap "~1.0.0" + +orchestrator@^0.3.0: + version "0.3.8" + resolved "https://registry.yarnpkg.com/orchestrator/-/orchestrator-0.3.8.tgz#14e7e9e2764f7315fbac184e506c7aa6df94ad7e" + dependencies: + end-of-stream "~0.1.5" + sequencify "~0.0.7" + stream-consume "~0.1.0" + +ordered-read-streams@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/ordered-read-streams/-/ordered-read-streams-0.1.0.tgz#fd565a9af8eb4473ba69b6ed8a34352cb552f126" + +os-homedir@^1.0.0, os-homedir@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + +os-tmpdir@^1.0.0, os-tmpdir@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + +osenv@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.3.tgz#83cf05c6d6458fc4d5ac6362ea325d92f2754217" + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.0" + +parse-filepath@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parse-filepath/-/parse-filepath-1.0.1.tgz#159d6155d43904d16c10ef698911da1e91969b73" + dependencies: + is-absolute "^0.2.3" + map-cache "^0.2.0" + path-root "^0.1.1" + +parse-glob@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" + dependencies: + glob-base "^0.3.0" + is-dotfile "^1.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.0" + +parse-json@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + dependencies: + error-ex "^1.2.0" + +parse5@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-1.5.1.tgz#9b7f3b0de32be78dc2401b17573ccaf0f6f59d94" + +path-exists@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" + dependencies: + pinkie-promise "^2.0.0" + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + +path-is-inside@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" + +path-root-regex@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/path-root-regex/-/path-root-regex-0.1.2.tgz#bfccdc8df5b12dc52c8b43ec38d18d72c04ba96d" + +path-root@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/path-root/-/path-root-0.1.1.tgz#9a4a6814cac1c0cd73360a95f32083c8ea4745b7" + dependencies: + path-root-regex "^0.1.0" + +path-type@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" + dependencies: + graceful-fs "^4.1.2" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +pify@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + +pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + dependencies: + pinkie "^2.0.0" + +pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + +plur@^2.0.0, plur@^2.1.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/plur/-/plur-2.1.2.tgz#7482452c1a0f508e3e344eaec312c91c29dc655a" + dependencies: + irregular-plurals "^1.0.0" + +pluralize@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-1.2.1.tgz#d1a21483fd22bb41e58a12fa3421823140897c45" + +prelude-ls@~1.1.0, prelude-ls@~1.1.1, prelude-ls@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + +preserve@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" + +pretty-hrtime@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz#b7e3ea42435a4c9b2759d99e0f201eb195802ee1" + +private@^0.1.6, private@~0.1.5: + version "0.1.6" + resolved "https://registry.yarnpkg.com/private/-/private-0.1.6.tgz#55c6a976d0f9bafb9924851350fe47b9b5fbb7c1" + +process-nextick-args@~1.0.6: + version "1.0.7" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" + +progress@^1.1.8: + version "1.1.8" + resolved "https://registry.yarnpkg.com/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be" + +punycode@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + +qs@~6.2.0: + version "6.2.1" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.2.1.tgz#ce03c5ff0935bc1d9d69a9f14cbd18e568d67625" + +qs@~6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.0.tgz#f403b264f23bc01228c74131b407f18d5ea5d442" + +randomatic@^1.1.3: + version "1.1.5" + resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.5.tgz#5e9ef5f2d573c67bd2b8124ae90b5156e457840b" + dependencies: + is-number "^2.0.2" + kind-of "^3.0.2" + +read-pkg-up@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" + dependencies: + find-up "^1.0.0" + read-pkg "^1.0.0" + +read-pkg@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" + dependencies: + load-json-file "^1.0.0" + normalize-package-data "^2.3.2" + path-type "^1.0.0" + +readable-stream@^2.0.2: + version "2.2.1" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.1.tgz#c459a6687ad6195f936b959870776edef27a7655" + dependencies: + buffer-shims "^1.0.0" + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "~1.0.0" + process-nextick-args "~1.0.6" + string_decoder "~0.10.x" + util-deprecate "~1.0.1" + +"readable-stream@>=1.0.33-1 <1.1.0-0": + version "1.0.34" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + +readable-stream@~1.1.9: + version "1.1.14" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + +readable-stream@~2.0.0, readable-stream@~2.0.5: + version "2.0.6" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.0.6.tgz#8f90341e68a53ccc928788dacfcd11b36eb9b78e" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "~1.0.0" + process-nextick-args "~1.0.6" + string_decoder "~0.10.x" + util-deprecate "~1.0.1" + +readable-stream@1.1: + version "1.1.13" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.13.tgz#f6eef764f514c89e2b9e23146a75ba106756d23e" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + +readline2@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/readline2/-/readline2-1.0.1.tgz#41059608ffc154757b715d9989d199ffbf372e35" + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + mute-stream "0.0.5" + +rechoir@^0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" + dependencies: + resolve "^1.1.6" + +redent@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde" + dependencies: + indent-string "^2.1.0" + strip-indent "^1.0.1" + +regenerate@^1.2.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.2.tgz#d1941c67bad437e1be76433add5b385f95b19260" + +regenerator-runtime@^0.9.5: + version "0.9.6" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.9.6.tgz#d33eb95d0d2001a4be39659707c51b0cb71ce029" + +regex-cache@^0.4.2: + version "0.4.3" + resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.3.tgz#9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145" + dependencies: + is-equal-shallow "^0.1.3" + is-primitive "^2.0.0" + +regexpu-core@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240" + dependencies: + regenerate "^1.2.1" + regjsgen "^0.2.0" + regjsparser "^0.1.4" + +regjsgen@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" + +regjsparser@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" + dependencies: + jsesc "~0.5.0" + +repeat-element@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" + +repeat-string@^1.5.2: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + +repeating@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" + dependencies: + is-finite "^1.0.0" + +replace-ext@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-0.0.1.tgz#29bbd92078a739f0bcce2b4ee41e837953522924" + +req-cwd@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/req-cwd/-/req-cwd-1.0.1.tgz#0d73aeae9266e697a78f7976019677e76acf0fff" + dependencies: + req-from "^1.0.1" + +req-from@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/req-from/-/req-from-1.0.1.tgz#bf81da5147947d32d13b947dc12a58ad4587350e" + dependencies: + resolve-from "^2.0.0" + +request@^2.55.0: + version "2.78.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.78.0.tgz#e1c8dec346e1c81923b24acdb337f11decabe9cc" + dependencies: + aws-sign2 "~0.6.0" + aws4 "^1.2.1" + caseless "~0.11.0" + combined-stream "~1.0.5" + extend "~3.0.0" + forever-agent "~0.6.1" + form-data "~2.1.1" + har-validator "~2.0.6" + hawk "~3.1.3" + http-signature "~1.1.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.7" + node-uuid "~1.4.7" + oauth-sign "~0.8.1" + qs "~6.3.0" + stringstream "~0.0.4" + tough-cookie "~2.3.0" + tunnel-agent "~0.4.1" + +request@~2.74.0: + version "2.74.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.74.0.tgz#7693ca768bbb0ea5c8ce08c084a45efa05b892ab" + dependencies: + aws-sign2 "~0.6.0" + aws4 "^1.2.1" + bl "~1.1.2" + caseless "~0.11.0" + combined-stream "~1.0.5" + extend "~3.0.0" + forever-agent "~0.6.1" + form-data "~1.0.0-rc4" + har-validator "~2.0.6" + hawk "~3.1.3" + http-signature "~1.1.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.7" + node-uuid "~1.4.7" + oauth-sign "~0.8.1" + qs "~6.2.0" + stringstream "~0.0.4" + tough-cookie "~2.3.0" + tunnel-agent "~0.4.1" + +request@2.75.0: + version "2.75.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.75.0.tgz#d2b8268a286da13eaa5d01adf5d18cc90f657d93" + dependencies: + aws-sign2 "~0.6.0" + aws4 "^1.2.1" + bl "~1.1.2" + caseless "~0.11.0" + combined-stream "~1.0.5" + extend "~3.0.0" + forever-agent "~0.6.1" + form-data "~2.0.0" + har-validator "~2.0.6" + hawk "~3.1.3" + http-signature "~1.1.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.7" + node-uuid "~1.4.7" + oauth-sign "~0.8.1" + qs "~6.2.0" + stringstream "~0.0.4" + tough-cookie "~2.3.0" + tunnel-agent "~0.4.1" + +require-uncached@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" + dependencies: + caller-path "^0.1.0" + resolve-from "^1.0.0" + +resolve-dir@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-0.1.1.tgz#b219259a5602fac5c5c496ad894a6e8cc430261e" + dependencies: + expand-tilde "^1.2.2" + global-modules "^0.2.3" + +resolve-from@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" + +resolve-from@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-2.0.0.tgz#9480ab20e94ffa1d9e80a804c7ea147611966b57" + +resolve-url@~0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" + +resolve@^1.1.6, resolve@^1.1.7, resolve@1.1.x: + version "1.1.7" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" + +restore-cursor@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541" + dependencies: + exit-hook "^1.0.0" + onetime "^1.0.0" + +right-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" + dependencies: + align-text "^0.1.1" + +rimraf@^2.2.8: + version "2.5.4" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.5.4.tgz#96800093cbf1a0c86bd95b4625467535c29dfa04" + dependencies: + glob "^7.0.5" + +rimraf@~2.2.6: + version "2.2.8" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.2.8.tgz#e439be2aaee327321952730f99a8929e4fc50582" + +run-async@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-0.1.0.tgz#c8ad4a5e110661e402a7d21b530e009f25f8e389" + dependencies: + once "^1.3.0" + +rx-lite@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-3.1.2.tgz#19ce502ca572665f3b647b10939f97fd1615f102" + +samsam@~1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/samsam/-/samsam-1.1.3.tgz#9f5087419b4d091f232571e7fa52e90b0f552621" + +samsam@1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/samsam/-/samsam-1.1.2.tgz#bec11fdc83a9fda063401210e40176c3024d1567" + +sax@^1.1.4: + version "1.2.1" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.1.tgz#7b8e656190b228e81a66aea748480d828cd2d37a" + +semver@^4.1.0: + version "4.3.6" + resolved "https://registry.yarnpkg.com/semver/-/semver-4.3.6.tgz#300bc6e0e86374f7ba61068b5b1ecd57fc6532da" + +"semver@2 || 3 || 4 || 5": + version "5.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" + +sequencify@~0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/sequencify/-/sequencify-0.0.7.tgz#90cff19d02e07027fd767f5ead3e7b95d1e7380c" + +shelljs@^0.7.5: + version "0.7.5" + resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.5.tgz#2eef7a50a21e1ccf37da00df767ec69e30ad0675" + dependencies: + glob "^7.0.0" + interpret "^1.0.0" + rechoir "^0.6.2" + +sigmund@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/sigmund/-/sigmund-1.0.1.tgz#3ff21f198cad2175f9f3b781853fd94d0d19b590" + +signal-exit@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.1.tgz#5a4c884992b63a7acd9badb7894c3ee9cfccad81" + +sinon-chai@^2.8.0: + version "2.8.0" + resolved "https://registry.yarnpkg.com/sinon-chai/-/sinon-chai-2.8.0.tgz#432a9bbfd51a6fc00798f4d2526a829c060687ac" + +sinon@^1.17.6: + version "1.17.6" + resolved "https://registry.yarnpkg.com/sinon/-/sinon-1.17.6.tgz#a43116db59577c8296356afee13fafc2332e58e1" + dependencies: + formatio "1.1.1" + lolex "1.3.2" + samsam "1.1.2" + util ">=0.10.3 <1" + +slash@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" + +slice-ansi@0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35" + +sntp@1.x.x: + version "1.0.9" + resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" + dependencies: + hoek "2.x.x" + +source-map-resolve@^0.3.0: + version "0.3.1" + resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.3.1.tgz#610f6122a445b8dd51535a2a71b783dfc1248761" + dependencies: + atob "~1.1.0" + resolve-url "~0.2.1" + source-map-url "~0.3.0" + urix "~0.1.0" + +source-map-support@^0.4.0, source-map-support@^0.4.2, source-map-support@^0.4.6: + version "0.4.6" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.6.tgz#32552aa64b458392a85eab3b0b5ee61527167aeb" + dependencies: + source-map "^0.5.3" + +source-map-url@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.3.0.tgz#7ecaf13b57bcd09da8a40c5d269db33799d4aaf9" + +source-map@^0.1.38: + version "0.1.43" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.1.43.tgz#c24bc146ca517c1471f5dacbe2571b2b7f9e3346" + dependencies: + amdefine ">=0.0.4" + +source-map@^0.4.4, source-map@0.4.x: + version "0.4.4" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" + dependencies: + amdefine ">=0.0.4" + +source-map@^0.5.0, source-map@^0.5.1, source-map@^0.5.3, source-map@~0.5.1, source-map@0.X: + version "0.5.6" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" + +source-map@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d" + dependencies: + amdefine ">=0.0.4" + +sparkles@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/sparkles/-/sparkles-1.0.0.tgz#1acbbfb592436d10bbe8f785b7cc6f82815012c3" + +spdx-correct@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40" + dependencies: + spdx-license-ids "^1.0.2" + +spdx-expression-parse@~1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz#9bdf2f20e1f40ed447fbe273266191fced51626c" + +spdx-license-ids@^1.0.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz#c9df7a3424594ade6bd11900d596696dc06bac57" + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + +sshpk@^1.7.0: + version "1.10.1" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.10.1.tgz#30e1a5d329244974a1af61511339d595af6638b0" + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + dashdash "^1.12.0" + getpass "^0.1.1" + optionalDependencies: + bcrypt-pbkdf "^1.0.0" + ecc-jsbn "~0.1.1" + jodid25519 "^1.0.0" + jsbn "~0.1.0" + tweetnacl "~0.14.0" + +stream-consume@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/stream-consume/-/stream-consume-0.1.0.tgz#a41ead1a6d6081ceb79f65b061901b6d8f3d1d0f" + +streamfilter@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/streamfilter/-/streamfilter-1.0.5.tgz#87507111beb8e298451717b511cfed8f002abf53" + dependencies: + readable-stream "^2.0.2" + +string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + +string-width@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +string-width@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.0.0.tgz#635c5436cc72a6e0c387ceca278d4e2eec52687e" + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^3.0.0" + +stringify-object@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/stringify-object/-/stringify-object-3.0.0.tgz#f2c8c7a95486d666d484d7f4a9768c2068bf241b" + dependencies: + is-obj "^1.0.1" + is-regexp "^1.0.0" + +stringstream@~0.0.4: + version "0.0.5" + resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" + +strip-ansi@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + dependencies: + ansi-regex "^2.0.0" + +strip-bom@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-1.0.0.tgz#85b8862f3844b5a6d5ec8467a93598173a36f794" + dependencies: + first-chunk-stream "^1.0.0" + is-utf8 "^0.2.0" + +strip-bom@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" + dependencies: + is-utf8 "^0.2.0" + +strip-bom@^3.0.0, strip-bom@3.X: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + +strip-indent@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2" + dependencies: + get-stdin "^4.0.1" + +strip-json-comments@~1.0.1: + version "1.0.4" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-1.0.4.tgz#1e15fbcac97d3ee99bf2d73b4c656b082bbafb91" + +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + +supports-color@3.1.2, supports-color@3.1.x: + version "3.1.2" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.1.2.tgz#72a262894d9d408b956ca05ff37b2ed8a6e2a2d5" + dependencies: + has-flag "^1.0.0" + +"symbol-tree@>= 3.1.0 < 4.0.0": + version "3.1.4" + resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.1.4.tgz#02b279348d337debc39694c5c95f882d448a312a" + +table@^3.7.8: + version "3.8.3" + resolved "https://registry.yarnpkg.com/table/-/table-3.8.3.tgz#2bbc542f0fda9861a755d3947fefd8b3f513855f" + dependencies: + ajv "^4.7.0" + ajv-keywords "^1.0.0" + chalk "^1.1.1" + lodash "^4.0.0" + slice-ansi "0.0.4" + string-width "^2.0.0" + +taffydb@2.7.2: + version "2.7.2" + resolved "https://registry.yarnpkg.com/taffydb/-/taffydb-2.7.2.tgz#7bf8106a5c1a48251b3e3bc0a0e1732489fd0dc8" + +temp@^0.8.3: + version "0.8.3" + resolved "https://registry.yarnpkg.com/temp/-/temp-0.8.3.tgz#e0c6bc4d26b903124410e4fed81103014dfc1f59" + dependencies: + os-tmpdir "^1.0.0" + rimraf "~2.2.6" + +text-table@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + +through@^2.3.4, through@^2.3.6: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + +through2@^0.6.1: + version "0.6.5" + resolved "https://registry.yarnpkg.com/through2/-/through2-0.6.5.tgz#41ab9c67b29d57209071410e1d7a7a968cd3ad48" + dependencies: + readable-stream ">=1.0.33-1 <1.1.0-0" + xtend ">=4.0.0 <4.1.0-0" + +through2@^2, through2@^2.0.0, through2@^2.0.1, through2@2.X: + version "2.0.1" + resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.1.tgz#384e75314d49f32de12eebb8136b8eb6b5d59da9" + dependencies: + readable-stream "~2.0.0" + xtend "~4.0.0" + +tildify@^1.0.0, tildify@^1.1.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/tildify/-/tildify-1.2.0.tgz#dcec03f55dca9b7aa3e5b04f21817eb56e63588a" + dependencies: + os-homedir "^1.0.0" + +time-stamp@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-1.0.1.tgz#9f4bd23559c9365966f3302dbba2b07c6b99b151" + +to-fast-properties@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.2.tgz#f3f5c0c3ba7299a7ef99427e44633257ade43320" + +tough-cookie@^2.2.0, tough-cookie@~2.3.0: + version "2.3.2" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a" + dependencies: + punycode "^1.4.1" + +tr46@~0.0.1: + version "0.0.3" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" + +trim-newlines@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" + +tryit@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/tryit/-/tryit-1.0.3.tgz#393be730a9446fd1ead6da59a014308f36c289cb" + +tunnel-agent@~0.4.1: + version "0.4.3" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.4.3.tgz#6373db76909fe570e08d73583365ed828a74eeeb" + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.3" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.3.tgz#3da382f670f25ded78d7b3d1792119bca0b7132d" + +type-check@~0.3.1, type-check@~0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + dependencies: + prelude-ls "~1.1.2" + +type-detect@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-1.0.0.tgz#762217cc06db258ec48908a1298e8b95121e8ea2" + +type-detect@0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-0.1.1.tgz#0ba5ec2a885640e470ea4e8505971900dac58822" + +typedarray@~0.0.5: + version "0.0.6" + resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" + +uglify-js@^2.6: + version "2.7.4" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.7.4.tgz#a295a0de12b6a650c031c40deb0dc40b14568bd2" + dependencies: + async "~0.2.6" + source-map "~0.5.1" + uglify-to-browserify "~1.0.0" + yargs "~3.10.0" + +uglify-to-browserify@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" + +unc-path-regex@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa" + +unique-stream@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unique-stream/-/unique-stream-1.0.0.tgz#d59a4a75427447d9aa6c91e70263f8d26a4b104b" + +urix@^0.1.0, urix@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" + +user-home@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/user-home/-/user-home-1.1.1.tgz#2b5be23a32b63a7c9deb8d0f28d485724a3df190" + +user-home@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/user-home/-/user-home-2.0.0.tgz#9c70bfd8169bc1dcbf48604e0f04b8b49cde9e9f" + dependencies: + os-homedir "^1.0.0" + +util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + +"util@>=0.10.3 <1": + version "0.10.3" + resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" + dependencies: + inherits "2.0.1" + +v8flags@^2.0.2: + version "2.0.11" + resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-2.0.11.tgz#bca8f30f0d6d60612cc2c00641e6962d42ae6881" + dependencies: + user-home "^1.1.1" + +validate-npm-package-license@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc" + dependencies: + spdx-correct "~1.0.0" + spdx-expression-parse "~1.0.0" + +verror@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.3.6.tgz#cff5df12946d297d2baaefaa2689e25be01c005c" + dependencies: + extsprintf "1.0.2" + +vinyl-fs@^0.3.0: + version "0.3.14" + resolved "https://registry.yarnpkg.com/vinyl-fs/-/vinyl-fs-0.3.14.tgz#9a6851ce1cac1c1cea5fe86c0931d620c2cfa9e6" + dependencies: + defaults "^1.0.0" + glob-stream "^3.1.5" + glob-watcher "^0.0.6" + graceful-fs "^3.0.0" + mkdirp "^0.5.0" + strip-bom "^1.0.0" + through2 "^0.6.1" + vinyl "^0.4.0" + +vinyl-sourcemaps-apply@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz#ab6549d61d172c2b1b87be5c508d239c8ef87705" + dependencies: + source-map "^0.5.1" + +vinyl@^0.4.0: + version "0.4.6" + resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-0.4.6.tgz#2f356c87a550a255461f36bbeb2a5ba8bf784847" + dependencies: + clone "^0.2.0" + clone-stats "^0.0.1" + +vinyl@^0.5.0: + version "0.5.3" + resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-0.5.3.tgz#b0455b38fc5e0cf30d4325132e461970c2091cde" + dependencies: + clone "^1.0.0" + clone-stats "^0.0.1" + replace-ext "0.0.1" + +vinyl@1.X: + version "1.2.0" + resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-1.2.0.tgz#5c88036cf565e5df05558bfc911f8656df218884" + dependencies: + clone "^1.0.0" + clone-stats "^0.0.1" + replace-ext "0.0.1" + +webidl-conversions@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-2.0.1.tgz#3bf8258f7d318c7443c36f2e169402a1a6703506" + +whatwg-url-compat@~0.6.5: + version "0.6.5" + resolved "https://registry.yarnpkg.com/whatwg-url-compat/-/whatwg-url-compat-0.6.5.tgz#00898111af689bb097541cd5a45ca6c8798445bf" + dependencies: + tr46 "~0.0.1" + +which@^1.2.10, which@1.2.x: + version "1.2.12" + resolved "https://registry.yarnpkg.com/which/-/which-1.2.12.tgz#de67b5e450269f194909ef23ece4ebe416fa1192" + dependencies: + isexe "^1.1.1" + +window-size@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" + +wordwrap@~0.0.2: + version "0.0.3" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" + +wordwrap@~1.0.0, wordwrap@1.0.x: + version "1.0.0" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" + +wordwrap@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + +write@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757" + dependencies: + mkdirp "^0.5.1" + +"xml-name-validator@>= 2.0.1 < 3.0.0": + version "2.0.1" + resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-2.0.1.tgz#4d8b8f1eccd3419aa362061becef515e1e559635" + +xtend@^4.0.0, "xtend@>=4.0.0 <4.1.0-0", xtend@~4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" + +yargs@~3.10.0: + version "3.10.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" + dependencies: + camelcase "^1.0.2" + cliui "^2.1.0" + decamelize "^1.0.0" + window-size "0.1.0" +