diff --git a/.codeclimate.yml b/.codeclimate.yml index dfd32a35..5d01d054 100644 --- a/.codeclimate.yml +++ b/.codeclimate.yml @@ -1,16 +1,10 @@ -engines: - eslint: +version: 2 +plugins: + tslint: + config: tsconfig.json enabled: true - checks: - no-console: - enabled: false - no-undef: - enabled: false - callback-return: - enabled: false -ratings: - paths: - - "**.js" -exclude_paths: - - test/** - - dist/** +exclude_patterns: + - "src/*.spec.ts" + - "dist/" + - "examples/" + - "benchmarks/" diff --git a/.gitignore b/.gitignore index fcb1a7d2..a2f91027 100644 --- a/.gitignore +++ b/.gitignore @@ -2,5 +2,4 @@ node_modules coverage .DS_Store -benchmarks/bigvector.js -benchmarks/bigmatrix.js +built diff --git a/.travis.yml b/.travis.yml index 9b414df8..bcf6261b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,15 +4,16 @@ node_js: before_install: - sudo apt-get install libblas-dev env: - - CXX=g++-4.8 - - CC_TEST_REPORTER_ID=7bc2ff765ac0619975d32fe57959db6374d14a96780a1438ec68ea14036748e1 + global: + - CXX=g++-4.8 + - CC_TEST_REPORTER_ID=7bc2ff765ac0619975d32fe57959db6374d14a96780a1438ec68ea14036748e1 before_script: - npm install -g nyc - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter - chmod +x ./cc-test-reporter - ./cc-test-reporter before-build script: - - nyc --reporter=lcov npm test + - npm test after_script: - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT addons: diff --git a/applyBlasOptimizations.js b/applyBlasOptimizations.js deleted file mode 100644 index 71d7ceb5..00000000 --- a/applyBlasOptimizations.js +++ /dev/null @@ -1,68 +0,0 @@ -module.exports = function(Vector, Matrix, nblas) { - 'use strict'; - - // BLAS optimizations - Vector.prototype.add = - Matrix.prototype.add = function (data) { - var l1 = this instanceof Vector ? this.length : this.shape[0] * this.shape[1], - l2 = data instanceof Vector ? data.length : data.shape[0] * data.shape[1]; - if (l1 !== l2) - throw new Error('sizes do not match!'); - if (!l1 && !l2) - return this; - - nblas.axpy(data.data, this.data); - return this; - }; - - Vector.prototype.subtract = - Matrix.prototype.subtract = function (data) { - var l1 = this instanceof Vector ? this.length : this.shape[0] * this.shape[1], - l2 = data instanceof Vector ? data.length : data.shape[0] * data.shape[1]; - if (l1 !== l2) - throw new Error('sizes do not match!'); - if (!l1 && !l2) - return this; - - nblas.axpy(data.data, this.data, -1); - return this; - }; - - Vector.prototype.scale = - Matrix.prototype.scale = function (scalar) { - nblas.scal(this.data, scalar); - return this; - }; - - Vector.prototype.dot = function (vector) { - if (this.length !== vector.length) - throw new Error('sizes do not match!'); - - return nblas.dot(this.data, vector.data); - }; - - Vector.prototype.magnitude = function () { - if (!this.length) - return 0; - - return nblas.nrm2(this.data); - }; - - Vector.prototype.max = function() { - return this.data[nblas.idamax(this.length, this.data, 1)]; - }; - - Matrix.prototype.multiply = function(matrix) { - var r1 = this.shape[0], - c1 = this.shape[1], - r2 = matrix.shape[0], - c2 = matrix.shape[1], - data = new this.type(r1 * c2); - - if (c1 !== r2) - throw new Error('sizes do not match'); - - nblas.gemm(this.data, matrix.data, data, r1, c2, c1); - return Matrix.fromTypedArray(data, [r1, c2]); - }; -}; diff --git a/dist/vectorious.min.js b/dist/vectorious.min.js index af07b657..94ef4612 100644 --- a/dist/vectorious.min.js +++ b/dist/vectorious.min.js @@ -1 +1 @@ -!function i(u,o,s){function h(e,t){if(!o[e]){if(!u[e]){var r="function"==typeof require&&require;if(!t&&r)return r(e,!0);if(f)return f(e,!0);var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}var a=o[e]={exports:{}};u[e][0].call(a.exports,function(t){return h(u[e][1][t]||t)},a,a.exports,i,u,o,s)}return o[e].exports}for(var f="function"==typeof require&&require,t=0;tthis.shape[0]-1||e>this.shape[1]-1)throw new Error("index out of bounds")}},{key:"get",value:function(t,e){return this.check(t,e),this.data[t*this.shape[1]+e]}},{key:"set",value:function(t,e,r){return this.check(t,e),this.data[t*this.shape[1]+e]=r,this}},{key:"swap",value:function(t,e){if(t<0||e<0||t>this.shape[0]-1||e>this.shape[0]-1)throw new Error("index out of bounds");var r=this.shape[1],n=this.data.slice(t*r,(t+1)*r);return this.data.copyWithin(t*r,e*r,(e+1)*r),this.data.set(n,e*r),this}},{key:"map",value:function(t){var e,r=this.shape[0],n=this.shape[1],a=r*n,i=new c(this),u=i.data;for(e=0;ethis.length-1)throw new Error("index out of bounds")}},{key:"get",value:function(t){return this.check(t),this.data[t]}},{key:"set",value:function(t,e){return this.check(t),this.data[t]=e,this}},{key:"combine",value:function(t){if(!t.length)return this;if(!this.length)return this.data=new t.type(t.data),this.length=t.length,this.type=t.type,this;var e=this.length,r=t.length,n=this.data,a=t.data,i=new this.type(e+r);return i.set(n),i.set(a,e),this.data=i,this.length=e+r,this}},{key:"push",value:function(t){return this.combine(new f([t]))}},{key:"map",value:function(t){var e,r=new f(this),n=r.data;for(e=0;ethis.length-1)throw new Error("index out of bounds")},p.prototype.get=function(t){return this.check(t),this.data[t]},p.prototype.set=function(t,r){return this.check(t),this.data[t]=r,this},Object.defineProperty(p.prototype,"x",{get:function(){return this.get(0)},set:function(t){this.set(0,t)},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"y",{get:function(){return this.get(1)},set:function(t){this.set(1,t)},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"z",{get:function(){return this.get(2)},set:function(t){this.set(2,t)},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"w",{get:function(){return this.get(3)},set:function(t){this.set(3,t)},enumerable:!0,configurable:!0}),p.combine=function(t,r){return new p(t).combine(r)},p.prototype.combine=function(t){var r=this.length,e=t.length;if(!e)return this;if(!r)return this.data=new t.type(t.data),this.length=e,this.type=t.type,this;var n=this.data,o=t.data,a=new this.type(r+e);return a.set(n),a.set(o,r),this.data=a,this.length=r+e,this},p.prototype.push=function(t){return this.combine(new p([t]))},p.prototype.map=function(t){var r,e=this.length,n=new p(this),o=n.data;for(r=0;r= 0; i--) { - for (j = i + 1; j < n; j++) - x[i * nrhs + k] -= lu[i * n + j] * x[j * nrhs + k]; - x[i * nrhs + k] /= lu[i * n + i]; - } - } - - return rhs; - } - - /** - * Solves AX = B using LU factorization, where A is the current matrix and - * B is a Vector/Matrix containing the right hand side(s) of the equation. - * @memberof Matrix - * @param {Matrix|Vector} rhs, right hand side(s) to solve for - * @param {Int32Array} array of pivoted row indices - * @returns {Matrix} a new matrix containing the solutions of the system - **/ - solve(rhs) { - var plu = Matrix.plu(this), - lu = plu[0], - ipiv = plu[1]; - - return lu.lusolve(new Matrix(rhs), ipiv); - } - - /** - * Static method. Augments two matrices `a` and `b` of matching dimensions - * (appends `b` to `a`). - * @memberof Matrix - * @param {Matrix} a - * @param {Matrix} b - * @returns {Matrix} the resultant matrix of `b` augmented to `a` - **/ - static augment(a, b) { - return new Matrix(a).augment(b); - } - - /** - * Augments `matrix` with current matrix. - * @memberof Matrix - * @param {Matrix} matrix - * @returns {Matrix} `this` - **/ - augment(matrix) { - if (matrix.shape.length === 0) - return this; - - var r1 = this.shape[0], - c1 = this.shape[1], - r2 = matrix.shape[0], - c2 = matrix.shape[1], - d1 = this.data, - d2 = matrix.data, - i, j; - - if (r1 !== r2) - throw new Error("Rows do not match."); - - var length = c1 + c2, - data = new this.type(length * r1); - - for (i = 0; i < r1; i++) - for (j = 0; j < c1; j++) - data[i * length + j] = d1[i * c1 + j]; - - for (i = 0; i < r2; i++) - for (j = 0; j < c2; j++) - data[i * length + j + c1] = d2[i * c2 + j]; - - this.shape = [r1, length]; - this.data = data; - - return this; - } - - /** - * Static method. Creates an identity matrix of `size`, takes an optional `type` argument - * which should be an instance of `TypedArray`. - * @memberof Matrix - * @param {Number} size - * @param {TypedArray} type - * @returns {Matrix} an identity matrix of the specified `size` and `type` - **/ - static identity(size, type) { - return Matrix.fill(size, size, function (i, j) { - return i === j ? +1.0 : +0.0; - }) - } - - /** - * Static method. Creates a magic square matrix of `size`, takes an optional `type` argument - * which should be an instance of `TypedArray`. - * @memberof Matrix - * @param {Number} size - * @param {Number} type - * @returns {Matrix} a magic square matrix of the specified `size` and `type` - **/ - static magic(size, type) { - if (size < 0) - throw new Error('invalid size'); - - function f(n, x, y) { - return (x + y * 2 + 1) % n; - } - - type = type || Float64Array; - var data = new type(size * size), - i, j; - for (i = 0; i < size; i++) - for (j = 0; j < size; j++) - data[(size - i - 1) * size + (size - j - 1)] = - f(size, size - j - 1, i) * size + f(size, j, i) + 1; - - return Matrix.fromTypedArray(data, [size, size]); - } - - /** - * Gets the diagonal of a matrix. - * @memberof Matrix - * @returns {Vector} the diagonal of the matrix as a vector - **/ - diag() { - var r = this.shape[0], - c = this.shape[1], - data = new this.type(Math.min(r, c)), - i; - - for (i = 0; i < r && i < c; i++) - data[i] = this.data[i * c + i]; - - return new Vector(data); - } - - /** - * Gets the determinant of any square matrix using LU factorization. - * @memberof Matrix - * @returns {Number} the determinant of the matrix - **/ - determinant() { - if (this.shape[0] !== this.shape[1]) - throw new Error('matrix is not square'); - - var plu = Matrix.plu(this), - ipiv = plu.pop(), - lu = plu.pop(), - r = this.shape[0], - c = this.shape[1], - product = 1, - sign = 1, - i; - - // get sign from ipiv - for (i = 0; i < r; i++) - if (i !== ipiv[i]) - sign *= -1; - - for (i = 0; i < r; i++) - product *= lu.data[i * c + i]; - - return sign * product; - } - - /** - * Gets the trace of the matrix (the sum of all diagonal elements). - * @memberof Matrix - * @returns {Number} the trace of the matrix - **/ - trace() { - var diagonal = this.diag(), - result = 0, - i, l; - - for (i = 0, l = diagonal.length; i < l; i++) - result += diagonal.get(i); - - return result; - } - - /** - * Static method. Checks the equality of two matrices `a` and `b`. - * @memberof Matrix - * @param {Matrix} a - * @param {Matrix} b - * @returns {Boolean} `true` if equal, `false` otherwise - **/ - static equals(a, b) { - return a.equals(b); - } - - /** - * Checks the equality of `matrix` and current matrix. - * @memberof Matrix - * @param {Matrix} matrix - * @returns {Boolean} `true` if equal, `false` otherwise - **/ - equals(matrix) { - var r = this.shape[0], - c = this.shape[1], - size = r * c, - d1 = this.data, - d2 = matrix.data; - - if (r !== matrix.shape[0] || c !== matrix.shape[1] || this.type !== matrix.type) - return false; - - var i; - for (i = 0; i < size; i++) - if (d1[i] !== d2[i]) - return false; - - return true; - } - - /** - * Check if `i` and `j` is within the bounds for current matrix. - * @memberof Matrix - * @param {Number} i - * @param {Number} j - **/ - check(i, j) { - if (Number.isNaN(i) || Number.isNaN(j) || i < 0 || j < 0 || i > this.shape[0] - 1 || j > this.shape[1] - 1) - throw new Error('index out of bounds'); - } - - /** - * Gets the value of the element in row `i`, column `j` of current matrix - * @memberof Matrix - * @param {Number} i - * @param {Number} j - * @returns {Number} the element at row `i`, column `j` of current matrix - **/ - get(i, j) { - this.check(i, j); - return this.data[i * this.shape[1] + j]; - } - - /** - * Sets the element at row `i`, column `j` to value - * @memberof Matrix - * @param {Number} i - * @param {Number} j - * @param {Number} value - * @returns {Matrix} `this` - **/ - set(i, j, value) { - this.check(i, j); - this.data[i * this.shape[1] + j] = value; - return this; - } - - /** - * Swaps two rows `i` and `j` in a matrix - * @memberof Matrix - * @param {Number} i - * @param {Number} j - * @returns {Matrix} `this` - **/ - swap(i, j) { - if (i < 0 || j < 0 || i > this.shape[0] - 1 || j > this.shape[0] - 1) - throw new Error('index out of bounds'); - - var c = this.shape[1]; - - // copy first row - var copy = this.data.slice(i * c, (i + 1) * c); - // move second row into first row spot - this.data.copyWithin(i * c, j * c, (j + 1) * c); - // copy first row back into second row spot - this.data.set(copy, j * c); - - return this; - } - - /** - * Maps a function `callback` to all elements of a copy of current matrix. - * @memberof Matrix - * @param {Function} callback - * @returns {Matrix} the resultant mapped matrix - **/ - map(callback) { - var r = this.shape[0], - c = this.shape[1], - size = r * c, - mapped = new Matrix(this), - data = mapped.data, - i; - - for (i = 0; i < size; i++) - data[i] = callback.call(mapped, data[i], i / c | 0, i % c, data); - - return mapped; - } - - /** - * Functional version of for-looping the elements in a matrix, is - * equivalent to `Array.prototype.forEach`. - * @memberof Matrix - * @param {Function} callback - * @returns {Matrix} `this` - **/ - each(callback) { - var r = this.shape[0], - c = this.shape[1], - size = r * c, - i; - - for (i = 0; i < size; i++) - callback.call(this, this.data[i], i / c | 0, i % c); - - return this; - } - - /** - * Equivalent to `TypedArray.prototype.reduce`. - * @memberof Matrix - * @param {Function} callback - * @param {Number} initialValue - * @returns {Number} result of reduction - **/ - reduce(callback, initialValue) { - var r = this.shape[0], - c = this.shape[1], - size = r * c; - - if (size === 0 && !initialValue) - throw new Error('Reduce of empty matrix with no initial value.'); - - var i = 0, - value = initialValue || this.data[i++]; - - for (; i < size; i++) - value = callback.call(this, value, this.data[i], i / c | 0, i % c); - return value; - } - - /** - * Finds the rank of the matrix using row echelon form - * @memberof Matrix - * @returns {Number} rank - **/ - rank() { - var vectors = this - .toArray() - .map(function(r) { - return new Vector(r); - }); - - var r = this.shape[0], - c = this.shape[1], - counter = 0, - i, j, tmp, - pivot, target, scalar; - - for (i = 0; i < r - 1; i++) { - // go through each row until the row before the last - pivot = null; - for (j = i; j < r; j++) { - // find the pivot (first row where column of same index is non-zero) - if (vectors[i].get(i)) { - if (i !== j) { - // if not the current row, swap the rows, bring pivot the current row index - tmp = vectors[i]; - vectors[i] = vectors[j]; - vectors[j] = tmp; - } - pivot = vectors[i]; - break; - } - } - // if pivot not found, continue - if (!pivot) - continue; - - // otherwise, for all rows underneath pivot, cancel all column index to zero - for (j = (i + 1); j < r; j++) { - target = vectors[j]; - scalar = target.get(i) / pivot.get(i); - vectors[j] = target.subtract(pivot.scale(scalar)); - } - } - - // now vectors should be in row echelon form! - // use optimized loops to count number of vectors that have non-zero values - for (i = 0; i < r; i++) { - for (j = 0; j < c; j++) { - if (vectors[i].get(j)) { - counter++; - break; - } - } - } - - // should be rank - return counter; - } - - static rank(matrix) { - return new Matrix(matrix).rank(); - } - - /** - * Converts current matrix into a readable formatted string - * @memberof Matrix - * @returns {String} a string of the matrix' contents - **/ - toString() { - var result = [], - r = this.shape[0], - c = this.shape[1], - i; - - for (i = 0; i < r; i++) - // get string version of current row and store it - result.push('[' + this.data.subarray(i * c, (i + 1) * c ).toString() + ']'); - - return '[' + result.join(', \n') + ']'; - } - - /** - * Converts current matrix into a two-dimensional array - * @memberof Matrix - * @returns {Array} an array of the matrix' contents - **/ - toArray() { - var result = [], - r = this.shape[0], - c = this.shape[1], - i; - - for (i = 0; i < r; i++) - // copy current row into a native array and store it - result.push(Array.prototype.slice.call(this.data.subarray(i * c, (i + 1) * c))); - - return result; - } -} - -module.exports = Matrix; -try { - window.Matrix = Matrix; -} catch (e) {} diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 00000000..21738c6c --- /dev/null +++ b/package-lock.json @@ -0,0 +1,6653 @@ +{ + "name": "vectorious", + "version": "5.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@babel/code-frame": { + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.51.tgz", + "integrity": "sha1-vXHZsZKvl435FYKdOdQJRFZDmgw=", + "dev": true, + "requires": { + "@babel/highlight": "7.0.0-beta.51" + } + }, + "@babel/generator": { + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.0.0-beta.51.tgz", + "integrity": "sha1-bHV1/952HQdIXgS67cA5LG2eMPY=", + "dev": true, + "requires": { + "@babel/types": "7.0.0-beta.51", + "jsesc": "^2.5.1", + "lodash": "^4.17.5", + "source-map": "^0.5.0", + "trim-right": "^1.0.1" + } + }, + "@babel/helper-function-name": { + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.51.tgz", + "integrity": "sha1-IbSHSiJ8+Z7K/MMKkDAtpaJkBWE=", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "7.0.0-beta.51", + "@babel/template": "7.0.0-beta.51", + "@babel/types": "7.0.0-beta.51" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.51.tgz", + "integrity": "sha1-MoGy0EWvlcFyzpGyCCXYXqRnZBE=", + "dev": true, + "requires": { + "@babel/types": "7.0.0-beta.51" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0-beta.51.tgz", + "integrity": "sha1-imw/ZsTSZTUvwHdIT59ugKUauXg=", + "dev": true, + "requires": { + "@babel/types": "7.0.0-beta.51" + } + }, + "@babel/highlight": { + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0-beta.51.tgz", + "integrity": "sha1-6IRK4loVlcz9QriWI7Q3bKBtIl0=", + "dev": true, + "requires": { + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^3.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "@babel/parser": { + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.0.0-beta.51.tgz", + "integrity": "sha1-J87C30Cd9gr1gnDtj2qlVAnqhvY=", + "dev": true + }, + "@babel/template": { + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.0.0-beta.51.tgz", + "integrity": "sha1-lgKkCuvPNXrpZ34lMu9fyBD1+/8=", + "dev": true, + "requires": { + "@babel/code-frame": "7.0.0-beta.51", + "@babel/parser": "7.0.0-beta.51", + "@babel/types": "7.0.0-beta.51", + "lodash": "^4.17.5" + } + }, + "@babel/traverse": { + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.0.0-beta.51.tgz", + "integrity": "sha1-mB2vLOw0emIx06odnhgDsDqqpKg=", + "dev": true, + "requires": { + "@babel/code-frame": "7.0.0-beta.51", + "@babel/generator": "7.0.0-beta.51", + "@babel/helper-function-name": "7.0.0-beta.51", + "@babel/helper-split-export-declaration": "7.0.0-beta.51", + "@babel/parser": "7.0.0-beta.51", + "@babel/types": "7.0.0-beta.51", + "debug": "^3.1.0", + "globals": "^11.1.0", + "invariant": "^2.2.0", + "lodash": "^4.17.5" + }, + "dependencies": { + "debug": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.5.tgz", + "integrity": "sha512-D61LaDQPQkxJ5AUM2mbSJRbPkNs/TmdmOeLAi1hgDkpDfIfetSrjmWhccwtuResSwMbACjx/xXQofvM9CE/aeg==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + } + } + }, + "@babel/types": { + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.0.0-beta.51.tgz", + "integrity": "sha1-2AK3tUO1g2x3iqaReXq/APPZfqk=", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.5", + "to-fast-properties": "^2.0.0" + } + }, + "@types/mocha": { + "version": "5.2.5", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.5.tgz", + "integrity": "sha512-lAVp+Kj54ui/vLUFxsJTMtWvZraZxum3w3Nwkble2dNuV5VnPA+Mi2oGX9XYJAaIvZi3tn3cbjS/qcJXRb6Bww==", + "dev": true + }, + "@types/node": { + "version": "10.11.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.11.3.tgz", + "integrity": "sha512-3AvcEJAh9EMatxs+OxAlvAEs7OTy6AG94mcH1iqyVDwVVndekLxzwkWQ/Z4SDbY6GO2oyUXyWW8tQ4rENSSQVQ==", + "dev": true + }, + "JSONStream": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.4.tgz", + "integrity": "sha512-Y7vfi3I5oMOYIr+WxV8NZxDSwcbNgzdKYsTNInmycOq9bUYwGg9ryu57Wg5NLmCjqdFPNUmpMBo3kSJN9tCbXg==", + "dev": true, + "requires": { + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + } + }, + "acorn": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.0.2.tgz", + "integrity": "sha512-GXmKIvbrN3TV7aVqAzVFaMW8F8wzVX7voEBRO3bDA64+EX37YSayggRJP5Xig6HYHBkWKpFg9W5gg6orklubhg==", + "dev": true + }, + "acorn-node": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/acorn-node/-/acorn-node-1.6.0.tgz", + "integrity": "sha512-ZsysjEh+Y3i14f7YXCAKJy99RXbd56wHKYBzN4FlFtICIZyFpYwK6OwNJhcz8A/FMtxoUZkJofH1v9KIfNgWmw==", + "dev": true, + "requires": { + "acorn": "^6.0.1", + "acorn-walk": "^6.0.1", + "xtend": "^4.0.1" + } + }, + "acorn-walk": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-6.1.0.tgz", + "integrity": "sha512-ugTb7Lq7u4GfWSqqpwE0bGyoBZNMTok/zDBXxfEG0QM50jNlGhIWjRC1pPN7bvV1anhF+bs+/gNcRw+o55Evbg==", + "dev": true + }, + "ansi-colors": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz", + "integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==", + "dev": true, + "requires": { + "ansi-wrap": "^0.1.0" + } + }, + "ansi-gray": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-gray/-/ansi-gray-0.1.1.tgz", + "integrity": "sha1-KWLPVOyXksSFEKPetSRDaGHvclE=", + "dev": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "ansi-wrap": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz", + "integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768=", + "dev": true + }, + "any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8=", + "dev": true + }, + "anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "requires": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + } + }, + "append-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/append-buffer/-/append-buffer-1.0.2.tgz", + "integrity": "sha1-2CIM9GYIFSXv6lBhTz3mUU36WPE=", + "dev": true, + "requires": { + "buffer-equal": "^1.0.0" + } + }, + "archy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", + "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", + "dev": true + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "arr-filter": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/arr-filter/-/arr-filter-1.1.2.tgz", + "integrity": "sha1-Q/3d0JHo7xGqTEXZzcGOLf8XEe4=", + "dev": true, + "requires": { + "make-iterator": "^1.0.0" + } + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true + }, + "arr-map": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/arr-map/-/arr-map-2.0.2.tgz", + "integrity": "sha1-Onc0X/wc814qkYJWAfnljy4kysQ=", + "dev": true, + "requires": { + "make-iterator": "^1.0.0" + } + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "dev": true + }, + "array-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", + "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=", + "dev": true + }, + "array-filter": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-0.0.1.tgz", + "integrity": "sha1-fajPLiZijtcygDWB/SH2fKzS7uw=", + "dev": true + }, + "array-initial": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/array-initial/-/array-initial-1.1.0.tgz", + "integrity": "sha1-L6dLJnOTccOUe9enrcc74zSz15U=", + "dev": true, + "requires": { + "array-slice": "^1.0.0", + "is-number": "^4.0.0" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", + "dev": true + } + } + }, + "array-last": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/array-last/-/array-last-1.3.0.tgz", + "integrity": "sha512-eOCut5rXlI6aCOS7Z7kCplKRKyiFQ6dHFBem4PwlwKeNFk2/XxTrhRh5T9PyaEWGy/NHTZWbY+nsZlNFJu9rYg==", + "dev": true, + "requires": { + "is-number": "^4.0.0" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", + "dev": true + } + } + }, + "array-map": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/array-map/-/array-map-0.0.0.tgz", + "integrity": "sha1-iKK6tz0c97zVwbEYoAP2b2ZfpmI=", + "dev": true + }, + "array-reduce": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/array-reduce/-/array-reduce-0.0.0.tgz", + "integrity": "sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys=", + "dev": true + }, + "array-slice": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", + "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==", + "dev": true + }, + "array-sort": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-sort/-/array-sort-1.0.0.tgz", + "integrity": "sha512-ihLeJkonmdiAsD7vpgN3CRcx2J2S0TiYW+IS/5zHBI7mKUq3ySvBdzzBfD236ubDBQFiiyG3SWCPc+msQ9KoYg==", + "dev": true, + "requires": { + "default-compare": "^1.0.0", + "get-value": "^2.0.6", + "kind-of": "^5.0.2" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "dev": true, + "requires": { + "array-uniq": "^1.0.1" + } + }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true + }, + "asn1.js": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", + "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", + "dev": true, + "requires": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "assert": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz", + "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=", + "dev": true, + "requires": { + "util": "0.10.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", + "dev": true + }, + "util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "dev": true, + "requires": { + "inherits": "2.0.1" + } + } + } + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "dev": true + }, + "async-done": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/async-done/-/async-done-1.3.1.tgz", + "integrity": "sha512-R1BaUeJ4PMoLNJuk+0tLJgjmEqVsdN118+Z8O+alhnQDQgy0kmD5Mqi0DNEmMx2LM0Ed5yekKu+ZXYvIHceicg==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.2", + "process-nextick-args": "^1.0.7", + "stream-exhaust": "^1.0.1" + }, + "dependencies": { + "process-nextick-args": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", + "dev": true + } + } + }, + "async-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", + "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=", + "dev": true + }, + "async-settle": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/async-settle/-/async-settle-1.0.0.tgz", + "integrity": "sha1-HQqRS7Aldb7IqPOnTlCA9yssDGs=", + "dev": true, + "requires": { + "async-done": "^1.2.2" + } + }, + "atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true + }, + "babel-code-frame": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "dev": true, + "requires": { + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" + } + }, + "babylon": { + "version": "7.0.0-beta.19", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-7.0.0-beta.19.tgz", + "integrity": "sha512-Vg0C9s/REX6/WIXN37UKpv5ZhRi6A4pjHlpkE34+8/a6c2W1Q692n3hmc+SZG5lKRnaExLUbxtJ1SVT+KaCQ/A==", + "dev": true + }, + "bach": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/bach/-/bach-1.2.0.tgz", + "integrity": "sha1-Szzpa/JxNPeaG0FKUcFONMO9mIA=", + "dev": true, + "requires": { + "arr-filter": "^1.1.1", + "arr-flatten": "^1.0.1", + "arr-map": "^2.0.0", + "array-each": "^1.0.0", + "array-initial": "^1.0.0", + "array-last": "^1.1.1", + "async-done": "^1.2.2", + "async-settle": "^1.0.0", + "now-and-later": "^2.0.0" + } + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "requires": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "base64-js": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", + "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==", + "dev": true + }, + "benchmark": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/benchmark/-/benchmark-2.1.4.tgz", + "integrity": "sha1-CfPeMckWQl1JjMLuVloOvzwqVik=", + "dev": true, + "requires": { + "lodash": "^4.17.4", + "platform": "^1.3.3" + } + }, + "binary-extensions": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz", + "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=", + "dev": true + }, + "bluebird": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.2.tgz", + "integrity": "sha512-dhHTWMI7kMx5whMQntl7Vr9C6BvV10lFXDAasnqnrMYhXVCzzk6IO9Fo2L75jXHT07WrOngL1WDXOp+yYS91Yg==", + "dev": true + }, + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", + "dev": true + }, + "browser-pack": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-6.1.0.tgz", + "integrity": "sha512-erYug8XoqzU3IfcU8fUgyHqyOXqIE4tUTTQ+7mqUjQlvnXkOO6OlT9c/ZoJVHYoAaqGxr09CN53G7XIsO4KtWA==", + "dev": true, + "requires": { + "JSONStream": "^1.0.3", + "combine-source-map": "~0.8.0", + "defined": "^1.0.0", + "safe-buffer": "^5.1.1", + "through2": "^2.0.0", + "umd": "^3.0.0" + } + }, + "browser-resolve": { + "version": "1.11.3", + "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.3.tgz", + "integrity": "sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ==", + "dev": true, + "requires": { + "resolve": "1.1.7" + }, + "dependencies": { + "resolve": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", + "dev": true + } + } + }, + "browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true + }, + "browserify": { + "version": "16.2.3", + "resolved": "https://registry.npmjs.org/browserify/-/browserify-16.2.3.tgz", + "integrity": "sha512-zQt/Gd1+W+IY+h/xX2NYMW4orQWhqSwyV+xsblycTtpOuB27h1fZhhNQuipJ4t79ohw4P4mMem0jp/ZkISQtjQ==", + "dev": true, + "requires": { + "JSONStream": "^1.0.3", + "assert": "^1.4.0", + "browser-pack": "^6.0.1", + "browser-resolve": "^1.11.0", + "browserify-zlib": "~0.2.0", + "buffer": "^5.0.2", + "cached-path-relative": "^1.0.0", + "concat-stream": "^1.6.0", + "console-browserify": "^1.1.0", + "constants-browserify": "~1.0.0", + "crypto-browserify": "^3.0.0", + "defined": "^1.0.0", + "deps-sort": "^2.0.0", + "domain-browser": "^1.2.0", + "duplexer2": "~0.1.2", + "events": "^2.0.0", + "glob": "^7.1.0", + "has": "^1.0.0", + "htmlescape": "^1.1.0", + "https-browserify": "^1.0.0", + "inherits": "~2.0.1", + "insert-module-globals": "^7.0.0", + "labeled-stream-splicer": "^2.0.0", + "mkdirp": "^0.5.0", + "module-deps": "^6.0.0", + "os-browserify": "~0.3.0", + "parents": "^1.0.1", + "path-browserify": "~0.0.0", + "process": "~0.11.0", + "punycode": "^1.3.2", + "querystring-es3": "~0.2.0", + "read-only-stream": "^2.0.0", + "readable-stream": "^2.0.2", + "resolve": "^1.1.4", + "shasum": "^1.0.0", + "shell-quote": "^1.6.1", + "stream-browserify": "^2.0.0", + "stream-http": "^2.0.0", + "string_decoder": "^1.1.1", + "subarg": "^1.0.0", + "syntax-error": "^1.1.1", + "through2": "^2.0.0", + "timers-browserify": "^1.0.1", + "tty-browserify": "0.0.1", + "url": "~0.11.0", + "util": "~0.10.1", + "vm-browserify": "^1.0.0", + "xtend": "^4.0.0" + } + }, + "browserify-aes": { + "version": "1.2.0", + "resolved": "http://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "dev": true, + "requires": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "dev": true, + "requires": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" + } + }, + "browserify-des": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", + "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "dev": true, + "requires": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "browserify-rsa": { + "version": "4.0.1", + "resolved": "http://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", + "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "randombytes": "^2.0.1" + } + }, + "browserify-sign": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", + "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", + "dev": true, + "requires": { + "bn.js": "^4.1.1", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.2", + "elliptic": "^6.0.0", + "inherits": "^2.0.1", + "parse-asn1": "^5.0.0" + } + }, + "browserify-zlib": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", + "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", + "dev": true, + "requires": { + "pako": "~1.0.5" + } + }, + "buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.2.1.tgz", + "integrity": "sha512-c+Ko0loDaFfuPWiL02ls9Xd3GO3cPVmUobQ6t3rXNUk304u6hGq+8N/kFi+QEIKhzK3uwolVhLzszmfLmMLnqg==", + "dev": true, + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4" + } + }, + "buffer-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.0.tgz", + "integrity": "sha1-WWFrSYME1Var1GaWayLu2j7KX74=", + "dev": true + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", + "dev": true + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "dev": true + }, + "builtin-status-codes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", + "dev": true + }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "requires": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + } + }, + "cached-path-relative": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.0.2.tgz", + "integrity": "sha512-5r2GqsoEb4qMTTN9J+WzXfjov+hjxT+j3u5K+kIVNIwAd99DLCJE9pBIMP1qVeybV6JiijL385Oz0DcYxfbOIg==", + "dev": true + }, + "camelcase": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", + "dev": true + }, + "catharsis": { + "version": "0.8.9", + "resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.8.9.tgz", + "integrity": "sha1-mMyJDKZS3S7w5ws3klMQ/56Q/Is=", + "dev": true, + "requires": { + "underscore-contrib": "~0.3.0" + } + }, + "chalk": { + "version": "1.1.3", + "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "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" + } + }, + "chokidar": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.4.tgz", + "integrity": "sha512-z9n7yt9rOvIJrMhvDtDictKrkFHeihkNl6uWMmZlmL6tJtX9Cs+87oK+teBx+JIgzvbX3yZHT3eF8vpbDxHJXQ==", + "dev": true, + "requires": { + "anymatch": "^2.0.0", + "async-each": "^1.0.0", + "braces": "^2.3.0", + "fsevents": "^1.2.2", + "glob-parent": "^3.1.0", + "inherits": "^2.0.1", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "lodash.debounce": "^4.0.8", + "normalize-path": "^2.1.1", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.0.0", + "upath": "^1.0.5" + } + }, + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" + } + }, + "clone": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", + "dev": true + }, + "clone-buffer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz", + "integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg=", + "dev": true + }, + "clone-stats": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", + "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=", + "dev": true + }, + "cloneable-readable": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.2.tgz", + "integrity": "sha512-Bq6+4t+lbM8vhTs/Bef5c5AdEMtapp/iFb6+s4/Hh9MVTt8OLKH7ZOOZSCT+Ys7hsHvqv0GuMPJ1lnQJVHvxpg==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "process-nextick-args": "^2.0.0", + "readable-stream": "^2.3.5" + } + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true + }, + "collection-map": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-map/-/collection-map-1.0.0.tgz", + "integrity": "sha1-rqDwb40mx4DCt1SUOFVEsiVa8Yw=", + "dev": true, + "requires": { + "arr-map": "^2.0.2", + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + } + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dev": true, + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "color-support": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", + "dev": true + }, + "combine-source-map": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.8.0.tgz", + "integrity": "sha1-pY0N8ELBhvz4IqjoAV9UUNLXmos=", + "dev": true, + "requires": { + "convert-source-map": "~1.1.0", + "inline-source-map": "~0.6.0", + "lodash.memoize": "~3.0.3", + "source-map": "~0.5.3" + } + }, + "commander": { + "version": "2.17.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz", + "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==", + "dev": true + }, + "component-emitter": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "console-browserify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", + "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", + "dev": true, + "requires": { + "date-now": "^0.1.4" + } + }, + "constants-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", + "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", + "dev": true + }, + "convert-source-map": { + "version": "1.1.3", + "resolved": "http://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz", + "integrity": "sha1-SCnId+n+SbMWHzvzZziI4gRpmGA=", + "dev": true + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "dev": true + }, + "copy-props": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/copy-props/-/copy-props-2.0.4.tgz", + "integrity": "sha512-7cjuUME+p+S3HZlbllgsn2CDwS+5eCCX16qBgNC4jgSTf49qR1VKy/Zhl400m0IQXl/bPGEVqncgUUMjrr4s8A==", + "dev": true, + "requires": { + "each-props": "^1.3.0", + "is-plain-object": "^2.0.1" + } + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "create-ecdh": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", + "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "elliptic": "^6.0.0" + } + }, + "create-hash": { + "version": "1.2.0", + "resolved": "http://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "dev": true, + "requires": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "create-hmac": { + "version": "1.1.7", + "resolved": "http://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "dev": true, + "requires": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "crypto-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "dev": true, + "requires": { + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" + } + }, + "d": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", + "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", + "dev": true, + "requires": { + "es5-ext": "^0.10.9" + } + }, + "date-now": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", + "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", + "dev": true + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true + }, + "default-compare": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/default-compare/-/default-compare-1.0.0.tgz", + "integrity": "sha512-QWfXlM0EkAbqOCbD/6HjdwT19j7WCkMyiRhWilc4H9/5h/RzTF9gv5LYh1+CmDV5d1rki6KAWLtQale0xt20eQ==", + "dev": true, + "requires": { + "kind-of": "^5.0.2" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "default-resolution": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/default-resolution/-/default-resolution-2.0.0.tgz", + "integrity": "sha1-vLgrqnKtebQmp2cy8aga1t8m1oQ=", + "dev": true + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "requires": { + "object-keys": "^1.0.12" + } + }, + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "defined": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", + "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=", + "dev": true + }, + "del": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/del/-/del-3.0.0.tgz", + "integrity": "sha1-U+z2mf/LyzljdpGrE7rxYIGXZuU=", + "dev": true, + "requires": { + "globby": "^6.1.0", + "is-path-cwd": "^1.0.0", + "is-path-in-cwd": "^1.0.0", + "p-map": "^1.1.1", + "pify": "^3.0.0", + "rimraf": "^2.2.8" + } + }, + "deps-sort": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/deps-sort/-/deps-sort-2.0.0.tgz", + "integrity": "sha1-CRckkC6EZYJg65EHSMzNGvbiH7U=", + "dev": true, + "requires": { + "JSONStream": "^1.0.3", + "shasum": "^1.0.0", + "subarg": "^1.0.0", + "through2": "^2.0.0" + } + }, + "des.js": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", + "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "detect-file": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", + "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=", + "dev": true + }, + "detective": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/detective/-/detective-5.1.0.tgz", + "integrity": "sha512-TFHMqfOvxlgrfVzTEkNBSh9SvSNX/HfF4OFI2QFGCyPm02EsyILqnUeb5P6q7JZ3SFNTBL5t2sePRgrN4epUWQ==", + "dev": true, + "requires": { + "acorn-node": "^1.3.0", + "defined": "^1.0.0", + "minimist": "^1.1.1" + } + }, + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true + }, + "diffie-hellman": { + "version": "5.0.3", + "resolved": "http://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + } + }, + "domain-browser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", + "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", + "dev": true + }, + "duplexer2": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", + "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=", + "dev": true, + "requires": { + "readable-stream": "^2.0.2" + } + }, + "duplexify": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.6.0.tgz", + "integrity": "sha512-fO3Di4tBKJpYTFHAxTU00BcfWMY9w24r/x21a6rZRbsD/ToUgGxsMbiGRmB7uVAXeGKXD9MwiLZa5E97EVgIRQ==", + "dev": true, + "requires": { + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" + } + }, + "each-props": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/each-props/-/each-props-1.3.2.tgz", + "integrity": "sha512-vV0Hem3zAGkJAyU7JSjixeU66rwdynTAa1vofCrSA5fEln+m67Az9CcnkVD776/fsN/UjIWmBDoNRS6t6G9RfA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.1", + "object.defaults": "^1.1.0" + } + }, + "elliptic": { + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.1.tgz", + "integrity": "sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ==", + "dev": true, + "requires": { + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.0" + } + }, + "end-of-stream": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", + "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", + "dev": true, + "requires": { + "once": "^1.4.0" + } + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "es5-ext": { + "version": "0.10.46", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.46.tgz", + "integrity": "sha512-24XxRvJXNFwEMpJb3nOkiRJKRoupmjYmOPVlI65Qy2SrtxwOTB+g6ODjBKOtwEHbYrhWRty9xxOWLNdClT2djw==", + "dev": true, + "requires": { + "es6-iterator": "~2.0.3", + "es6-symbol": "~3.1.1", + "next-tick": "1" + } + }, + "es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "es6-symbol": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", + "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, + "es6-weak-map": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz", + "integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "^0.10.14", + "es6-iterator": "^2.0.1", + "es6-symbol": "^3.1.1" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "esutils": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "dev": true + }, + "events": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/events/-/events-2.1.0.tgz", + "integrity": "sha512-3Zmiobend8P9DjmKAty0Era4jV8oJ0yGYe2nJJAxgymF9+N8F2m0hhZiMoWtcfepExzNKZumFU3ksdQbInGWCg==", + "dev": true + }, + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "dev": true, + "requires": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "expand-tilde": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", + "dev": true, + "requires": { + "homedir-polyfill": "^1.0.1" + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "fancy-log": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.2.tgz", + "integrity": "sha1-9BEl49hPLn2JpD0G2VjI94vha+E=", + "dev": true, + "requires": { + "ansi-gray": "^0.1.1", + "color-support": "^1.1.3", + "time-stamp": "^1.0.0" + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "findup-sync": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz", + "integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=", + "dev": true, + "requires": { + "detect-file": "^1.0.0", + "is-glob": "^3.1.0", + "micromatch": "^3.0.4", + "resolve-dir": "^1.0.1" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, + "fined": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fined/-/fined-1.1.0.tgz", + "integrity": "sha1-s33IRLdqL15wgeiE98CuNE8VNHY=", + "dev": true, + "requires": { + "expand-tilde": "^2.0.2", + "is-plain-object": "^2.0.3", + "object.defaults": "^1.1.0", + "object.pick": "^1.2.0", + "parse-filepath": "^1.0.1" + } + }, + "flagged-respawn": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.0.tgz", + "integrity": "sha1-Tnmumy6zi/hrO7Vr8+ClaqX8q9c=", + "dev": true + }, + "flush-write-stream": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.0.3.tgz", + "integrity": "sha512-calZMC10u0FMUqoiunI2AiGIIUtUIvifNwkHhNupZH4cbNnW1Itkoh/Nf5HFYmDrwWPjrUxpkZT0KhuCq0jmGw==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.4" + } + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "for-own": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", + "dev": true, + "requires": { + "for-in": "^1.0.1" + } + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, + "requires": { + "map-cache": "^0.2.2" + } + }, + "fs-mkdirp-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz", + "integrity": "sha1-C3gV/DIBxqaeFNuYzgmMFpNSWes=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "through2": "^2.0.3" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "fsevents": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz", + "integrity": "sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==", + "dev": true, + "optional": true, + "requires": { + "nan": "^2.9.2", + "node-pre-gyp": "^0.10.0" + }, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "aproba": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "chownr": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "debug": { + "version": "2.6.9", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ms": "2.0.0" + } + }, + "deep-extend": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "optional": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "fs-minipass": { + "version": "1.2.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "glob": { + "version": "7.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "iconv-lite": { + "version": "0.4.21", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safer-buffer": "^2.1.0" + } + }, + "ignore-walk": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minimatch": "^3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "ini": { + "version": "1.3.5", + "bundled": true, + "dev": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true, + "optional": true + }, + "minipass": { + "version": "2.2.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "^5.1.1", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "needle": { + "version": "2.2.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "debug": "^2.1.2", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + } + }, + "node-pre-gyp": { + "version": "0.10.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.0", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.1.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, + "npm-bundled": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "npm-packlist": { + "version": "1.1.10", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" + } + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "wrappy": "1" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "osenv": { + "version": "0.1.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "process-nextick-args": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "rc": { + "version": "1.2.7", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "deep-extend": "^0.5.1", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rimraf": { + "version": "2.6.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "glob": "^7.0.5" + } + }, + "safe-buffer": { + "version": "5.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "safer-buffer": { + "version": "2.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "sax": { + "version": "1.2.4", + "bundled": true, + "dev": true, + "optional": true + }, + "semver": { + "version": "5.5.0", + "bundled": true, + "dev": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "tar": { + "version": "4.4.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "chownr": "^1.0.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.2.4", + "minizlib": "^1.1.0", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.1", + "yallist": "^3.0.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "wide-align": { + "version": "1.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "string-width": "^1.0.2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "yallist": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "get-assigned-identifiers": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/get-assigned-identifiers/-/get-assigned-identifiers-1.2.0.tgz", + "integrity": "sha512-mBBwmeGTrxEMO4pMaaf/uUEFHnYtwr8FTe8Y/mer4rcV/bye0qGm6pw1bGZFGStxC5O76c5ZAVBGnqHmOaJpdQ==", + "dev": true + }, + "get-caller-file": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", + "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", + "dev": true + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "dev": true + }, + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, + "glob-stream": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-6.1.0.tgz", + "integrity": "sha1-cEXJlBOz65SIjYOrRtC0BMx73eQ=", + "dev": true, + "requires": { + "extend": "^3.0.0", + "glob": "^7.1.1", + "glob-parent": "^3.1.0", + "is-negated-glob": "^1.0.0", + "ordered-read-streams": "^1.0.0", + "pumpify": "^1.3.5", + "readable-stream": "^2.1.5", + "remove-trailing-separator": "^1.0.1", + "to-absolute-glob": "^2.0.0", + "unique-stream": "^2.0.2" + } + }, + "glob-watcher": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-5.0.1.tgz", + "integrity": "sha512-fK92r2COMC199WCyGUblrZKhjra3cyVMDiypDdqg1vsSDmexnbYivK1kNR4QItiNXLKmGlqan469ks67RtNa2g==", + "dev": true, + "requires": { + "async-done": "^1.2.0", + "chokidar": "^2.0.0", + "just-debounce": "^1.0.0", + "object.defaults": "^1.1.0" + } + }, + "global-modules": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "dev": true, + "requires": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + } + }, + "global-prefix": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", + "dev": true, + "requires": { + "expand-tilde": "^2.0.2", + "homedir-polyfill": "^1.0.1", + "ini": "^1.3.4", + "is-windows": "^1.0.1", + "which": "^1.2.14" + } + }, + "globals": { + "version": "11.8.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.8.0.tgz", + "integrity": "sha512-io6LkyPVuzCHBSQV9fmOwxZkUk6nIaGmxheLDgmuFv89j0fm2aqDbIXKAGfzCMHqz3HLF2Zf8WSG6VqMh2qFmA==", + "dev": true + }, + "globby": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", + "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", + "dev": true, + "requires": { + "array-union": "^1.0.1", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, + "glogg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.1.tgz", + "integrity": "sha512-ynYqXLoluBKf9XGR1gA59yEJisIL7YHEH4xr3ZziHB5/yl4qWfaK8Js9jGe6gBGCSCKVqiyO30WnRZADvemUNw==", + "dev": true, + "requires": { + "sparkles": "^1.0.0" + } + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + }, + "growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "dev": true + }, + "gulp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/gulp/-/gulp-4.0.0.tgz", + "integrity": "sha1-lXZsYB2t5Kd+0+eyttwDiBtZY2Y=", + "dev": true, + "requires": { + "glob-watcher": "^5.0.0", + "gulp-cli": "^2.0.0", + "undertaker": "^1.0.0", + "vinyl-fs": "^3.0.0" + }, + "dependencies": { + "gulp-cli": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/gulp-cli/-/gulp-cli-2.0.1.tgz", + "integrity": "sha512-RxujJJdN8/O6IW2nPugl7YazhmrIEjmiVfPKrWt68r71UCaLKS71Hp0gpKT+F6qOUFtr7KqtifDKaAJPRVvMYQ==", + "dev": true, + "requires": { + "ansi-colors": "^1.0.1", + "archy": "^1.0.0", + "array-sort": "^1.0.0", + "color-support": "^1.1.3", + "concat-stream": "^1.6.0", + "copy-props": "^2.0.1", + "fancy-log": "^1.3.2", + "gulplog": "^1.0.0", + "interpret": "^1.1.0", + "isobject": "^3.0.1", + "liftoff": "^2.5.0", + "matchdep": "^2.0.0", + "mute-stdout": "^1.0.0", + "pretty-hrtime": "^1.0.0", + "replace-homedir": "^1.0.0", + "semver-greatest-satisfied-range": "^1.1.0", + "v8flags": "^3.0.1", + "yargs": "^7.1.0" + } + } + } + }, + "gulp-streamify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/gulp-streamify/-/gulp-streamify-1.0.2.tgz", + "integrity": "sha1-ANazgU1IbAiPeHOO0HZqvBY4nk0=", + "dev": true, + "requires": { + "plexer": "1.0.1" + } + }, + "gulp-uglify": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/gulp-uglify/-/gulp-uglify-3.0.1.tgz", + "integrity": "sha512-KVffbGY9d4Wv90bW/B1KZJyunLMyfHTBbilpDvmcrj5Go0/a1G3uVpt+1gRBWSw/11dqR3coJ1oWNTt1AiXuWQ==", + "dev": true, + "requires": { + "gulplog": "^1.0.0", + "has-gulplog": "^0.1.0", + "lodash": "^4.13.1", + "make-error-cause": "^1.1.1", + "safe-buffer": "^5.1.2", + "through2": "^2.0.0", + "uglify-js": "^3.0.5", + "vinyl-sourcemaps-apply": "^0.2.0" + } + }, + "gulplog": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz", + "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=", + "dev": true, + "requires": { + "glogg": "^1.0.0" + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "has-gulplog": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/has-gulplog/-/has-gulplog-0.1.0.tgz", + "integrity": "sha1-ZBTIKRNpfaUVkDl9r7EvIpZ4Ec4=", + "dev": true, + "requires": { + "sparkles": "^1.0.0" + } + }, + "has-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", + "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", + "dev": true + }, + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dev": true, + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "hash-base": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", + "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "hash.js": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.5.tgz", + "integrity": "sha512-eWI5HG9Np+eHV1KQhisXWwM+4EPPYe5dFX1UZZH7k/E3JzDEazVH+VGlZi6R94ZqImq+A3D1mCEtrFIfg/E7sA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "he": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", + "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", + "dev": true + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "dev": true, + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "homedir-polyfill": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz", + "integrity": "sha1-TCu8inWJmP7r9e1oWA921GdotLw=", + "dev": true, + "requires": { + "parse-passwd": "^1.0.0" + } + }, + "hosted-git-info": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", + "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", + "dev": true + }, + "htmlescape": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz", + "integrity": "sha1-OgPtwiFLyjtmQko+eVk0lQnLA1E=", + "dev": true + }, + "https-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", + "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", + "dev": true + }, + "ieee754": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz", + "integrity": "sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA==", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "dev": true + }, + "inline-source-map": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.6.2.tgz", + "integrity": "sha1-+Tk0ccGKedFyT4Y/o4tYY3Ct4qU=", + "dev": true, + "requires": { + "source-map": "~0.5.3" + } + }, + "insert-module-globals": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-7.2.0.tgz", + "integrity": "sha512-VE6NlW+WGn2/AeOMd496AHFYmE7eLKkUY6Ty31k4og5vmA3Fjuwe9v6ifH6Xx/Hz27QvdoMoviw1/pqWRB09Sw==", + "dev": true, + "requires": { + "JSONStream": "^1.0.3", + "acorn-node": "^1.5.2", + "combine-source-map": "^0.8.0", + "concat-stream": "^1.6.1", + "is-buffer": "^1.1.0", + "path-is-absolute": "^1.0.1", + "process": "~0.11.0", + "through2": "^2.0.0", + "undeclared-identifiers": "^1.1.2", + "xtend": "^4.0.0" + } + }, + "interpret": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", + "integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=", + "dev": true + }, + "invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "dev": true, + "requires": { + "loose-envify": "^1.0.0" + } + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "dev": true + }, + "is-absolute": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", + "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", + "dev": true, + "requires": { + "is-relative": "^1.0.0", + "is-windows": "^1.0.1" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "dev": true, + "requires": { + "binary-extensions": "^1.0.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-builtin-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "dev": true, + "requires": { + "builtin-modules": "^1.0.0" + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-glob": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", + "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-negated-glob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-negated-glob/-/is-negated-glob-1.0.0.tgz", + "integrity": "sha1-aRC8pdqMleeEtXUbl2z1oQ/uNtI=", + "dev": true + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-path-cwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", + "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=", + "dev": true + }, + "is-path-in-cwd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", + "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", + "dev": true, + "requires": { + "is-path-inside": "^1.0.0" + } + }, + "is-path-inside": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", + "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", + "dev": true, + "requires": { + "path-is-inside": "^1.0.1" + } + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "is-relative": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", + "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", + "dev": true, + "requires": { + "is-unc-path": "^1.0.0" + } + }, + "is-unc-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", + "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", + "dev": true, + "requires": { + "unc-path-regex": "^0.1.2" + } + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true + }, + "is-valid-glob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-1.0.0.tgz", + "integrity": "sha1-Kb8+/3Ab4tTTFdusw5vDn+j2Aao=", + "dev": true + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true + }, + "istanbul-lib-coverage": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz", + "integrity": "sha512-nPvSZsVlbG9aLhZYaC3Oi1gT/tpyo3Yt5fNyf6NmcKIayz4VV/txxJFFKAK/gU4dcNn8ehsanBbVHVl0+amOLA==", + "dev": true + }, + "istanbul-lib-instrument": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-2.3.2.tgz", + "integrity": "sha512-l7TD/VnBsIB2OJvSyxaLW/ab1+92dxZNH9wLH7uHPPioy3JZ8tnx2UXUdKmdkgmP2EFPzg64CToUP6dAS3U32Q==", + "dev": true, + "requires": { + "@babel/generator": "7.0.0-beta.51", + "@babel/parser": "7.0.0-beta.51", + "@babel/template": "7.0.0-beta.51", + "@babel/traverse": "7.0.0-beta.51", + "@babel/types": "7.0.0-beta.51", + "istanbul-lib-coverage": "^2.0.1", + "semver": "^5.5.0" + } + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "dev": true + }, + "js-yaml": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", + "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "js2xmlparser": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-3.0.0.tgz", + "integrity": "sha1-P7YOqgicVED5MZ9RdgzNB+JJlzM=", + "dev": true, + "requires": { + "xmlcreate": "^1.0.1" + } + }, + "jsdoc": { + "version": "3.5.5", + "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-3.5.5.tgz", + "integrity": "sha512-6PxB65TAU4WO0Wzyr/4/YhlGovXl0EVYfpKbpSroSj0qBxT4/xod/l40Opkm38dRHRdQgdeY836M0uVnJQG7kg==", + "dev": true, + "requires": { + "babylon": "7.0.0-beta.19", + "bluebird": "~3.5.0", + "catharsis": "~0.8.9", + "escape-string-regexp": "~1.0.5", + "js2xmlparser": "~3.0.0", + "klaw": "~2.0.0", + "marked": "~0.3.6", + "mkdirp": "~0.5.1", + "requizzle": "~0.2.1", + "strip-json-comments": "~2.0.1", + "taffydb": "2.6.2", + "underscore": "~1.8.3" + } + }, + "jsesc": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.1.tgz", + "integrity": "sha1-5CGiqOINawgZ3yiQj3glJrlt0f4=", + "dev": true + }, + "json-stable-stringify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz", + "integrity": "sha1-YRwj6BTbN1Un34URk9tZ3Sryf0U=", + "dev": true, + "requires": { + "jsonify": "~0.0.0" + } + }, + "jsonify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", + "dev": true + }, + "jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", + "dev": true + }, + "just-debounce": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/just-debounce/-/just-debounce-1.0.0.tgz", + "integrity": "sha1-h/zPrv/AtozRnVX2cilD+SnqNeo=", + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + }, + "klaw": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-2.0.0.tgz", + "integrity": "sha1-WcEo4Nxc5BAgEVEZTuucv4WGUPY=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.9" + }, + "dependencies": { + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + } + } + }, + "labeled-stream-splicer": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-2.0.1.tgz", + "integrity": "sha512-MC94mHZRvJ3LfykJlTUipBqenZz1pacOZEMhhQ8dMGcDHs0SBE5GbsavUXV7YtP3icBW17W0Zy1I0lfASmo9Pg==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "isarray": "^2.0.4", + "stream-splicer": "^2.0.0" + }, + "dependencies": { + "isarray": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.4.tgz", + "integrity": "sha512-GMxXOiUirWg1xTKRipM0Ek07rX+ubx4nNVElTJdNLYmNO/2YrDkgJGw9CljXn+r4EWiDQg/8lsRdHyg2PJuUaA==", + "dev": true + } + } + }, + "last-run": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/last-run/-/last-run-1.1.1.tgz", + "integrity": "sha1-RblpQsF7HHnHchmCWbqUO+v4yls=", + "dev": true, + "requires": { + "default-resolution": "^2.0.0", + "es6-weak-map": "^2.0.1" + } + }, + "lazystream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz", + "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=", + "dev": true, + "requires": { + "readable-stream": "^2.0.5" + } + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "dev": true, + "requires": { + "invert-kv": "^1.0.0" + } + }, + "lead": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lead/-/lead-1.0.0.tgz", + "integrity": "sha1-bxT5mje+Op3XhPVJVpDlkDRm7kI=", + "dev": true, + "requires": { + "flush-write-stream": "^1.0.2" + } + }, + "liftoff": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-2.5.0.tgz", + "integrity": "sha1-IAkpG7Mc6oYbvxCnwVooyvdcMew=", + "dev": true, + "requires": { + "extend": "^3.0.0", + "findup-sync": "^2.0.0", + "fined": "^1.0.1", + "flagged-respawn": "^1.0.0", + "is-plain-object": "^2.0.4", + "object.map": "^1.0.0", + "rechoir": "^0.6.2", + "resolve": "^1.1.7" + } + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, + "lodash": { + "version": "4.17.11", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + }, + "lodash.debounce": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", + "dev": true + }, + "lodash.memoize": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz", + "integrity": "sha1-LcvSwofLwKVcxCMovQxzYVDVPj8=", + "dev": true + }, + "loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dev": true, + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, + "make-error": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz", + "integrity": "sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g==", + "dev": true + }, + "make-error-cause": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/make-error-cause/-/make-error-cause-1.2.2.tgz", + "integrity": "sha1-3wOI/NCzeBbf8KX7gQiTl3fcvJ0=", + "dev": true, + "requires": { + "make-error": "^1.2.0" + } + }, + "make-iterator": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", + "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", + "dev": true, + "requires": { + "kind-of": "^6.0.2" + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dev": true, + "requires": { + "object-visit": "^1.0.0" + } + }, + "marked": { + "version": "0.3.19", + "resolved": "https://registry.npmjs.org/marked/-/marked-0.3.19.tgz", + "integrity": "sha512-ea2eGWOqNxPcXv8dyERdSr/6FmzvWwzjMxpfGB/sbMccXoct+xY+YukPD+QTUZwyvK7BZwcr4m21WBOW41pAkg==", + "dev": true + }, + "matchdep": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/matchdep/-/matchdep-2.0.0.tgz", + "integrity": "sha1-xvNINKDY28OzfCfui7yyfHd1WC4=", + "dev": true, + "requires": { + "findup-sync": "^2.0.0", + "micromatch": "^3.0.4", + "resolve": "^1.4.0", + "stack-trace": "0.0.10" + } + }, + "md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "dev": true, + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + }, + "miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "dev": true, + "requires": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + } + }, + "minami": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/minami/-/minami-1.2.3.tgz", + "integrity": "sha1-mbbc37LwpU2hycj3qjoyd4eq+fg=", + "dev": true + }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "dev": true + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "mixin-deep": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", + "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", + "dev": true, + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + } + } + }, + "mocha": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-5.2.0.tgz", + "integrity": "sha512-2IUgKDhc3J7Uug+FxMXuqIyYzH7gJjXECKe/w43IGgQHTSj3InJi+yAA7T24L9bQMRKiUEHxEX37G5JpVUGLcQ==", + "dev": true, + "requires": { + "browser-stdout": "1.3.1", + "commander": "2.15.1", + "debug": "3.1.0", + "diff": "3.5.0", + "escape-string-regexp": "1.0.5", + "glob": "7.1.2", + "growl": "1.10.5", + "he": "1.1.1", + "minimatch": "3.0.4", + "mkdirp": "0.5.1", + "supports-color": "5.4.0" + }, + "dependencies": { + "commander": { + "version": "2.15.1", + "resolved": "http://registry.npmjs.org/commander/-/commander-2.15.1.tgz", + "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", + "dev": true + }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "module-deps": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-6.1.0.tgz", + "integrity": "sha512-NPs5N511VD1rrVJihSso/LiBShRbJALYBKzDW91uZYy7BpjnO4bGnZL3HjZ9yKcFdZUWwaYjDz9zxbuP7vKMuQ==", + "dev": true, + "requires": { + "JSONStream": "^1.0.3", + "browser-resolve": "^1.7.0", + "cached-path-relative": "^1.0.0", + "concat-stream": "~1.6.0", + "defined": "^1.0.0", + "detective": "^5.0.2", + "duplexer2": "^0.1.2", + "inherits": "^2.0.1", + "parents": "^1.0.0", + "readable-stream": "^2.0.2", + "resolve": "^1.4.0", + "stream-combiner2": "^1.1.1", + "subarg": "^1.0.0", + "through2": "^2.0.0", + "xtend": "^4.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "mute-stdout": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mute-stdout/-/mute-stdout-1.0.1.tgz", + "integrity": "sha512-kDcwXR4PS7caBpuRYYBUz9iVixUk3anO3f5OYFiIPwK/20vCzKCHyKoulbiDY1S53zD2bxUpxN/IJ+TnXjfvxg==", + "dev": true + }, + "nan": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.11.0.tgz", + "integrity": "sha512-F4miItu2rGnV2ySkXOQoA8FKz/SR2Q2sWP0sbTxNxz/tuokeC8WxOhPMcwi0qIyGtVn/rrSeLbvVkznqCdwYnw==", + "dev": true, + "optional": true + }, + "nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + } + }, + "nblas": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/nblas/-/nblas-1.2.2.tgz", + "integrity": "sha1-zHUMpnKSDeWcIHSr1AY77ua4M4Q=", + "optional": true + }, + "next-tick": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", + "dev": true + }, + "normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "dev": true, + "requires": { + "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": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + }, + "now-and-later": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/now-and-later/-/now-and-later-2.0.0.tgz", + "integrity": "sha1-vGHLtFbXnLMiB85HygUTb/Ln1u4=", + "dev": true, + "requires": { + "once": "^1.3.2" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "nyc": { + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/nyc/-/nyc-13.0.1.tgz", + "integrity": "sha512-Op/bjhEF74IMtzMmgYt+ModTeMHoPZzHe4qseUguPBwg5qC6r4rYMBt1L3yRXQIbjUpEqmn24/1xAC/umQGU7w==", + "dev": true, + "requires": { + "archy": "^1.0.0", + "arrify": "^1.0.1", + "caching-transform": "^2.0.0", + "convert-source-map": "^1.5.1", + "debug-log": "^1.0.1", + "find-cache-dir": "^2.0.0", + "find-up": "^3.0.0", + "foreground-child": "^1.5.6", + "glob": "^7.1.2", + "istanbul-lib-coverage": "^2.0.1", + "istanbul-lib-hook": "^2.0.1", + "istanbul-lib-instrument": "^2.3.2", + "istanbul-lib-report": "^2.0.1", + "istanbul-lib-source-maps": "^2.0.1", + "istanbul-reports": "^2.0.0", + "make-dir": "^1.3.0", + "merge-source-map": "^1.1.0", + "resolve-from": "^4.0.0", + "rimraf": "^2.6.2", + "signal-exit": "^3.0.2", + "spawn-wrap": "^1.4.2", + "test-exclude": "^5.0.0", + "uuid": "^3.3.2", + "yargs": "11.1.0", + "yargs-parser": "^9.0.2" + }, + "dependencies": { + "align-text": { + "version": "0.1.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" + } + }, + "amdefine": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "ansi-regex": { + "version": "3.0.0", + "bundled": true, + "dev": true + }, + "append-transform": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "default-require-extensions": "^2.0.0" + } + }, + "archy": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "arrify": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "async": { + "version": "1.5.2", + "bundled": true, + "dev": true + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "builtin-modules": { + "version": "1.1.1", + "bundled": true, + "dev": true + }, + "caching-transform": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "make-dir": "^1.0.0", + "md5-hex": "^2.0.0", + "package-hash": "^2.0.0", + "write-file-atomic": "^2.0.0" + } + }, + "camelcase": { + "version": "1.2.1", + "bundled": true, + "dev": true, + "optional": true + }, + "center-align": { + "version": "0.1.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "align-text": "^0.1.3", + "lazy-cache": "^1.0.3" + } + }, + "cliui": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "center-align": "^0.1.1", + "right-align": "^0.1.1", + "wordwrap": "0.0.2" + }, + "dependencies": { + "wordwrap": { + "version": "0.0.2", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "commondir": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true + }, + "convert-source-map": { + "version": "1.5.1", + "bundled": true, + "dev": true + }, + "cross-spawn": { + "version": "4.0.2", + "bundled": true, + "dev": true, + "requires": { + "lru-cache": "^4.0.1", + "which": "^1.2.9" + } + }, + "debug": { + "version": "3.1.0", + "bundled": true, + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "debug-log": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "decamelize": { + "version": "1.2.0", + "bundled": true, + "dev": true + }, + "default-require-extensions": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "strip-bom": "^3.0.0" + } + }, + "error-ex": { + "version": "1.3.2", + "bundled": true, + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "es6-error": { + "version": "4.1.1", + "bundled": true, + "dev": true + }, + "execa": { + "version": "0.7.0", + "bundled": true, + "dev": true, + "requires": { + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + }, + "dependencies": { + "cross-spawn": { + "version": "5.1.0", + "bundled": true, + "dev": true, + "requires": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + } + } + }, + "find-cache-dir": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^1.0.0", + "pkg-dir": "^3.0.0" + } + }, + "find-up": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "foreground-child": { + "version": "1.5.6", + "bundled": true, + "dev": true, + "requires": { + "cross-spawn": "^4", + "signal-exit": "^3.0.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "get-caller-file": { + "version": "1.0.3", + "bundled": true, + "dev": true + }, + "get-stream": { + "version": "3.0.0", + "bundled": true, + "dev": true + }, + "glob": { + "version": "7.1.2", + "bundled": true, + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "graceful-fs": { + "version": "4.1.11", + "bundled": true, + "dev": true + }, + "handlebars": { + "version": "4.0.11", + "bundled": true, + "dev": true, + "requires": { + "async": "^1.4.0", + "optimist": "^0.6.1", + "source-map": "^0.4.4", + "uglify-js": "^2.6" + }, + "dependencies": { + "source-map": { + "version": "0.4.4", + "bundled": true, + "dev": true, + "requires": { + "amdefine": ">=0.0.4" + } + } + } + }, + "has-flag": { + "version": "3.0.0", + "bundled": true, + "dev": true + }, + "hosted-git-info": { + "version": "2.7.1", + "bundled": true, + "dev": true + }, + "imurmurhash": { + "version": "0.1.4", + "bundled": true, + "dev": true + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true + }, + "invert-kv": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "is-arrayish": { + "version": "0.2.1", + "bundled": true, + "dev": true + }, + "is-buffer": { + "version": "1.1.6", + "bundled": true, + "dev": true, + "optional": true + }, + "is-builtin-module": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "builtin-modules": "^1.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "is-stream": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "isexe": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "istanbul-lib-coverage": { + "version": "2.0.1", + "bundled": true, + "dev": true + }, + "istanbul-lib-hook": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "append-transform": "^1.0.0" + } + }, + "istanbul-lib-report": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "istanbul-lib-coverage": "^2.0.1", + "make-dir": "^1.3.0", + "supports-color": "^5.4.0" + } + }, + "istanbul-lib-source-maps": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "debug": "^3.1.0", + "istanbul-lib-coverage": "^2.0.1", + "make-dir": "^1.3.0", + "rimraf": "^2.6.2", + "source-map": "^0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "bundled": true, + "dev": true + } + } + }, + "istanbul-reports": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "handlebars": "^4.0.11" + } + }, + "json-parse-better-errors": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "kind-of": { + "version": "3.2.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "is-buffer": "^1.1.5" + } + }, + "lazy-cache": { + "version": "1.0.4", + "bundled": true, + "dev": true, + "optional": true + }, + "lcid": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "invert-kv": "^1.0.0" + } + }, + "load-json-file": { + "version": "4.0.0", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "lodash.flattendeep": { + "version": "4.4.0", + "bundled": true, + "dev": true + }, + "longest": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "lru-cache": { + "version": "4.1.3", + "bundled": true, + "dev": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "make-dir": { + "version": "1.3.0", + "bundled": true, + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "md5-hex": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "md5-o-matic": "^0.1.1" + } + }, + "md5-o-matic": { + "version": "0.1.1", + "bundled": true, + "dev": true + }, + "mem": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "merge-source-map": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "requires": { + "source-map": "^0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "bundled": true, + "dev": true + } + } + }, + "mimic-fn": { + "version": "1.2.0", + "bundled": true, + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.10", + "bundled": true, + "dev": true + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "requires": { + "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true + } + } + }, + "ms": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "normalize-package-data": { + "version": "2.4.0", + "bundled": true, + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "is-builtin-module": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "npm-run-path": { + "version": "2.0.2", + "bundled": true, + "dev": true, + "requires": { + "path-key": "^2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "optimist": { + "version": "0.6.1", + "bundled": true, + "dev": true, + "requires": { + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "os-locale": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "requires": { + "execa": "^0.7.0", + "lcid": "^1.0.0", + "mem": "^1.1.0" + } + }, + "p-finally": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "p-limit": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "package-hash": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "lodash.flattendeep": "^4.4.0", + "md5-hex": "^2.0.0", + "release-zalgo": "^1.0.0" + } + }, + "parse-json": { + "version": "4.0.0", + "bundled": true, + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "path-exists": { + "version": "3.0.0", + "bundled": true, + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "path-key": { + "version": "2.0.1", + "bundled": true, + "dev": true + }, + "path-type": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "pify": { + "version": "3.0.0", + "bundled": true, + "dev": true + }, + "pkg-dir": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "find-up": "^3.0.0" + } + }, + "pseudomap": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "read-pkg": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + } + }, + "read-pkg-up": { + "version": "4.0.0", + "bundled": true, + "dev": true, + "requires": { + "find-up": "^3.0.0", + "read-pkg": "^3.0.0" + } + }, + "release-zalgo": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "es6-error": "^4.0.1" + } + }, + "repeat-string": { + "version": "1.6.1", + "bundled": true, + "dev": true, + "optional": true + }, + "require-directory": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "require-main-filename": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "resolve-from": { + "version": "4.0.0", + "bundled": true, + "dev": true + }, + "right-align": { + "version": "0.1.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "align-text": "^0.1.1" + } + }, + "rimraf": { + "version": "2.6.2", + "bundled": true, + "dev": true, + "requires": { + "glob": "^7.0.5" + } + }, + "semver": { + "version": "5.5.0", + "bundled": true, + "dev": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "shebang-command": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true + }, + "source-map": { + "version": "0.5.7", + "bundled": true, + "dev": true, + "optional": true + }, + "spawn-wrap": { + "version": "1.4.2", + "bundled": true, + "dev": true, + "requires": { + "foreground-child": "^1.5.6", + "mkdirp": "^0.5.0", + "os-homedir": "^1.0.1", + "rimraf": "^2.6.2", + "signal-exit": "^3.0.2", + "which": "^1.3.0" + } + }, + "spdx-correct": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.1.0", + "bundled": true, + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.0", + "bundled": true, + "dev": true + }, + "string-width": { + "version": "2.1.1", + "bundled": true, + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "strip-bom": { + "version": "3.0.0", + "bundled": true, + "dev": true + }, + "strip-eof": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "bundled": true, + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "test-exclude": { + "version": "5.0.0", + "bundled": true, + "dev": true, + "requires": { + "arrify": "^1.0.1", + "minimatch": "^3.0.4", + "read-pkg-up": "^4.0.0", + "require-main-filename": "^1.0.1" + } + }, + "uglify-js": { + "version": "2.8.29", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "source-map": "~0.5.1", + "uglify-to-browserify": "~1.0.0", + "yargs": "~3.10.0" + }, + "dependencies": { + "yargs": { + "version": "3.10.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "camelcase": "^1.0.2", + "cliui": "^2.1.0", + "decamelize": "^1.0.0", + "window-size": "0.1.0" + } + } + } + }, + "uglify-to-browserify": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "uuid": { + "version": "3.3.2", + "bundled": true, + "dev": true + }, + "validate-npm-package-license": { + "version": "3.0.3", + "bundled": true, + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "which": { + "version": "1.3.1", + "bundled": true, + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "window-size": { + "version": "0.1.0", + "bundled": true, + "dev": true, + "optional": true + }, + "wordwrap": { + "version": "0.0.3", + "bundled": true, + "dev": true + }, + "wrap-ansi": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + } + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "write-file-atomic": { + "version": "2.3.0", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.2" + } + }, + "y18n": { + "version": "3.2.1", + "bundled": true, + "dev": true + }, + "yallist": { + "version": "2.1.2", + "bundled": true, + "dev": true + }, + "yargs": { + "version": "11.1.0", + "bundled": true, + "dev": true, + "requires": { + "cliui": "^4.0.0", + "decamelize": "^1.1.1", + "find-up": "^2.1.0", + "get-caller-file": "^1.0.1", + "os-locale": "^2.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^9.0.2" + }, + "dependencies": { + "cliui": { + "version": "4.1.0", + "bundled": true, + "dev": true, + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + } + }, + "find-up": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "1.3.0", + "bundled": true, + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "bundled": true, + "dev": true + } + } + }, + "yargs-parser": { + "version": "9.0.2", + "bundled": true, + "dev": true, + "requires": { + "camelcase": "^4.1.0" + }, + "dependencies": { + "camelcase": { + "version": "4.1.0", + "bundled": true, + "dev": true + } + } + } + } + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dev": true, + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "object-keys": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz", + "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==", + "dev": true + }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dev": true, + "requires": { + "isobject": "^3.0.0" + } + }, + "object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + } + }, + "object.defaults": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", + "integrity": "sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=", + "dev": true, + "requires": { + "array-each": "^1.0.1", + "array-slice": "^1.0.0", + "for-own": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "object.map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz", + "integrity": "sha1-z4Plncj8wK1fQlDh94s7gb2AHTc=", + "dev": true, + "requires": { + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "object.reduce": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object.reduce/-/object.reduce-1.0.1.tgz", + "integrity": "sha1-b+NI8qx/oPlcpiEiZZkJaCW7A60=", + "dev": true, + "requires": { + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "ordered-read-streams": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-1.0.1.tgz", + "integrity": "sha1-d8DLN8QVJdZBZtmQ/61+xqDhNj4=", + "dev": true, + "requires": { + "readable-stream": "^2.0.1" + } + }, + "os-browserify": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", + "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", + "dev": true + }, + "os-locale": { + "version": "1.4.0", + "resolved": "http://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "dev": true, + "requires": { + "lcid": "^1.0.0" + } + }, + "p-map": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-1.2.0.tgz", + "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==", + "dev": true + }, + "pako": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.6.tgz", + "integrity": "sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg==", + "dev": true + }, + "parents": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz", + "integrity": "sha1-/t1NK/GTp3dF/nHjcdc8MwfZx1E=", + "dev": true, + "requires": { + "path-platform": "~0.11.15" + } + }, + "parse-asn1": { + "version": "5.1.1", + "resolved": "http://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.1.tgz", + "integrity": "sha512-KPx7flKXg775zZpnp9SxJlz00gTd4BmJ2yJufSc44gMCRrRQ7NSzAcSJQfifuOLgW6bEi+ftrALtsgALeB2Adw==", + "dev": true, + "requires": { + "asn1.js": "^4.0.0", + "browserify-aes": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3" + } + }, + "parse-filepath": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", + "integrity": "sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE=", + "dev": true, + "requires": { + "is-absolute": "^1.0.0", + "map-cache": "^0.2.0", + "path-root": "^0.1.1" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + }, + "parse-passwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", + "dev": true + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "dev": true + }, + "path-browserify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz", + "integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==", + "dev": true + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", + "dev": true + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "^2.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, + "path-platform": { + "version": "0.11.15", + "resolved": "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz", + "integrity": "sha1-6GQhf3TDaFDwhSt43Hv31KVyG/I=", + "dev": true + }, + "path-root": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", + "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=", + "dev": true, + "requires": { + "path-root-regex": "^0.1.0" + } + }, + "path-root-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", + "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=", + "dev": true + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, + "pbkdf2": { + "version": "3.0.17", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz", + "integrity": "sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==", + "dev": true, + "requires": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "requires": { + "pinkie": "^2.0.0" + } + }, + "platform": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/platform/-/platform-1.3.5.tgz", + "integrity": "sha512-TuvHS8AOIZNAlE77WUDiR4rySV/VMptyMfcfeoMgs4P8apaZM3JrnbzBiixKUv+XR6i+BXrQh8WAnjaSPFO65Q==", + "dev": true + }, + "plexer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/plexer/-/plexer-1.0.1.tgz", + "integrity": "sha1-qAG2Ur+BRXOXlepNO/CvlGwwwN0=", + "dev": true, + "requires": { + "isstream": "^0.1.2", + "readable-stream": "^2.0.2" + } + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "dev": true + }, + "pretty-hrtime": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", + "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=", + "dev": true + }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", + "dev": true + }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", + "dev": true + }, + "public-encrypt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", + "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "pump": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", + "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "pumpify": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", + "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", + "dev": true, + "requires": { + "duplexify": "^3.6.0", + "inherits": "^2.0.3", + "pump": "^2.0.0" + } + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", + "dev": true + }, + "querystring-es3": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", + "dev": true + }, + "randombytes": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.6.tgz", + "integrity": "sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "randomfill": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "dev": true, + "requires": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, + "read-only-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-2.0.0.tgz", + "integrity": "sha1-JyT9aoET1zdkrCiNQ4YnDB2/F/A=", + "dev": true, + "requires": { + "readable-stream": "^2.0.2" + } + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, + "requires": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, + "requires": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + } + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "readdirp": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", + "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "minimatch": "^3.0.2", + "readable-stream": "^2.0.2", + "set-immediate-shim": "^1.0.1" + } + }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "dev": true, + "requires": { + "resolve": "^1.1.6" + } + }, + "regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + } + }, + "remove-bom-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/remove-bom-buffer/-/remove-bom-buffer-3.0.0.tgz", + "integrity": "sha512-8v2rWhaakv18qcvNeli2mZ/TMTL2nEyAKRvzo1WtnZBl15SHyEhrCu2/xKlJyUFKHiHgfXIyuY6g2dObJJycXQ==", + "dev": true, + "requires": { + "is-buffer": "^1.1.5", + "is-utf8": "^0.2.1" + } + }, + "remove-bom-stream": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/remove-bom-stream/-/remove-bom-stream-1.2.0.tgz", + "integrity": "sha1-BfGlk/FuQuH7kOv1nejlaVJflSM=", + "dev": true, + "requires": { + "remove-bom-buffer": "^3.0.0", + "safe-buffer": "^5.1.0", + "through2": "^2.0.3" + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true + }, + "repeat-element": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", + "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "replace-ext": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz", + "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=", + "dev": true + }, + "replace-homedir": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/replace-homedir/-/replace-homedir-1.0.0.tgz", + "integrity": "sha1-6H9tUTuSjd6AgmDBK+f+xv9ueYw=", + "dev": true, + "requires": { + "homedir-polyfill": "^1.0.1", + "is-absolute": "^1.0.0", + "remove-trailing-separator": "^1.1.0" + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "dev": true + }, + "requizzle": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/requizzle/-/requizzle-0.2.1.tgz", + "integrity": "sha1-aUPDUwxNmn5G8c3dUcFY/GcM294=", + "dev": true, + "requires": { + "underscore": "~1.6.0" + }, + "dependencies": { + "underscore": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz", + "integrity": "sha1-izixDKze9jM3uLJOT/htRa6lKag=", + "dev": true + } + } + }, + "resolve": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", + "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", + "dev": true, + "requires": { + "path-parse": "^1.0.5" + } + }, + "resolve-dir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", + "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", + "dev": true, + "requires": { + "expand-tilde": "^2.0.0", + "global-modules": "^1.0.0" + } + }, + "resolve-options": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/resolve-options/-/resolve-options-1.1.0.tgz", + "integrity": "sha1-MrueOcBtZzONyTeMDW1gdFZq0TE=", + "dev": true, + "requires": { + "value-or-function": "^3.0.0" + } + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true + }, + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true + }, + "rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "dev": true, + "requires": { + "glob": "^7.0.5" + } + }, + "ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "dev": true, + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, + "requires": { + "ret": "~0.1.10" + } + }, + "semver": { + "version": "5.5.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.1.tgz", + "integrity": "sha512-PqpAxfrEhlSUWge8dwIp4tZnQ25DIOthpiaHNIthsjEFQD6EvqUKUDM7L8O2rShkFccYo1VjJR0coWfNkCubRw==", + "dev": true + }, + "semver-greatest-satisfied-range": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/semver-greatest-satisfied-range/-/semver-greatest-satisfied-range-1.1.0.tgz", + "integrity": "sha1-E+jCZYq5aRywzXEJMkAoDTb3els=", + "dev": true, + "requires": { + "sver-compat": "^1.5.0" + } + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "set-immediate-shim": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", + "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", + "dev": true + }, + "set-value": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", + "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "sha.js": { + "version": "2.4.11", + "resolved": "http://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "shasum": { + "version": "1.0.2", + "resolved": "http://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz", + "integrity": "sha1-5wEjENj0F/TetXEhUOVni4euVl8=", + "dev": true, + "requires": { + "json-stable-stringify": "~0.0.0", + "sha.js": "~2.4.4" + } + }, + "shell-quote": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.6.1.tgz", + "integrity": "sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c=", + "dev": true, + "requires": { + "array-filter": "~0.0.0", + "array-map": "~0.0.0", + "array-reduce": "~0.0.0", + "jsonify": "~0.0.0" + } + }, + "simple-concat": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.0.tgz", + "integrity": "sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY=", + "dev": true + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "requires": { + "kind-of": "^3.2.0" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "source-map-resolve": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", + "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", + "dev": true, + "requires": { + "atob": "^2.1.1", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-support": { + "version": "0.5.9", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.9.tgz", + "integrity": "sha512-gR6Rw4MvUlYy83vP0vxoVNzM6t8MUXqNuRsuBmBHQDu1Fh6X015FrLdgoDKcNdkwGubozq0P4N0Q37UyFVr1EA==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "source-map-url": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", + "dev": true + }, + "sparkles": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.1.tgz", + "integrity": "sha512-dSO0DDYUahUt/0/pD/Is3VIm5TGJjludZ0HVymmhYF6eNA53PVLhnUk0znSYbH8IYBuJdCE+1luR22jNLMaQdw==", + "dev": true + }, + "spdx-correct": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", + "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", + "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.1.tgz", + "integrity": "sha512-TfOfPcYGBB5sDuPn3deByxPhmfegAhpDYKSOXZQN81Oyrrif8ZCodOLzK3AesELnCx03kikhyDwh0pfvvQvF8w==", + "dev": true + }, + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.0" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "stack-trace": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", + "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=", + "dev": true + }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dev": true, + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "stream-browserify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", + "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", + "dev": true, + "requires": { + "inherits": "~2.0.1", + "readable-stream": "^2.0.2" + } + }, + "stream-combiner2": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz", + "integrity": "sha1-+02KFCDqNidk4hrUeAOXvry0HL4=", + "dev": true, + "requires": { + "duplexer2": "~0.1.0", + "readable-stream": "^2.0.2" + } + }, + "stream-exhaust": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/stream-exhaust/-/stream-exhaust-1.0.2.tgz", + "integrity": "sha512-b/qaq/GlBK5xaq1yrK9/zFcyRSTNxmcZwFLGSTG0mXgZl/4Z6GgiyYOXOvY7N3eEvFRAG1bkDRz5EPGSvPYQlw==", + "dev": true + }, + "stream-http": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz", + "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", + "dev": true, + "requires": { + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.3.6", + "to-arraybuffer": "^1.0.0", + "xtend": "^4.0.0" + } + }, + "stream-shift": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", + "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", + "dev": true + }, + "stream-splicer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/stream-splicer/-/stream-splicer-2.0.0.tgz", + "integrity": "sha1-G2O+Q4oTPktnHMGTUZdgAXWRDYM=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.2" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "^0.2.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + }, + "subarg": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", + "integrity": "sha1-9izxdYHplrSPyWVpn1TAauJouNI=", + "dev": true, + "requires": { + "minimist": "^1.1.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + }, + "sver-compat": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/sver-compat/-/sver-compat-1.5.0.tgz", + "integrity": "sha1-PPh9/rTQe0o/FIJ7wYaz/QxkXNg=", + "dev": true, + "requires": { + "es6-iterator": "^2.0.1", + "es6-symbol": "^3.1.1" + } + }, + "syntax-error": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/syntax-error/-/syntax-error-1.4.0.tgz", + "integrity": "sha512-YPPlu67mdnHGTup2A8ff7BC2Pjq0e0Yp/IyTFN03zWO0RcK07uLcbi7C2KpGR2FvWbaB0+bfE27a+sBKebSo7w==", + "dev": true, + "requires": { + "acorn-node": "^1.2.0" + } + }, + "taffydb": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/taffydb/-/taffydb-2.6.2.tgz", + "integrity": "sha1-fLy2S1oUG2ou/CxdLGe04VCyomg=", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "through2": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", + "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", + "dev": true, + "requires": { + "readable-stream": "^2.1.5", + "xtend": "~4.0.1" + } + }, + "through2-filter": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/through2-filter/-/through2-filter-2.0.0.tgz", + "integrity": "sha1-YLxVoNrLdghdsfna6Zq0P4PWIuw=", + "dev": true, + "requires": { + "through2": "~2.0.0", + "xtend": "~4.0.0" + } + }, + "time-stamp": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz", + "integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=", + "dev": true + }, + "timers-browserify": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz", + "integrity": "sha1-ycWLV1voQHN1y14kYtrO50NZ9B0=", + "dev": true, + "requires": { + "process": "~0.11.0" + } + }, + "to-absolute-glob": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz", + "integrity": "sha1-GGX0PZ50sIItufFFt4z/fQ98hJs=", + "dev": true, + "requires": { + "is-absolute": "^1.0.0", + "is-negated-glob": "^1.0.0" + } + }, + "to-arraybuffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", + "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", + "dev": true + }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } + }, + "to-through": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-through/-/to-through-2.0.0.tgz", + "integrity": "sha1-/JKtq6ByZHvAtn1rA2ZKoZUJOvY=", + "dev": true, + "requires": { + "through2": "^2.0.3" + } + }, + "trim-right": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", + "dev": true + }, + "ts-node": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-7.0.1.tgz", + "integrity": "sha512-BVwVbPJRspzNh2yfslyT1PSbl5uIk03EZlb493RKHN4qej/D06n1cEhjlOJG69oFsE7OT8XjpTUcYf6pKTLMhw==", + "dev": true, + "requires": { + "arrify": "^1.0.0", + "buffer-from": "^1.1.0", + "diff": "^3.1.0", + "make-error": "^1.1.1", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "source-map-support": "^0.5.6", + "yn": "^2.0.0" + } + }, + "tsconfig": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/tsconfig/-/tsconfig-5.0.3.tgz", + "integrity": "sha1-X0J45wGACWeo/Dg/0ZZIh48qbjo=", + "dev": true, + "requires": { + "any-promise": "^1.3.0", + "parse-json": "^2.2.0", + "strip-bom": "^2.0.0", + "strip-json-comments": "^2.0.0" + }, + "dependencies": { + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "^0.2.0" + } + } + } + }, + "tsify": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/tsify/-/tsify-4.0.0.tgz", + "integrity": "sha512-A33g5azPh2KDo/gbcSHpSo2m8l5FYC3SdjD5qNpBT+LP758HIGXT6cLko+aJhyFDRU5nCT/zQvfIq/5GQNRsoA==", + "dev": true, + "requires": { + "convert-source-map": "^1.1.0", + "fs.realpath": "^1.0.0", + "object-assign": "^4.1.0", + "semver": "^5.1.0", + "through2": "^2.0.0", + "tsconfig": "^5.0.3" + }, + "dependencies": { + "semver": { + "version": "5.5.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.1.tgz", + "integrity": "sha512-PqpAxfrEhlSUWge8dwIp4tZnQ25DIOthpiaHNIthsjEFQD6EvqUKUDM7L8O2rShkFccYo1VjJR0coWfNkCubRw==", + "dev": true + } + } + }, + "tslib": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", + "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", + "dev": true + }, + "tslint": { + "version": "5.11.0", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.11.0.tgz", + "integrity": "sha1-mPMMAurjzecAYgHkwzywi0hYHu0=", + "dev": true, + "requires": { + "babel-code-frame": "^6.22.0", + "builtin-modules": "^1.1.1", + "chalk": "^2.3.0", + "commander": "^2.12.1", + "diff": "^3.2.0", + "glob": "^7.1.1", + "js-yaml": "^3.7.0", + "minimatch": "^3.0.4", + "resolve": "^1.3.2", + "semver": "^5.3.0", + "tslib": "^1.8.0", + "tsutils": "^2.27.2" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "semver": { + "version": "5.5.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.1.tgz", + "integrity": "sha512-PqpAxfrEhlSUWge8dwIp4tZnQ25DIOthpiaHNIthsjEFQD6EvqUKUDM7L8O2rShkFccYo1VjJR0coWfNkCubRw==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "tsutils": { + "version": "2.29.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", + "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + }, + "tty-browserify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.1.tgz", + "integrity": "sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==", + "dev": true + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, + "typescript": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.1.1.tgz", + "integrity": "sha512-Veu0w4dTc/9wlWNf2jeRInNodKlcdLgemvPsrNpfu5Pq39sgfFjvIIgTsvUHCoLBnMhPoUA+tFxsXjU6VexVRQ==", + "dev": true + }, + "uglify-js": { + "version": "3.4.9", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.9.tgz", + "integrity": "sha512-8CJsbKOtEbnJsTyv6LE6m6ZKniqMiFWmm9sRbopbkGs3gMPPfd3Fh8iIA4Ykv5MgaTbqHr4BaoGLJLZNhsrW1Q==", + "dev": true, + "requires": { + "commander": "~2.17.1", + "source-map": "~0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "umd": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/umd/-/umd-3.0.3.tgz", + "integrity": "sha512-4IcGSufhFshvLNcMCV80UnQVlZ5pMOC8mvNPForqwA4+lzYQuetTESLDQkeLmihq8bRcnpbQa48Wb8Lh16/xow==", + "dev": true + }, + "unc-path-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", + "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=", + "dev": true + }, + "undeclared-identifiers": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/undeclared-identifiers/-/undeclared-identifiers-1.1.2.tgz", + "integrity": "sha512-13EaeocO4edF/3JKime9rD7oB6QI8llAGhgn5fKOPyfkJbRb6NFv9pYV6dFEmpa4uRjKeBqLZP8GpuzqHlKDMQ==", + "dev": true, + "requires": { + "acorn-node": "^1.3.0", + "get-assigned-identifiers": "^1.2.0", + "simple-concat": "^1.0.0", + "xtend": "^4.0.1" + } + }, + "underscore": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", + "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=", + "dev": true + }, + "underscore-contrib": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/underscore-contrib/-/underscore-contrib-0.3.0.tgz", + "integrity": "sha1-ZltmwkeD+PorGMn4y7Dix9SMJsc=", + "dev": true, + "requires": { + "underscore": "1.6.0" + }, + "dependencies": { + "underscore": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz", + "integrity": "sha1-izixDKze9jM3uLJOT/htRa6lKag=", + "dev": true + } + } + }, + "undertaker": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/undertaker/-/undertaker-1.2.0.tgz", + "integrity": "sha1-M52kZGJS0ILcN45wgGcpl1DhG0k=", + "dev": true, + "requires": { + "arr-flatten": "^1.0.1", + "arr-map": "^2.0.0", + "bach": "^1.0.0", + "collection-map": "^1.0.0", + "es6-weak-map": "^2.0.1", + "last-run": "^1.1.0", + "object.defaults": "^1.0.0", + "object.reduce": "^1.0.0", + "undertaker-registry": "^1.0.0" + } + }, + "undertaker-registry": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/undertaker-registry/-/undertaker-registry-1.0.1.tgz", + "integrity": "sha1-XkvaMI5KiirlhPm5pDWaSZglzFA=", + "dev": true + }, + "union-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", + "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^0.4.3" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "set-value": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", + "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.1", + "to-object-path": "^0.3.0" + } + } + } + }, + "unique-stream": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-2.2.1.tgz", + "integrity": "sha1-WqADz76Uxf+GbE59ZouxxNuts2k=", + "dev": true, + "requires": { + "json-stable-stringify": "^1.0.0", + "through2-filter": "^2.0.0" + }, + "dependencies": { + "json-stable-stringify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", + "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", + "dev": true, + "requires": { + "jsonify": "~0.0.0" + } + } + } + }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "dev": true, + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dev": true, + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "dev": true + } + } + }, + "upath": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.0.tgz", + "integrity": "sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw==", + "dev": true + }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true + }, + "url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "dev": true, + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", + "dev": true + } + } + }, + "use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "dev": true + }, + "util": { + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", + "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", + "dev": true, + "requires": { + "inherits": "2.0.3" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "v8flags": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.1.1.tgz", + "integrity": "sha512-iw/1ViSEaff8NJ3HLyEjawk/8hjJib3E7pvG4pddVXfUg1983s3VGsiClDjhK64MQVDGqc1Q8r18S4VKQZS9EQ==", + "dev": true, + "requires": { + "homedir-polyfill": "^1.0.1" + } + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "value-or-function": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/value-or-function/-/value-or-function-3.0.0.tgz", + "integrity": "sha1-HCQ6ULWVwb5Up1S/7OhWO5/42BM=", + "dev": true + }, + "vinyl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.0.tgz", + "integrity": "sha512-MBH+yP0kC/GQ5GwBqrTPTzEfiiLjta7hTtvQtbxBgTeSXsmKQRQecjibMbxIXzVT3Y9KJK+drOz1/k+vsu8Nkg==", + "dev": true, + "requires": { + "clone": "^2.1.1", + "clone-buffer": "^1.0.0", + "clone-stats": "^1.0.0", + "cloneable-readable": "^1.0.0", + "remove-trailing-separator": "^1.0.1", + "replace-ext": "^1.0.0" + } + }, + "vinyl-fs": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-3.0.3.tgz", + "integrity": "sha512-vIu34EkyNyJxmP0jscNzWBSygh7VWhqun6RmqVfXePrOwi9lhvRs//dOaGOTRUQr4tx7/zd26Tk5WeSVZitgng==", + "dev": true, + "requires": { + "fs-mkdirp-stream": "^1.0.0", + "glob-stream": "^6.1.0", + "graceful-fs": "^4.0.0", + "is-valid-glob": "^1.0.0", + "lazystream": "^1.0.0", + "lead": "^1.0.0", + "object.assign": "^4.0.4", + "pumpify": "^1.3.5", + "readable-stream": "^2.3.3", + "remove-bom-buffer": "^3.0.0", + "remove-bom-stream": "^1.2.0", + "resolve-options": "^1.1.0", + "through2": "^2.0.0", + "to-through": "^2.0.0", + "value-or-function": "^3.0.0", + "vinyl": "^2.0.0", + "vinyl-sourcemap": "^1.1.0" + } + }, + "vinyl-source-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/vinyl-source-stream/-/vinyl-source-stream-2.0.0.tgz", + "integrity": "sha1-84pa+53R6Ttl1VBGmsYYKsT1S44=", + "dev": true, + "requires": { + "through2": "^2.0.3", + "vinyl": "^2.1.0" + }, + "dependencies": { + "clone": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", + "dev": true + }, + "clone-stats": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", + "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=", + "dev": true + }, + "replace-ext": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz", + "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=", + "dev": true + }, + "vinyl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.0.tgz", + "integrity": "sha512-MBH+yP0kC/GQ5GwBqrTPTzEfiiLjta7hTtvQtbxBgTeSXsmKQRQecjibMbxIXzVT3Y9KJK+drOz1/k+vsu8Nkg==", + "dev": true, + "requires": { + "clone": "^2.1.1", + "clone-buffer": "^1.0.0", + "clone-stats": "^1.0.0", + "cloneable-readable": "^1.0.0", + "remove-trailing-separator": "^1.0.1", + "replace-ext": "^1.0.0" + } + } + } + }, + "vinyl-sourcemap": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/vinyl-sourcemap/-/vinyl-sourcemap-1.1.0.tgz", + "integrity": "sha1-kqgAWTo4cDqM2xHYswCtS+Y7PhY=", + "dev": true, + "requires": { + "append-buffer": "^1.0.2", + "convert-source-map": "^1.5.0", + "graceful-fs": "^4.1.6", + "normalize-path": "^2.1.1", + "now-and-later": "^2.0.0", + "remove-bom-buffer": "^3.0.0", + "vinyl": "^2.0.0" + }, + "dependencies": { + "convert-source-map": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz", + "integrity": "sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.1" + } + } + } + }, + "vinyl-sourcemaps-apply": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz", + "integrity": "sha1-q2VJ1h0XLCsbh75cUI0jnI74dwU=", + "dev": true, + "requires": { + "source-map": "^0.5.1" + } + }, + "vm-browserify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.0.tgz", + "integrity": "sha512-iq+S7vZJE60yejDYM0ek6zg308+UZsdtPExWP9VZoCFCz1zkJoXFnAX7aZfd/ZwrkidzdUZL0C/ryW+JwAiIGw==", + "dev": true + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "which-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", + "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", + "dev": true + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "http://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "xmlcreate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-1.0.2.tgz", + "integrity": "sha1-+mv3YqYKQT+z3Y9LA8WyaSONMI8=", + "dev": true + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", + "dev": true + }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "dev": true + }, + "yargs": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.0.tgz", + "integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=", + "dev": true, + "requires": { + "camelcase": "^3.0.0", + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "get-caller-file": "^1.0.1", + "os-locale": "^1.4.0", + "read-pkg-up": "^1.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^1.0.2", + "which-module": "^1.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^5.0.0" + } + }, + "yargs-parser": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0.tgz", + "integrity": "sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo=", + "dev": true, + "requires": { + "camelcase": "^3.0.0" + } + }, + "yn": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz", + "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=", + "dev": true + } + } +} diff --git a/package.json b/package.json index 6026044a..f8766381 100644 --- a/package.json +++ b/package.json @@ -1,14 +1,35 @@ { "name": "vectorious", - "version": "4.8.5", + "version": "5.0.0", "description": "A high performance linear algebra library.", - "main": "vectorious.js", + "main": "built/vectorious.js", "scripts": { - "test": "mocha", + "test": "nyc mocha -r ts-node/register ./src/*.spec.ts", "benchmark": "node ./benchmarks/vector.js && node ./benchmarks/matrix.js", "docs": "jsdoc -c doc.json", - "build": "gulp clean && gulp build", - "postinstall": "opencollective-postinstall" + "build": "gulp clean && gulp build && tsc" + }, + "browser": { + "nblas": false + }, + "nyc": { + "extension": [ + ".ts", + ".tsx" + ], + "exclude": [ + "gulpfile.js", + "**/*.d.ts", + "benchmarks/**", + "built/**", + "dist/**", + "examples/**", + "coverage/**" + ], + "reporter": [ + "lcov" + ], + "all": true }, "repository": { "type": "git", @@ -34,28 +55,25 @@ }, "homepage": "https://github.com/mateogianolio/vectorious", "devDependencies": { - "@babel/core": "^7.0.1", - "@babel/preset-env": "^7.0.0", - "babelify": "^10.0.0", - "benchmark": "^2.1.0", - "browserify": "^16.2.2", + "@types/mocha": "^5.2.5", + "@types/node": "^10.11.3", + "benchmark": "^2.1.4", + "browserify": "^16.2.3", "del": "^3.0.0", "gulp": "^4.0.0", "gulp-streamify": "^1.0.2", - "gulp-uglify": "^3.0.0", - "jsdoc": "^3.4.3", - "minami": "^1.1.1", - "mocha": "^5.1.1", + "gulp-uglify": "^3.0.1", + "jsdoc": "^3.5.5", + "minami": "^1.2.3", + "mocha": "^5.2.0", + "nyc": "^13.0.1", + "ts-node": "^7.0.1", + "tsify": "^4.0.0", + "tslint": "^5.11.0", + "typescript": "^3.1.1", "vinyl-source-stream": "^2.0.0" }, "optionalDependencies": { - "nblas": "^1.2.0" - }, - "dependencies": { - "opencollective-postinstall": "^2.0.0" - }, - "collective": { - "type": "opencollective", - "url": "https://opencollective.com/vectorious" + "nblas": "^1.2.2" } } diff --git a/src/Matrix.prototype.spec.ts b/src/Matrix.prototype.spec.ts new file mode 100644 index 00000000..32f3a21f --- /dev/null +++ b/src/Matrix.prototype.spec.ts @@ -0,0 +1,410 @@ +import { Matrix, Vector } from './'; +import * as assert from 'assert'; + +function round(value: number, precision: number) { + return Number(value.toFixed(precision)) +} + +describe('Matrix.prototype', () => { + describe('.add()', () => { + it('should throw error when sizes do not match', () => { + var a = new Matrix([[1, 2], [3, 4]]); + var b = new Matrix([[1, 2]]); + + assert.throws(a.add.bind(a, b), Error); + }); + + it('should work as expected', () => { + var a = new Matrix([[1, 2], [3, 4]]); + var b = new Matrix([[5, 6], [7, 8]]); + var c = new Matrix([[6, 8], [10, 12]]); + + assert.deepEqual(c, a.add(b)); + }); + }); + + describe('.subtract()', () => { + it('should throw error when sizes do not match', () => { + var a = new Matrix([[1, 2], [3, 4]]); + var b = new Matrix([[1, 2]]); + + assert.throws(a.subtract.bind(a, b), Error); + }); + + it('should work as expected', () => { + var a = new Matrix([[1, 2], [3, 4]]); + var b = new Matrix([[5, 6], [7, 8]]); + var c = new Matrix([[-4, -4], [-4, -4]]); + + assert.deepEqual(c, a.subtract(b)); + }); + }); + + describe('.scale()', () => { + it('should work as expected', () => { + var a = new Matrix([[1, 2], [3, 4]]); + var b = new Matrix([[2, 4], [6, 8]]); + + assert.deepEqual(b, a.scale(2)); + }); + }); + + describe('.product(b)', () => { + it('should work as the static equivalent of a.product(b)', () => { + var a = new Matrix([[3, 2, 1]]); + var b = new Matrix([[1, 2, 3]]); + var c = new Matrix([[3, 4, 3]]); + + assert.deepEqual(c, a.product(b)); + }); + }); + + describe('.multiply()', () => { + it('should throw error if sizes do not match', () => { + var a = new Matrix([[1, 2], [3, 4]]); + var b = new Matrix([[1, 2]]); + + assert.throws(a.multiply.bind(a, b), Error); + }); + + it('should work as expected', () => { + var a = new Matrix([[1, 2]]); + var b = new Matrix([[1], [2]]); + var c = new Matrix([[5]]); + var d = new Matrix([[1, 2], [2, 4]]); + + var e = new Matrix([[1, 2, 3], [4, 5, 6], [7, 8, 9]]); + var f = new Matrix([[ 30, 36, 42], [ 66, 81, 96], [102, 126, 150]]); + + var g = new Matrix([[0,1,0], [1,0,0], [0,0,1]]); + var h = new Matrix([[1,3,5], [2,4,7], [1,1,0]]); + var i = new Matrix([[2, 4, 7], [1, 3, 5], [1, 1, 0]]); + + assert.deepEqual(c, a.multiply(b)); + assert.deepEqual(d, b.multiply(a)); + assert.deepEqual(f, e.multiply(e)); + assert.deepEqual(i, g.multiply(h)); + }); + }); + + describe('.transpose()', () => { + var a = new Matrix([[1, 2]]); + var b = new Matrix([[1, 2, 3], [4, 5, 6], [7, 8, 9]]); + var c = new Matrix([[1], [2]]); + var d = new Matrix([[1, 4, 7], [2, 5, 8], [3, 6, 9]]); + var e = Matrix.random(20, 20); + + it('should work as expected', () => { + + assert.deepEqual(a, c.T); + assert.deepEqual(c, a.T); + + assert.deepEqual(b, d.T); + assert.deepEqual(d, b.T); + + assert.deepEqual(e, e.T.T); + }); + }); + + describe('.inverse()', () => { + it('should throw error if matrix is not square', () => { + var a = new Matrix([[1, 2]]); + + assert.throws(a.inverse.bind(a), Error); + }); + + it('should throw error if matrix is not invertible', () => { + var a = new Matrix([ + [1, 2, 3], + [4, 5, 6], + [7, 8, 9] + ]); + + assert.throws(a.inverse.bind(a), Error); + }); + + it('should work as expected', () => { + var a = new Matrix([ + [2, -1, 0], + [-1, 2, -1], + [0, -1, 2] + ]); + var b = new Matrix([ + [3/4, 1/2, 1/4], + [1/2, 1, 1/2], + [1/4, 1/2, 3/4] + ]); + + // need to round result to avoid floating point rounding errors, e.g. 0.99999999994 + assert.deepEqual(b, a.inverse().map((value: number) => round(value, 2))); + }); + }); + + describe('.gauss()', () => { + it('should work as expected', () => { + var a = new Matrix([[1, 2, 3], [3, 4, 5]]); + var b = new Matrix([[1, 0, -1], [0, 1, 2]]); + + assert.deepEqual(b, a.gauss()); + + var c = new Matrix([[1, 2, -1, -4], [2, 3, -1, -11], [-2, 0, -3, 22]]); + var d = new Matrix([[1, 0, 0, -8], [0, 1, 0, 1], [0, 0, 1, -2]]); + + assert.deepEqual(d, c.gauss()); + }); + }); + + describe('.lu()', () => { + it('should work as expected', () => { + var a = new Matrix([[1, 3, 5], [2, 4, 7], [1, 1, 0]]); + var b = [ + new Matrix([[1, 0, 0], [0.5, 1, 0], [0.5, -1, 1]]), + new Matrix([[2, 4, 7], [0, 1, 1.5], [0, 0, -2]]) + ]; + + assert.deepEqual(b, a.lu().splice(0, 2)); + + var c = new Matrix([[11, 9, 24, 2], [1, 5, 2, 6], [3, 17, 18, 1], [2, 5, 7, 1]]); + var d = [ + new Matrix([[1, 0, 0, 0], [0.27273, 1, 0, 0], [0.09091, 0.2875, 1, 0], [0.18182, 0.23125, 0.0036, 1]]), + new Matrix([[11, 9, 24, 2], [0, 14.54545, 11.45455, 0.45455], [0, 0, -3.475, 5.6875], [0, 0, 0, 0.51079]]), + ]; + + const [lower, upper]: [Matrix, Matrix, Int32Array] = c.lu(); + assert.deepEqual(d[0], lower.map((value: number) => round(value, 5))); + assert.deepEqual(d[1], upper.map((value: number) => round(value, 5))); + }); + }); + + describe('.plu()', () => { + it('should work as expected', () => { + var a = new Matrix([[1, 3, 5], [2, 4, 7], [1, 1, 0]]); + var b = new Matrix([[2, 4, 7], [0.5, 1, 1.5], [0.5, -1, -2]]); + var ipiv = new Int32Array([1, 1, 2]); + + var plu = a.plu(); + assert.deepEqual(ipiv, plu.pop()); + assert.deepEqual(b, plu.pop()); + }); + }); + + describe('.lusolve()', () => { + it('should work as expected', () => { + var a = new Matrix([[1, 3, 5], [2, 4, 7], [1, 1, 0]]); + var rhs = new Matrix([[1], [3], [5]]); + var x = new Matrix([[3.25], [1.75], [-1.5]]); + + var plu = a.plu(), + lu = plu[0], + ipiv = plu[1]; + + lu.lusolve(rhs, ipiv); + assert.deepEqual(x, rhs); + }); + }); + + describe('.solve()', () => { + it('should work as expected', () => { + var a = new Matrix([[1, 3, 5], [2, 4, 7], [1, 1, 0]]); + var rhs = new Matrix([[1], [3], [5]]); + var x = new Matrix([[3.25], [1.75], [-1.5]]); + + assert.deepEqual(x, a.solve(rhs)); + }); + }); + + describe('.augment()', () => { + it('should return current matrix when combined with empty matrix', () => { + var a = new Matrix([[1, 2], [3, 4]]); + + assert.deepEqual(a, a.augment(new Matrix())); + }); + + it('should work as expected', () => { + var a = new Matrix([[1, 2], [3, 4]]); + var b = new Matrix([[5, 6], [7, 8]]); + var c = new Matrix([[1, 2, 5, 6], [3, 4, 7, 8]]); + + assert.deepEqual(c, a.augment(b)); + }); + }); + + describe('.diag()', () => { + it('should work as expected', () => { + var a = new Matrix([[1, 2, 3], [4, 5, 6], [7, 8, 9]]); + var b = new Matrix([[1, 2, 3, 4], [5, 6, 7, 8]]); + + assert.deepEqual(new Vector([1, 5, 9]), a.diag()); + assert.deepEqual(new Vector([1, 6]), b.diag()); + }); + }); + + describe('.trace()', () => { + it('should work as expected', () => { + var a = new Matrix([[1, 2, 3], [4, 5, 6], [7, 8, 9]]); + var b = new Matrix([[1, 2], [3, 4]]); + + assert.equal(15, a.trace()); + assert.equal(5, b.trace()); + }); + }); + + describe('.determinant()', () => { + it('should throw error if matrix is not square', () => { + var a = new Matrix([[0, 0]]); + assert.throws(a.determinant.bind(a), Error); + }); + + it('should work as expected', () => { + var a = new Matrix([[1, 2], [3, 4]]); + var b = new Matrix([[1, 5, 6], [3.3, 9, 10], [7, 9, 3.2]]); + var c = new Matrix([[2, -1, 1], [-1, -2, 1], [-1, -1, -1]]); + + assert.equal(-2, round(a.determinant(), 2)); + assert.equal(36.2, round(b.determinant(), 2)); + assert.equal(7, round(c.determinant(), 2)); + }); + }); + + describe('.equals()', () => { + it('should work as expected', () => { + var a = new Matrix([[1, 2], [3, 4]]), + b = new Matrix([[3, 4], [1, 2]]); + + assert.equal(true, a.equals(new Matrix([[1, 2], [3, 4]]))); + assert.equal(true, new Matrix().equals(new Matrix())); + assert.equal(false, a.equals(b)); + }); + }); + + describe('.get()', () => { + it('should throw error if index out of bounds', () => { + var a = new Matrix([[1, 2], [3, 4]]); + + assert.throws(a.get.bind(a, -1, 0), Error); + assert.throws(a.get.bind(a, 0, -1), Error); + assert.throws(a.get.bind(a, 2, 0), Error); + assert.throws(a.get.bind(a, 0, 2), Error); + }); + + it('should work as expected', () => { + var a = new Matrix([[1, 2], [3, 4], [5, 6]]); + + assert.equal(1, a.get(0, 0)); + assert.equal(2, a.get(0, 1)); + assert.equal(3, a.get(1, 0)); + assert.equal(4, a.get(1, 1)); + assert.equal(5, a.get(2, 0)); + }); + }); + + describe('.set()', () => { + it('should throw error if index out of bounds', () => { + var a = new Matrix([[1, 2], [3, 4]]); + + assert.throws(a.set.bind(a, -1, 0), Error); + assert.throws(a.set.bind(a, 0, -1), Error); + assert.throws(a.set.bind(a, 2, 0), Error); + assert.throws(a.set.bind(a, 0, 2), Error); + }); + + it('should work as expected', () => { + var a = new Matrix([[1, 2], [3, 4]]); + a.set(0, 0, 0); + a.set(0, 1, 1); + a.set(1, 0, 0); + a.set(1, 1, 1); + + assert.equal(0, a.get(0, 0)); + assert.equal(1, a.get(0, 1)); + assert.equal(0, a.get(1, 0)); + assert.equal(1, a.get(1, 1)); + }); + }); + + describe('.swap()', () => { + it('should throw error if index out of bounds', () => { + var a = new Matrix([[1, 2], [3, 4]]); + + assert.throws(a.swap.bind(a, -1, 0), Error); + assert.throws(a.swap.bind(a, 0, -1), Error); + assert.throws(a.swap.bind(a, 2, 0), Error); + assert.throws(a.swap.bind(a, 0, 2), Error); + }); + + it('should work as expected', () => { + var a = new Matrix([[1, 2], [3, 4], [5, 6]]); + a.swap(0, 1); + assert.deepEqual(new Matrix([[3, 4], [1, 2], [5, 6]]), a); + + a.swap(0, 2); + assert.deepEqual(new Matrix([[5, 6], [1, 2], [3, 4]]), a); + }); + }); + + describe('.map()', () => { + it('should work as expected', () => { + var a = new Matrix([[1, 2, 3], [4, 5, 6]]); + var b = a.map(element => element * 2); + + assert.deepEqual(new Matrix([[2, 4, 6], [8, 10, 12]]), b); + }); + }); + + describe('.each()', () => { + it('should work as expected', () => { + var a = new Matrix([[1, 2], [3, 4]]); + var b = Matrix.zeros(2, 2); + + a.each((value, i, j) => { + b.set(i, j, value * j); + }); + + assert.deepEqual(new Matrix([[0, 2], [0, 4]]), b); + }); + }); + + describe('.reduce()', () => { + it('should work as expected', () => { + function sum(a: number, b: number) { + return a + b; + } + + var a = new Matrix([[1, 2, 3]]); + var b = new Matrix([[1, 2, 3], [4, 5, 6]]); + + assert.deepEqual(6, a.reduce(sum)); + assert.deepEqual(21, b.reduce(sum)); + }); + }); + + describe('.rank()', () => { + it('should work as expected', () => { + var a = new Matrix([[1, 2, 1], [-2, -3, 1], [3, 5, 0]]); + var b = new Matrix([[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12]]); + var c = new Matrix([[1, 1, 1], [2, 2, 2], [3, 3, 3]]); + var d = new Matrix([[0, 0, 0], [0, 0, 0]]); + + assert.equal(a.rank(), 2); + assert.equal(b.rank(), 2); + assert.equal(c.rank(), 1); + assert.equal(d.rank(), 0); + + assert.equal(a.rank(), Matrix.rank(a)); + }); + }); + + describe('.toString()', () => { + it('should work as expected', () => { + assert.equal('[[1,2], \n[3,4]]', new Matrix([[1, 2], [3, 4]]).toString()); + assert.equal('[[1,2], \n[3,4], \n[5,6]]', new Matrix([[1, 2], [3, 4], [5, 6]]).toString()); + }); + }); + + describe('.toArray()', () => { + it('should work as expected', () => { + assert.deepEqual([[1, 2], [3, 4]], new Matrix([[1, 2], [3, 4]]).toArray()); + assert.deepEqual([[1, 2], [3, 4], [5, 6]], new Matrix([[1, 2], [3, 4], [5, 6]]).toArray()); + }); + }); +}); diff --git a/src/Matrix.spec.ts b/src/Matrix.spec.ts new file mode 100644 index 00000000..4fb0468c --- /dev/null +++ b/src/Matrix.spec.ts @@ -0,0 +1,217 @@ +import { Matrix, Vector } from './'; +import * as assert from 'assert'; + +describe('Matrix', () => { + describe('Matrix(data, options)', () => { + it('should work equivalent to Matrix.fromTypedArray when data is a typed array', () => { + var a = new Matrix(new Float64Array([1, 2, 3]), { shape: [1, 3] }); + var b = Matrix.fromTypedArray(new Float64Array([1, 2, 3]), [1, 3]); + + assert.deepEqual(a, b); + }); + + it('should work equivalent to Matrix.fromArray when data is a regular 2d array', () => { + var a = new Matrix([[1, 2, 3]]); + var b = Matrix.fromArray([[1, 2, 3]]); + + assert.deepEqual(a, b); + }); + + it('should work equivalent to Matrix.fromMatrix when data is a Matrix', () => { + var a = new Matrix(new Matrix([[1, 2, 3]])); + var b = Matrix.fromMatrix(new Matrix([[1, 2, 3]])); + + assert.deepEqual(a, b); + }); + + it('should work equivalent to Matrix.fromVector when data is a Vector', () => { + var a = new Matrix(new Vector([1, 2, 3])); + var b = Matrix.fromVector(new Vector([1, 2, 3])); + + assert.deepEqual(a, b); + }); + + it('should work equivalent to Matrix.fromShape when data is a shape', () => { + var a = new Matrix(3, 2); + var b = new Matrix({ shape: [3, 2] }); + var c = Matrix.fromShape([3, 2]); + + assert.deepEqual(a, c); + assert.deepEqual(b, c); + }); + }); + + describe('Matrix.fromTypedArray(data, shape)', () => { + it('should work as expected', () => { + var a = new Matrix(new Float64Array([1, 2, 3]), { shape: [1, 3] }); + + assert(a instanceof Matrix); + assert.equal(a.type, Float64Array); + assert.deepEqual(a.shape, [1, 3]); + }); + }); + + describe('Matrix.fromArray(array)', () => { + it('should work as expected', () => { + var a = Matrix.fromArray([[1, 2, 3]]); + + assert(a instanceof Matrix); + assert.equal(a.type, Float64Array); + assert.deepEqual(a.data, [1, 2, 3]); + assert.deepEqual(a.shape, [1, 3]); + }); + }); + + describe('Matrix.fromMatrix(matrix)', () => { + it('should work as expected', () => { + var a = Matrix.fromArray([[1, 2, 3]]); + var b = Matrix.fromMatrix(a); + + assert(b instanceof Matrix); + assert.deepEqual(a, b); + }); + }); + + describe('Matrix.fromVector(vector, shape)', () => { + it('should work as expected', () => { + var v = new Vector([1, 2, 3]); + var a = Matrix.fromVector(v); + + assert(a instanceof Matrix); + assert.equal(a.type, v.type); + assert.deepEqual(a.data, [1, 2, 3]); + assert.deepEqual(a.shape, [3, 1]); + }); + }); + + describe('Matrix.fromShape(shape)', () => { + it('should work as expected', () => { + var a = Matrix.fromShape([3, 2]); + + assert(a instanceof Matrix); + assert.equal(a.type, Float64Array); + assert.deepEqual(a.data, [0, 0, 0, 0, 0, 0]); + assert.deepEqual(a.shape, [3, 2]); + }); + }); + + describe('Matrix.add(a, b)', () => { + it('should work as the static equivalent of a.add(b)', () => { + var a = new Matrix([[1, 1, 1]]); + var b = new Matrix([[1, 2, 3]]); + + assert.deepEqual(new Matrix(a).add(b), Matrix.add(a, b)); + }); + }); + + describe('Matrix.subtract(a, b)', () => { + it('should work as the static equivalent of a.subtract(b)', () => { + var a = new Matrix([[1, 1, 1]]); + var b = new Matrix([[1, 2, 3]]); + + assert.deepEqual(new Matrix(a).subtract(b), Matrix.subtract(a, b)); + }); + }); + + describe('Matrix.scale(a, scalar)', () => { + it('should work as the static equivalent of a.scale(scalar)', () => { + var a = new Matrix([[1, 1, 1]]); + + assert.deepEqual(new Matrix(a).scale(5), Matrix.scale(a, 5)); + }); + }); + + describe('Matrix.product(a, b)', () => { + it('should work as the static equivalent of a.product(b)', () => { + var a = new Matrix([[3, 2, 1]]); + var b = new Matrix([[1, 2, 3]]); + + assert.deepEqual(new Matrix(a).product(b), Matrix.product(a, b)); + }); + }); + + describe('Matrix.multiply(a, b)', () => { + it('should work as the static equivalent of a.multiply(b)', () => { + var a = new Matrix([[1], [2], [3]]); + var b = new Matrix([[1, 1, 1]]); + + assert.deepEqual(new Matrix(a).multiply(b), Matrix.multiply(a, b)); + }); + }); + + describe('Matrix.plu(a)', () => { + it('should work as the static equivalent of a.plu()', () => { + var a = new Matrix([[1, 3, 5], [2, 4, 7], [1, 1, 0]]); + + assert.deepEqual(new Matrix(a).plu(), Matrix.plu(a)); + }); + }); + + describe('Matrix.augment(a, b)', () => { + it('should work as the static equivalent of a.augment(b)', () => { + var a = new Matrix([[1, 1, 1]]); + var b = new Matrix([[1, 2, 3]]); + + assert.deepEqual(new Matrix(a).augment(b), Matrix.augment(a, b)); + }); + }); + + describe('Matrix.equals(a, b)', () => { + it('should work as the static equivalent of a.equals(b)', () => { + var a = new Matrix([[1, 1, 1]]); + var b = new Matrix([[1, 1, 1]]); + + assert.deepEqual(new Matrix(a).equals(b), Matrix.equals(a, b)); + }); + }); + + describe('Matrix.identity()', () => { + it('should throw error if invalid size', () => { + assert.throws(Matrix.identity.bind(new Matrix(), -1), Error); + assert.throws(Matrix.identity.bind(new Matrix(), 0), Error); + }); + + it('should work as expected', () => { + assert.deepEqual(new Matrix([[1, 0, 0], [0, 1, 0], [0, 0, 1]]), Matrix.identity(3)); + }); + }); + + describe('Matrix.magic()', () => { + it('should throw error if invalid size', () => { + assert.throws(Matrix.magic.bind(new Matrix(), -1), Error); + assert.throws(Matrix.identity.bind(new Matrix(), 0), Error); + }); + + it('should work as expected', () => { + assert.deepEqual(new Matrix([[8, 1, 6], [3, 5, 7], [4, 9, 2]]), Matrix.magic(3)); + }); + }); + + describe('Matrix.zeros()', () => { + it('should throw error if invalid size', () => { + assert.throws(Matrix.zeros.bind(new Matrix(), 0, 0), Error); + assert.throws(Matrix.zeros.bind(new Matrix(), -1, 1), Error); + assert.throws(Matrix.zeros.bind(new Matrix(), 1, -1), Error); + }); + + it('should work as expected', () => { + assert.deepEqual(new Matrix([[0, 0, 0]]), Matrix.zeros(1, 3)); + assert.deepEqual(new Matrix([[0], [0], [0]]), Matrix.zeros(3, 1)); + assert.deepEqual(new Matrix([[0, 0], [0, 0]]), Matrix.zeros(2, 2)); + }); + }); + + describe('Matrix.ones()', () => { + it('should throw error if invalid size', () => { + assert.throws(Matrix.ones.bind(new Matrix(), 0, 0), Error); + assert.throws(Matrix.ones.bind(new Matrix(), -1, 1), Error); + assert.throws(Matrix.ones.bind(new Matrix(), 1, -1), Error); + }); + + it('should work as expected', () => { + assert.deepEqual(new Matrix([[1, 1, 1]]), Matrix.ones(1, 3)); + assert.deepEqual(new Matrix([[1], [1], [1]]), Matrix.ones(3, 1)); + assert.deepEqual(new Matrix([[1, 1], [1, 1]]), Matrix.ones(2, 2)); + }); + }); +}); diff --git a/src/Matrix.ts b/src/Matrix.ts new file mode 100644 index 00000000..a4bca970 --- /dev/null +++ b/src/Matrix.ts @@ -0,0 +1,982 @@ +import './types'; +import Vector from './Vector'; + +let nblas: any; +try { + nblas = require('nblas'); +} catch (_) {} + +export default class Matrix { + type: TypedArrayConstructor; + shape: number[]; + data: TypedArray; + + /** + * Creates a `Matrix` from the supplied arguments. + */ + constructor(data?: any, options?: any) { + this.type = Float64Array; + this.data = new this.type(0); + this.shape = [0, 0]; + + if (data && data.buffer && data.buffer instanceof ArrayBuffer) { + return Matrix.fromTypedArray(data, options && options.shape); + } + + if (data instanceof Array) { + return Matrix.fromArray(data); + } + + if (data instanceof Vector) { + return Matrix.fromVector(data, options && options.shape); + } + + if (data instanceof Matrix) { + return Matrix.fromMatrix(data); + } + + if (typeof data === "number" && typeof options === "number") { + // Handle new Matrix(r, c) + return Matrix.fromShape([data, options]); + } + + if (data && !data.buffer && data.shape) { + // Handle new Matrix({ shape: [r, c] }) + return Matrix.fromShape(data.shape); + } + } + + static fromTypedArray(data: TypedArray, shape: number[]) { + if (data.length !== shape[0] * shape[1]) + throw new Error("Shape does not match typed array dimensions."); + + const self = Object.create(Matrix.prototype); + self.shape = shape; + self.data = data; + self.type = data.constructor; + + return self; + } + + static fromArray(array: number[][]) { + const r = array.length; + const c = array[0].length; + const data = new Float64Array(r * c); + + let i; + let j; + for (i = 0; i < r; ++i) { + for (j = 0; j < c; ++j) { + data[i * c + j] = array[i][j]; + } + } + + return Matrix.fromTypedArray(data, [r, c]); + } + + static fromMatrix(matrix: Matrix) { + const self = Object.create(Matrix.prototype); + self.shape = [matrix.shape[0], matrix.shape[1]]; + self.data = new matrix.type(matrix.data); + self.type = matrix.type; + + return self; + } + + static fromVector(vector: Vector, shape?: number[]) { + if (shape && vector.length !== shape[0] * shape[1]) { + throw new Error("Shape does not match vector dimensions."); + } + + const self = Object.create(Matrix.prototype); + self.shape = shape ? shape : [vector.length, 1]; + self.data = new vector.type(vector.data); + self.type = vector.type; + + return self; + } + + static fromShape(shape: number[]) { + const [r, c] = shape; + return Matrix.fromTypedArray(new Float64Array(r * c), shape); + } + + /** + * Static method. Perform binary operation on two matrices `a` and `b` together. + */ + static binOp(a: Matrix, b: Matrix, op: (a: number, b: number, index?: number) => number): Matrix { + return new Matrix(a).binOp(b, op); + } + + /** + * Perform binary operation on `matrix` to the current matrix. + */ + binOp(matrix: Matrix, op: (a: number, b: number, index?: number) => number): Matrix { + const [r, c] = this.shape; + const size = r * c; + const d1 = this.data; + const d2 = matrix.data; + + if (r !== matrix.shape[0] || c !== matrix.shape[1]) { + throw new Error('sizes do not match!'); + } + + let i; + for (i = 0; i < size; i++) { + d1[i] = op(d1[i], d2[i], i); + } + + return this; + } + + /** + * Static method. Adds two matrices `a` and `b` together. + */ + static add(a: Matrix, b: Matrix): Matrix { + return new Matrix(a).add(b); + } + + /** + * Adds `matrix` to current matrix. + */ + add(matrix: Matrix): Matrix { + const [r1, c1] = this.shape; + const [r2, c2] = matrix.shape; + + if (r1 !== r2 || c1 !== c2) + throw new Error('sizes do not match!'); + + if (nblas && nblas.axpy) { + nblas.axpy(matrix.data, this.data); + return this; + } + + return this.binOp(matrix, (a, b) => a + b); + } + + /** + * Static method. Subtracts the matrix `b` from matrix `a`. + */ + static subtract(a: Matrix, b: Matrix): Matrix { + return new Matrix(a).subtract(b); + } + + /** + * Subtracts `matrix` from current matrix. + */ + subtract(matrix: Matrix): Matrix { + const [r1, c1] = this.shape; + const [r2, c2] = matrix.shape; + + if (r1 !== r2 || c1 !== c2) { + throw new Error('sizes do not match!'); + } + + if (nblas && nblas.axpy) { + nblas.axpy(matrix.data, this.data, -1); + return this; + } + + return this.binOp(matrix, (a, b) => a - b); + } + + /** + * Static method. Hadamard product of matrices + */ + static product(a: Matrix, b: Matrix): Matrix { + return new Matrix(a).product(b); + } + + /** + * Hadamard product of matrices + */ + product(matrix: Matrix): Matrix { + return this.binOp(matrix, (a, b) => a * b); + } + + /** + * Static method. Multiplies all elements of a matrix `a` with a specified `scalar`. + */ + static scale(a: Matrix, scalar: number): Matrix { + return new Matrix(a).scale(scalar); + } + + /** + * Multiplies all elements of current matrix with a specified `scalar`. + */ + scale(scalar: number): Matrix { + if (nblas && nblas.scal) { + nblas.scal(this.data, scalar); + return this; + } + + const [r, c] = this.shape; + const size = r * c; + const d1 = this.data; + + let i; + for (i = 0; i < size; i++) { + d1[i] *= scalar; + } + + return this; + } + + /** + * Static method. Creates a `r x c` matrix containing optional 'value' (default 0), takes + * an optional `type` argument which should be an instance of `TypedArray`. + */ + static fill(r: number, c: number, value: number | ((r: number, c: number) => number), type?: TypedArrayConstructor): Matrix { + if (r <= 0 || c <= 0) { + throw new Error('invalid size'); + } + + value = value || +0.0; + type = type || Float64Array; + + const size = r * c; + const data = new type(size); + + let i; + let j; + let k = 0; + for (i = 0; i < r; i++) { + for (j = 0; j < c; j++, k++) { + data[k] = value instanceof Function ? value(i, j) : value; + } + } + + return Matrix.fromTypedArray(data, [r, c]); + } + + /** + * Static method. Creates an `r x c` matrix containing zeros (`0`), takes an + * optional `type` argument which should be an instance of `TypedArray`. + */ + static zeros(r: number, c: number, type?: TypedArrayConstructor): Matrix { + return Matrix.fill(r, c, +0.0, type); + } + + /** + * Static method. Creates an `r x c` matrix containing ones (`1`), takes an + * optional `type` argument which should be an instance of `TypedArray`. + */ + static ones(r: number, c: number, type?: TypedArrayConstructor): Matrix { + return Matrix.fill(r, c, +1.0, type); + } + + /** + * Static method. Creates an `r x c` matrix containing random values + * according to a uniform distribution bounded by `min` and `max`, + * takes an optional `type` argument which should be an instance of `TypedArray`. + */ + static random(r: number, c: number, min: number = 0, max: number = 1, type?: TypedArrayConstructor): Matrix { + return Matrix.fill(r, c, () => { + return min + (Math.random() * (max - min)); + }, type); + } + + /** + * Static method. Multiplies two matrices `a` and `b` of matching dimensions. + */ + static multiply(a: Matrix, b: Matrix): Matrix { + return a.multiply(b); + } + + /** + * Multiplies two matrices `a` and `b` of matching dimensions. + */ + multiply(matrix: Matrix): Matrix { + const [r1, c1] = this.shape; + const [r2, c2] = matrix.shape; + const d1 = this.data; + const d2 = matrix.data; + + if (c1 !== r2) { + throw new Error('sizes do not match'); + } + + const data = new this.type(r1 * c2); + + if (nblas && nblas.gemm) { + nblas.gemm(d1, d2, data, r1, c2, c1); + return Matrix.fromTypedArray(data, [r1, c2]); + } + + let i; + let j; + let k; + let sum; + for (i = 0; i < r1; i++) { + for (j = 0; j < c2; j++) { + sum = +0; + for (k = 0; k < c1; k++) { + sum += d1[i * c1 + k] * d2[j + k * c2]; + } + + data[i * c2 + j] = sum; + } + } + + return Matrix.fromTypedArray(data, [r1, c2]); + } + + /** + * Getter for transpose. + */ + get T(): Matrix { + return this.transpose(); + } + + /** + * Transposes a matrix (mirror across the diagonal). + */ + transpose(): Matrix { + const [r, c] = this.shape; + const data = new this.type(c * r); + + let i; + let j; + for (i = 0; i < r; i++) { + for (j = 0; j < c; j++) { + data[j * r + i] = this.data[i * c + j]; + } + } + + return Matrix.fromTypedArray(data, [c, r]); + } + + /** + * Determines the inverse of any invertible square matrix using + * Gaussian elimination. + */ + inverse(): Matrix { + const [r, c] = this.shape; + + if (r !== c) { + throw new Error('invalid dimensions'); + } + + const identity = Matrix.identity(r); + const augmented = Matrix.augment(this, identity); + const gauss = augmented.gauss(); + const left = Matrix.zeros(r, c); + const right = Matrix.zeros(r, c); + + const n = gauss.shape[1]; + + let i; + let j; + for (i = 0; i < r; i++) { + for (j = 0; j < n; j++) { + if (j < c) { + left.set(i, j, gauss.get(i, j)); + } else { + right.set(i, j - r, gauss.get(i, j)); + } + } + } + + if (!left.equals(Matrix.identity(r))) { + throw new Error('matrix is not invertible'); + } + + return right; + } + + /** + * Performs Gaussian elimination on a matrix. + */ + gauss(): Matrix { + const [r, c] = this.shape; + const copy = new Matrix(this); + + let lead = 0; + let pivot; + let leadValue; + + let i; + let j; + let k; + for (i = 0; i < r; i++) { + if (c <= lead) { + throw new Error('matrix is singular'); + } + + j = i; + while (copy.data[j * c + lead] === 0) { + j++; + if (r === j) { + j = i; + lead++; + + if (c === lead) { + throw new Error('matrix is singular'); + } + } + } + + copy.swap(i, j); + + pivot = copy.data[i * c + lead]; + if (pivot !== 0) { + // scale down the row by value of pivot + for (k = 0; k < c; k++) { + copy.data[(i * c) + k] = copy.data[(i * c) + k] / pivot; + } + } + + for (j = 0; j < r; j++) { + leadValue = copy.data[j * c + lead]; + if (j !== i) { + for (k = 0; k < c; k++) { + copy.data[j * c + k] = copy.data[j * c + k] - (copy.data[i * c + k] * leadValue); + } + } + } + + lead++; + } + + for (i = 0; i < r; i++) { + pivot = 0; + for (j = 0; j < c; j++) { + if (!pivot) { + pivot = copy.data[i * c + j]; + } + } + + if (pivot) { + // scale down the row by value of pivot + for (k = 0; k < c; k++) { + copy.data[(i * c) + k] = copy.data[(i * c) + k] / pivot; + } + } + } + + return copy; + } + + /** + * Performs full LU decomposition on a matrix. + */ + lu(): [Matrix, Matrix, Int32Array] { + const [r, c] = this.shape; + const plu = Matrix.plu(this); + const ipiv = plu[1]; + const lower = new Matrix(plu[0]); + const upper = new Matrix(plu[0]); + + let i; + let j; + for (i = 0; i < r; i++) { + for (j = i; j < c; j++) { + lower.data[i * c + j] = i === j ? 1 : 0; + } + } + + for (i = 0; i < r; i++) { + for (j = 0; j < i && j < c; j++) { + upper.data[i * c + j] = 0; + } + } + + return [lower, upper, ipiv]; + } + + /** + * Static method. Performs LU factorization on current matrix. + */ + static plu(matrix: Matrix): [Matrix, Int32Array] { + return new Matrix(matrix).plu(); + } + + /** + * Performs LU factorization on current matrix. + */ + plu(): [Matrix, Int32Array] { + const data = this.data; + const n = this.shape[0]; + const ipiv = new Int32Array(n); + + let max; + let abs; + let diag; + let p; + + let i; + let j; + let k; + for (k = 0; k < n; ++k) { + p = k; + max = Math.abs(data[k * n + k]); + for (j = k + 1; j < n; ++j) { + abs = Math.abs(data[j * n + k]); + if (max < abs) { + max = abs; + p = j; + } + } + + ipiv[k] = p; + + if (p !== k) { + this.swap(k, p); + } + + diag = data[k * n + k]; + for (i = k + 1; i < n; ++i) { + data[i * n + k] /= diag; + } + + for (i = k + 1; i < n; ++i) { + for (j = k + 1; j < n - 1; ++j) { + data[i * n + j] -= data[i * n + k] * data[k * n + j]; + ++j; + data[i * n + j] -= data[i * n + k] * data[k * n + j]; + } + + if (j === n - 1) { + data[i * n + j] -= data[i * n + k] * data[k * n + j]; + } + } + } + + return [this, ipiv]; + } + + /** + * Solves an LU factorized matrix with the supplied right hand side(s) + */ + lusolve(rhs: Matrix, ipiv: Int32Array): Matrix { + const lu = this.data; + const [n, nrhs] = rhs.shape; + const x = rhs.data; + + let i; + let j; + let k; + // pivot right hand side + for (i = 0; i < ipiv.length; i++) { + if (i !== ipiv[i]) { + rhs.swap(i, ipiv[i]); + } + } + + for (k = 0; k < nrhs; k++) { + // forward solve + for (i = 0; i < n; i++) { + for (j = 0; j < i; j++) { + x[i * nrhs + k] -= lu[i * n + j] * x[j * nrhs + k]; + } + } + + // backward solve + for (i = n - 1; i >= 0; i--) { + for (j = i + 1; j < n; j++) { + x[i * nrhs + k] -= lu[i * n + j] * x[j * nrhs + k]; + } + + x[i * nrhs + k] /= lu[i * n + i]; + } + } + + return rhs; + } + + /** + * Solves AX = B using LU factorization, where A is the current matrix and + * B is a Vector/Matrix containing the right hand side(s) of the equation. + */ + solve(rhs: Matrix): Matrix { + var [lu, ipiv] = Matrix.plu(this); + return lu.lusolve(new Matrix(rhs), ipiv); + } + + /** + * Static method. Augments two matrices `a` and `b` of matching dimensions + * (appends `b` to `a`). + */ + static augment(a: Matrix, b: Matrix): Matrix { + return new Matrix(a).augment(b); + } + + /** + * Augments `matrix` with current matrix. + */ + augment(matrix: Matrix): Matrix { + const [r1, c1] = this.shape; + const [r2, c2] = matrix.shape; + const d1 = this.data; + const d2 = matrix.data; + + if (r2 === 0 && c2 === 0) + return this; + + if (r1 !== r2) + throw new Error("Rows do not match."); + + const length = c1 + c2; + const data = new this.type(length * r1); + + let i; + let j; + for (i = 0; i < r1; i++) { + for (j = 0; j < c1; j++) { + data[i * length + j] = d1[i * c1 + j]; + } + } + + for (i = 0; i < r2; i++) { + for (j = 0; j < c2; j++) { + data[i * length + j + c1] = d2[i * c2 + j]; + } + } + + this.shape = [r1, length]; + this.data = data; + + return this; + } + + /** + * Static method. Creates an identity matrix of `size`, takes an optional `type` argument + * which should be an instance of `TypedArray`. + */ + static identity(size: number, type?: TypedArrayConstructor): Matrix { + return Matrix.fill(size, size, (i, j) => i === j ? +1.0 : +0.0, type); + } + + /** + * Static method. Creates a magic square matrix of `size`, takes an optional `type` argument + * which should be an instance of `TypedArray`. + */ + static magic(size: number, type?: TypedArrayConstructor): Matrix { + if (size < 0) { + throw new Error('invalid size'); + } + + function f(n: number, x: number, y: number) { + return (x + y * 2 + 1) % n; + } + + type = type || Float64Array; + const data = new type(size * size); + + let i; + let j; + for (i = 0; i < size; i++) { + for (j = 0; j < size; j++) { + data[(size - i - 1) * size + (size - j - 1)] = + f(size, size - j - 1, i) * size + f(size, j, i) + 1; + } + } + + return Matrix.fromTypedArray(data, [size, size]); + } + + /** + * Gets the diagonal of a matrix. + */ + diag(): Vector { + const [r, c] = this.shape; + const data = new this.type(Math.min(r, c)); + + let i; + for (i = 0; i < r && i < c; i++) { + data[i] = this.data[i * c + i]; + } + + return new Vector(data); + } + + /** + * Gets the determinant of any square matrix using LU factorization. + */ + determinant(): number { + const [r, c] = this.shape; + + if (r !== c) { + throw new Error('matrix is not square'); + } + + const plu = Matrix.plu(this); + const [lu, ipiv] = plu; + + let product = 1; + let sign = 1; + + let i; + // get sign from ipiv + for (i = 0; i < r; i++) { + if (i !== ipiv[i]) { + sign *= -1; + } + } + + for (i = 0; i < r; i++) { + product *= lu.data[i * c + i]; + } + + return sign * product; + } + + /** + * Gets the trace of the matrix (the sum of all diagonal elements). + */ + trace(): number { + const diagonal = this.diag(); + const length = diagonal.length; + + let result = 0; + + let i; + for (i = 0; i < length; i++) + result += diagonal.get(i); + + return result; + } + + /** + * Static method. Checks the equality of two matrices `a` and `b`. + */ + static equals(a: Matrix, b: Matrix): boolean { + return a.equals(b); + } + + /** + * Checks the equality of `matrix` and current matrix. + */ + equals(matrix: Matrix): boolean { + const [r1, c1] = this.shape; + const [r2, c2] = matrix.shape; + const size = r1 * c1; + const d1 = this.data; + const d2 = matrix.data; + + if (r1 !== r2 || c1 !== c2 || this.type !== matrix.type) { + return false; + } + + let i; + for (i = 0; i < size; i++) { + if (d1[i] !== d2[i]) { + return false; + } + } + + return true; + } + + /** + * Check if `i` and `j` is within the bounds for current matrix. + */ + check(i: number, j: number): void { + const [r, c] = this.shape; + + if (isNaN(i) || isNaN(j)) { + throw new Error('one of the indices is not a number'); + } + + if (i < 0 || j < 0 || i > r - 1 || j > c - 1) { + throw new Error('index out of bounds'); + } + } + + /** + * Gets the value of the element in row `i`, column `j` of current matrix + */ + get(i: number, j: number): number { + this.check(i, j); + return this.data[i * this.shape[1] + j]; + } + + /** + * Sets the element at row `i`, column `j` to value + */ + set(i: number, j: number, value: number): Matrix { + this.check(i, j); + this.data[i * this.shape[1] + j] = value; + return this; + } + + /** + * Swaps two rows `i` and `j` in a matrix + */ + swap(i: number, j: number): Matrix { + const [r, c] = this.shape; + if (i < 0 || j < 0 || i > r - 1 || j > r - 1) { + throw new Error('index out of bounds'); + } + + // copy first row + var copy = this.data.slice(i * c, (i + 1) * c); + // move second row into first row spot + this.data.copyWithin(i * c, j * c, (j + 1) * c); + // copy first row back into second row spot + this.data.set(copy, j * c); + + return this; + } + + /** + * Maps a function `callback` to all elements of a copy of current matrix. + */ + map(callback: (value: number, i: number, j: number, src: TypedArray) => number): Matrix { + const [r, c] = this.shape; + const size = r * c; + const mapped = new Matrix(this); + const data = mapped.data; + + let i; + for (i = 0; i < size; i++) { + data[i] = callback.call(mapped, data[i], i / c | 0, i % c, data); + } + + return mapped; + } + + /** + * Functional version of for-looping the elements in a matrix, is + * equivalent to `Array.prototype.forEach`. + */ + each(callback: (value: number, i: number, j: number) => void): Matrix { + const [r, c] = this.shape; + const size = r * c; + + let i; + for (i = 0; i < size; i++) { + callback.call(this, this.data[i], i / c | 0, i % c); + } + + return this; + } + + /** + * Equivalent to `TypedArray.prototype.reduce`. + */ + reduce(callback: (acc: number, value: number, i: number, j: number) => number, initialValue?: number): number { + const [r, c] = this.shape; + const size = r * c; + + if (size === 0 && !initialValue) { + throw new Error('Reduce of empty matrix with no initial value.'); + } + + let i = 0; + let value = initialValue || this.data[i++]; + + for (; i < size; i++) { + value = callback.call(this, value, this.data[i], i / c | 0, i % c); + } + + return value; + } + + /** + * Static method. Finds the rank of the matrix using row echelon form + */ + static rank(matrix: Matrix): number { + return new Matrix(matrix).rank(); + } + + /** + * Finds the rank of the matrix using row echelon form + */ + rank(): number { + const vectors = this + .toArray() + .map(function(r) { + return new Vector(r); + }); + + const [r, c] = this.shape; + + let counter = 0; + let tmp; + let pivot; + let target; + let scalar; + + let i; + let j; + for (i = 0; i < r - 1; i++) { + // go through each row until the row before the last + pivot = null; + for (j = i; j < r; j++) { + // find the pivot (first row where column of same index is non-zero) + if (vectors[i].get(i)) { + if (i !== j) { + // if not the current row, swap the rows, bring pivot the current row index + tmp = vectors[i]; + vectors[i] = vectors[j]; + vectors[j] = tmp; + } + pivot = vectors[i]; + break; + } + } + // if pivot not found, continue + if (!pivot) { + continue; + } + + // otherwise, for all rows underneath pivot, cancel all column index to zero + for (j = (i + 1); j < r; j++) { + target = vectors[j]; + scalar = target.get(i) / pivot.get(i); + vectors[j] = target.subtract(pivot.scale(scalar)); + } + } + + // now vectors should be in row echelon form! + // use optimized loops to count number of vectors that have non-zero values + for (i = 0; i < r; i++) { + for (j = 0; j < c; j++) { + if (vectors[i].get(j)) { + counter++; + break; + } + } + } + + // should be rank + return counter; + } + + /** + * Converts current matrix into a readable formatted string + */ + toString(): string { + const [r, c] = this.shape; + const result = []; + + let i; + for (i = 0; i < r; i++) { + // get string version of current row and store it + result.push('[' + this.data.subarray(i * c, (i + 1) * c ).toString() + ']'); + } + + return '[' + result.join(', \n') + ']'; + } + + /** + * Converts current matrix into a two-dimensional array + */ + toArray(): number[][] { + const [r, c] = this.shape; + const result = []; + + let i; + for (i = 0; i < r; i++) { + // copy current row into a native array and store it + result.push(Array.prototype.slice.call(this.data.subarray(i * c, (i + 1) * c))); + } + + return result; + } +} + +try { + (window).Matrix = Matrix; +} catch (_) {} diff --git a/src/Vector.prototype.spec.ts b/src/Vector.prototype.spec.ts new file mode 100644 index 00000000..e893a934 --- /dev/null +++ b/src/Vector.prototype.spec.ts @@ -0,0 +1,299 @@ +import { Vector } from './'; +import * as assert from 'assert'; + +describe('Vector.prototype', () => { + describe('.add()', () => { + it('should return empty vector if adding two empty vectors', () => { + var a = new Vector(); + var b = new Vector(); + + assert.deepEqual(new Vector(), a.add(b)); + }); + + it('should throw error if sizes do not match', () => { + var a = new Vector([1]); + var b = new Vector([1, 2]); + + assert.throws(a.add.bind(a, b), Error); + }); + + it('should produce Vector(5, 7, 9) from Vector(1, 2, 3) and Vector(4, 5, 6)', () => { + var a = new Vector([1, 2, 3]); + var b = new Vector([4, 5, 6]); + var c = new Vector([5, 7, 9]); + + assert.deepEqual(c, a.add(b)); + }); + }); + + describe('.subtract()', () => { + it('should return empty vector if subtracting two empty vectors', () => { + var a = new Vector(); + var b = new Vector(); + + assert.deepEqual(new Vector(), a.subtract(b)); + }); + + it('should throw error if sizes do not match', () => { + var a = new Vector([1]); + var b = new Vector([1, 2]); + + assert.throws(a.subtract.bind(a, b), Error); + }); + + it('should produce Vector(-3, -3, -3) from Vector(1, 2, 3) and Vector(4, 5, 6)', () => { + var a = new Vector([1, 2, 3]); + var b = new Vector([4, 5, 6]); + var c = new Vector([-3, -3, -3]); + + assert.deepEqual(c, a.subtract(b)); + }); + }); + + describe('.scale()', () => { + it('should scale Vector(1, 2, 3) by 2 to Vector(2, 4, 6)', () => { + var a = new Vector([1, 2, 3]); + var b = new Vector([2, 4, 6]); + + assert.deepEqual(b, a.scale(2)); + }); + }); + + describe('.normalize()', () => { + it('should work as expected', () => { + var a = new Vector([1, 1]); + var b = new Vector([1 / Math.sqrt(2), 1 / Math.sqrt(2)]); + + assert.deepEqual(b, a.normalize()); + }); + }); + + describe('.project()', () => { + it('should throw error if sizes do not match', () => { + var a = new Vector([1]); + var b = new Vector([1, 2]); + + assert.throws(a.project.bind(a, b), Error); + }); + + it('should work as expected', () => { + var a = new Vector([2, 1]); + var b = new Vector([-3, 4]); + var c = new Vector([6 / 25, -8 / 25]); + + assert.deepEqual(c, a.project(b)); + }); + }); + + describe('.range()', () => { + it('should throw error if wrong number or arguments supplied', () => { + assert.throws(Vector.range.bind(new Vector(), 1), Error); + assert.throws(Vector.range.bind(new Vector(), 1, 2, 3, 4), Error); + }); + + it('should throw error if step > start - end', () => { + assert.throws(Vector.range.bind(new Vector(), 0, 0), Error); + assert.throws(Vector.range.bind(new Vector(), 1, 3, 2), Error); + }); + + it('should work as expected', () => { + var a = Vector.range(0, 5); + var b = Vector.range(5, 2, 10); + var c = Vector.range(5, 0); + var d = Vector.range(5, 2, 0); + + assert.deepEqual(new Vector([0, 1, 2, 3, 4]), a); + assert.deepEqual(new Vector([5, 7, 9]), b); + assert.deepEqual(new Vector([5, 4, 3, 2, 1]), c); + assert.deepEqual(new Vector([5, 3, 1]), d); + }); + }); + + describe('.dot()', () => { + it('should throw error if sizes do not match', () => { + var a = new Vector([1]); + var b = new Vector([1, 2]); + + assert.throws(a.dot.bind(a, b), Error); + }); + + it('should work as expected', () => { + var a = new Vector([1, 2, 3]); + var b = new Vector([4, 5, 6]); + + assert.equal(32, a.dot(b)); + }); + }); + + describe('.magnitude()', () => { + it('should return 0 if empty vector', () => { + assert.equal(0, new Vector().magnitude()); + }); + + it('should work as expected', () => { + assert.equal(4, new Vector([1, 1, 1, 2, 3]).magnitude()); + }); + }); + + describe('.angle()', () => { + it('should work as expected', () => { + var a = new Vector([1, 0]); + var b = new Vector([0, 1]); + + assert.equal(Math.PI / 2, a.angle(b)); + }); + }); + + describe('.equals()', () => { + it('should work as expected', () => { + assert.equal(true, new Vector([1, 3, 2]).equals(new Vector([1, 3, 2]))); + assert.equal(true, new Vector().equals(new Vector())); + assert.equal(false, new Vector([1, 2, 3]).equals(new Vector([1, 3, 2]))); + }); + }); + + describe('.get()', () => { + it('should throw error if index out of bounds', () => { + var a = new Vector([1, 2, 3]); + assert.throws(a.get.bind(a, -1), Error); + assert.throws(a.get.bind(a, 3), Error); + }); + + it('should work as expected', () => { + var a = new Vector([1, 3, 2, 4]); + assert.equal(1, a.get(0)); + assert.equal(3, a.get(1)); + assert.equal(2, a.get(2)); + assert.equal(4, a.get(3)); + }); + }); + + describe('.x, .y, .z, .w', () => { + it('should retrieve properties as expected', () => { + var a = new Vector([1,2,3,4,5]); + + assert.equal(a.x, 1) + assert.equal(a.y, 2) + assert.equal(a.z, 3) + assert.equal(a.w, 4) + }); + + it('should set proeprties as expected', () => { + var a = new Vector([-1,-1,-1,-1]); + + a.x = 0; + a.y = 1; + a.z = 2; + a.w = 3; + + assert.equal(a.get(0), 0); + assert.equal(a.get(1), 1); + assert.equal(a.get(2), 2); + assert.equal(a.get(3), 3); + + }) + }) + + describe('.min()', () => { + it('should find the minimum number in vectors', () => { + var a = new Vector([1, 2, 3]); + var b = new Vector([3, -1, 1]); + var c = new Vector([2, 5, 1]); + + assert.equal(1, a.min()); + assert.equal(-1, b.min()); + assert.equal(1, c.min()); + }); + }); + + describe('.max()', () => { + it('should find the maximum number in vectors', () => { + var a = new Vector([1, 2, 3]); + var b = new Vector([3, -1, 1]); + var c = new Vector([2, 5, 1]); + + assert.equal(3, a.max()); + assert.equal(3, b.max()); + assert.equal(5, c.max()); + }); + }); + + describe('.set()', () => { + it('should throw error if index out of bounds', () => { + var a = new Vector([1, 2]); + assert.throws(a.set.bind(a, -1, 0), Error); + assert.throws(a.set.bind(a, 2, 0), Error); + }); + + it('should work as expected', () => { + var a = new Vector([1, 2]); + a.set(0, 0); + a.set(1, 1); + assert.equal(0, a.get(0)); + assert.equal(1, a.get(1)); + }); + }); + + describe('.combine()', () => { + it('should return current vector if combined with empty vector', () => { + assert.deepEqual(new Vector([1, 2, 3]), new Vector([1, 2, 3]).combine(new Vector())); + }); + + it('should work as expected', () => { + assert.deepEqual(new Vector([1, 2, 3, 0, 1]), new Vector([1, 2, 3]).combine(new Vector([0, 1]))); + }); + }); + + describe('.push()', () => { + it('should start with Vector(1, 2), push(3) to get Vector(1, 2, 3)', () => { + assert.deepEqual(new Vector([1, 2, 3]), new Vector([1, 2]).push(3)); + }); + }); + + describe('.map()', () => { + it('should work as expected', () => { + var a = new Vector([1, 2, 3]); + var b = a.map(value => value * value); + + assert.deepEqual(new Vector([1, 4, 9]), b); + }); + }); + + describe('.each()', () => { + it('should work as expected', () => { + var a = new Vector([1, 2, 3]); + var b = new Vector(); + a.each((value, index) => { + b.push(value * index); + }); + + assert.deepEqual(new Vector([0, 2, 6]), b); + }); + }); + + describe('.reduce()', () => { + it('should work as expected', () => { + function sum(a: number, b: number) { + return a + b; + } + + var a = new Vector([1, 2, 3]); + var b = new Vector([1, 2, 3, 4, 5, 6]); + + assert.deepEqual(6, a.reduce(sum)); + assert.deepEqual(21, b.reduce(sum)); + }); + }); + + describe('.toString()', () => { + it('should work as expected', () => { + assert.equal('[1, 2, 3]', new Vector([1, 2, 3]).toString()); + }); + }); + + describe('.toArray()', () => { + it('should work as expected', () => { + assert.deepEqual([1, 2, 3], new Vector([1, 2, 3]).toArray()); + }); + }); +}); diff --git a/src/Vector.spec.ts b/src/Vector.spec.ts new file mode 100644 index 00000000..e6314258 --- /dev/null +++ b/src/Vector.spec.ts @@ -0,0 +1,94 @@ +import { Vector } from './'; +import * as assert from 'assert'; + +describe('Vector', () => { + describe('Vector.add(a, b)', () => { + it('should work as the static equivalent of a.add(b)', () => { + var a = new Vector([1, 1, 1]); + var b = new Vector([1, 2, 3]); + + assert.deepEqual(new Vector(a).add(b), Vector.add(a, b)); + }); + }); + + describe('Vector.subtract(a, b)', () => { + it('should work as the static equivalent of a.subtract(b)', () => { + var a = new Vector([2, 3, 4]); + var b = new Vector([1, 2, 3]); + + assert.deepEqual(new Vector(a).subtract(b), Vector.subtract(a, b)); + }); + }); + + describe('Vector.dot(a, b)', () => { + it('should work as the static equivalent of a.dot(b)', () => { + var a = new Vector([2, 3, 4]); + var b = new Vector([1, 2, 3]); + + assert.deepEqual(new Vector(a).dot(b), Vector.dot(a, b)); + }); + }); + + describe('Vector.scale(a, scalar)', () => { + it('should work as the static equivalent of a.scale(scalar)', () => { + var a = new Vector([2, 3, 4]); + + assert.deepEqual(new Vector(a).scale(5), Vector.scale(a, 5)); + }); + }); + + describe('Vector.angle(a, b)', () => { + it('should work as the static equivalent of a.angle(b)', () => { + var a = new Vector([0, 1, 0]); + var b = new Vector([1, 0, 1]); + + assert.deepEqual(new Vector(a).angle(b), Vector.angle(a, b)); + }); + }); + + describe('Vector.equals(a, b)', () => { + it('should work as the static equivalent of a.equals(b)', () => { + var a = new Vector([0, 1, 0]); + var b = new Vector([1, 0, 1]); + + assert.deepEqual(new Vector(a).equals(b), Vector.equals(a, b)); + }); + }); + + describe('Vector.combine(a, b)', () => { + it('should work as the static equivalent of a.combine(b)', () => { + var a = new Vector([0, 1, 0]); + var b = new Vector([1, 0, 1]); + + assert.deepEqual(new Vector(a).combine(b), Vector.combine(a, b)); + }); + }); + + describe('Vector.zeros()', () => { + it('should throw error if argument < 0', () => { + assert.throws(Vector.zeros.bind(new Vector(), -1), Error); + }); + + it('should return empty vector if argument === 0', () => { + assert.deepEqual(new Vector(), Vector.zeros(0)); + }); + + it('should create Vector(0, 0, 0)', () => { + assert.deepEqual(new Vector([0, 0, 0]), Vector.zeros(3)); + }); + }); + + describe('Vector.ones()', () => { + it('should throw error if argument < 0', () => { + assert.throws(Vector.ones.bind(new Vector(), -1), Error); + }); + + it('should return empty vector if argument === 0', () => { + assert.deepEqual(new Vector(), Vector.ones(0)); + }); + + it('should create Vector(1, 1, 1)', () => { + assert.deepEqual(new Vector([1, 1, 1]), Vector.ones(3)); + }); + }); +}); diff --git a/src/Vector.ts b/src/Vector.ts new file mode 100644 index 00000000..852330a8 --- /dev/null +++ b/src/Vector.ts @@ -0,0 +1,627 @@ +import './types'; + +let nblas: any; +try { + nblas = require('nblas'); +} catch (_) {} + +/** + * @class Vector + */ +export default class Vector { + type: TypedArrayConstructor + length: number + data: TypedArray + + /** + * Creates a `Vector` from the supplied arguments. + */ + constructor(data?: any) { + this.type = Float64Array; + this.data = new this.type(0); + this.length = 0; + + if (data instanceof Vector) { + this.combine(data); + } else if (data && data.shape) { + this.data = new data.type(data.data); + this.length = data.shape[0] * data.shape[1]; + this.type = data.type; + } else if (data instanceof Array) { + this.data = new this.type(data); + this.length = data.length; + } else if (data && data.buffer && data.buffer instanceof ArrayBuffer) { + this.data = data; + this.length = data.length; + this.type = data.constructor; + } + } + + /** + * Static method. Perform binary operation on two vectors `a` and `b` together. + */ + static binOp(a: Vector, b: Vector, op: (a: number, b: number, index?: number) => number): Vector { + return new Vector(a).binOp(b, op); + } + + /** + * Perform binary operation on `vector` to the current vector. + */ + binOp(vector: Vector, op: (a: number, b: number, index?: number) => number): Vector { + const l1 = this.length; + const l2 = vector.length; + + if (l1 !== l2) { + throw new Error('sizes do not match!'); + } + + if (!l1 && !l2) { + return this; + } + + let i; + for (i = 0; i < l1; i++) { + this.data[i] = op(this.data[i], vector.data[i], i); + } + + return this; + } + + /** + * Static method. Adds two vectors `a` and `b` together. + */ + static add(a: Vector, b: Vector): Vector { + return new Vector(a).add(b); + } + + /** + * Adds `vector` to the current vector. + */ + add(vector: Vector): Vector { + const l1 = this.length; + const l2 = vector.length; + + if (l1 !== l2) { + throw new Error('sizes do not match!'); + } + + if (nblas && nblas.axpy) { + nblas.axpy(vector.data, this.data); + return this; + } + + return this.binOp(vector, (a, b) => a + b); + } + + /** + * Static method. Subtracts the vector `b` from vector `a`. + */ + static subtract(a: Vector, b: Vector): Vector { + return new Vector(a).subtract(b); + } + + /** + * Subtracts `vector` from the current vector. + */ + subtract(vector: Vector): Vector { + const l1 = this.length; + const l2 = vector.length; + + if (l1 !== l2) { + throw new Error('sizes do not match!'); + } + + if (nblas && nblas.axpy) { + nblas.axpy(vector.data, this.data, -1); + return this; + } + + return this.binOp(vector, (a, b) => a - b); + } + + /** + * Static method. Multiplies all elements of `vector` with a specified `scalar`. + */ + static scale(vector: Vector, scalar: number): Vector { + return new Vector(vector).scale(scalar); + } + + /** + * Multiplies all elements of current vector with a specified `scalar`. + */ + scale(scalar: number): Vector { + if (nblas && nblas.scal) { + nblas.scal(this.data, scalar); + return this; + } + + return this.each((_, i, data) => { + data[i] *= scalar; + }); + } + + /** + * Static method. Normalizes `vector`, i.e. divides all elements with the magnitude. + */ + static normalize(vector: Vector): Vector { + return new Vector(vector).normalize(); + } + + /** + * Normalizes current vector. + */ + normalize(): Vector { + return this.scale(1 / this.magnitude()); + } + + /** + * Static method. Projects the vector `a` onto the vector `b` using + * the projection formula `(b * (a * b / b * b))`. + */ + static project(a: Vector, b: Vector): Vector { + return a.project(new Vector(b)); + } + + /** + * Projects the current vector onto `vector` using + * the projection formula `(b * (a * b / b * b))`. + */ + project(vector: Vector): Vector { + return vector.scale(this.dot(vector) / vector.dot(vector)); + } + + /** + * Static method. Creates a vector containing optional 'value' (default 0) of `count` size, takes + * an optional `type` argument which should be an instance of `TypedArray`. + */ + static fill(count: number, value: number | ((i: number) => number), type?: TypedArrayConstructor): Vector { + if (count < 0) { + throw new Error('invalid size'); + } + + if (count === 0) { + return new Vector(); + } + + if (value == null) { + value = 0.0; + } + + if (type == null) { + type = Float64Array; + } + + const data = new type(count); + + let i; + if (typeof value === 'function') { + for (i = 0; i < count; i++) { + data[i] = value(i); + } + } else { + for (i = 0; i < count; i++) { + data[i] = value; + } + } + + return new Vector(data); + } + + /** + * Static method. Creates a vector containing zeros (`0`) of `count` size, takes + * an optional `type` argument which should be an instance of `TypedArray`. + */ + static zeros(count: number, type?: TypedArrayConstructor): Vector { + return Vector.fill(count, 0.0, type); + } + + /** + * Static method. Creates a vector containing ones (`1`) of `count` size, takes + * an optional `type` argument which should be an instance of `TypedArray`. + */ + static ones(count: number, type?: TypedArrayConstructor): Vector { + return Vector.fill(count, 1, type); + } + + /** + * Static method. Creates a vector of `count` elements containing random + * values according to a uniform distribution bounded by `min` and `max`, + * takes an optional `type` argument which should be an instance of `TypedArray`. + */ + static random(count: number, min: number = 0, max: number = 1, type?: TypedArrayConstructor): Vector { + return Vector.fill(count, function() { + return min + (Math.random() * (max - min)); + }, type); + } + + /** + * Static method. Creates a vector containing a range (can be either ascending or descending) + * of numbers specified by the arguments provided (e.g. `Vector.range(0, .5, 2)` + * gives a vector containing all numbers in the interval `[0, 2)` separated by + * steps of `0.5`), takes an optional `type` argument which should be an instance of + * `TypedArray`. + */ + static range(...args: any[]): Vector { + let type = Float64Array; + let backwards = false; + let start; + let step; + let end; + + if (typeof args[args.length - 1] === 'function') { + type = args.pop(); + } + + switch (args.length) { + case 2: + end = args.pop(); + step = 1; + start = args.pop(); + break; + case 3: + end = args.pop(); + step = args.pop(); + start = args.pop(); + break; + default: + throw new Error('invalid range'); + } + + if (end - start < 0) { + let copy = end; + end = start; + start = copy; + backwards = true; + } + + if (step > end - start) { + throw new Error('invalid range'); + } + + const data = new type(Math.ceil((end - start) / step)); + + let i = start; + let j = 0; + + if (backwards) { + for (; i < end; i += step, j++) { + data[j] = end - i + start; + } + } else { + for (; i < end; i += step, j++) { + data[j] = i; + } + } + + return new Vector(data); + } + + /** + * Static method. Performs dot multiplication with two vectors `a` and `b`. + */ + static dot(a: Vector, b: Vector): number { + return a.dot(b); + } + + /** + * Performs dot multiplication with current vector and `vector` + */ + dot(vector: Vector): number { + const l1 = this.length; + const l2 = vector.length; + + if (l1 !== l2) { + throw new Error('sizes do not match'); + } + + if (nblas && nblas.dot) { + return nblas.dot(this.data, vector.data); + } + + const a = this.data; + const b = vector.data; + + let result = 0; + + let i; + for (i = 0; i < l1; i++) { + result += a[i] * b[i]; + } + + return result; + } + + /** + * Calculates the magnitude of a vector (also called L2 norm or Euclidean length). + */ + magnitude(): number { + const l = this.length; + if (!l) { + return 0; + } + + if (nblas && nblas.nrm2) { + return nblas.nrm2(this.data); + } + + const data = this.data; + + let result = 0; + + let i; + for (i = 0; i < l; i++) { + result += data[i] * data[i]; + } + + return Math.sqrt(result); + } + + /** + * Static method. Determines the angle between two vectors `a` and `b`. + */ + static angle(a: Vector, b: Vector): number { + return a.angle(b); + } + + /** + * Determines the angle between the current vector and `vector`. + */ + angle(vector: Vector): number { + return Math.acos(this.dot(vector) / this.magnitude() / vector.magnitude()); + } + + /** + * Static method. Checks the equality of two vectors `a` and `b`. + */ + static equals(a: Vector, b: Vector): boolean { + return a.equals(b); + } + + /** + * Checks the equality of the current vector and `vector`. + */ + equals(vector: Vector): boolean { + const l1 = this.length; + const l2 = vector.length; + + if (l1 !== l2) { + return false; + } + + let i = 0; + while (i < l1 && this.data[i] === vector.data[i]) { + i++; + } + + return i === l1; + } + + /** + * Gets the minimum value (smallest) element of current vector. + */ + min(): number { + return this.reduce((acc, item) => acc < item ? acc : item, Number.POSITIVE_INFINITY); + } + + /** + * Gets the maximum value (largest) element of current vector. + */ + max(): number { + if (nblas && nblas.iamax) { + return this.data[nblas.iamax(this.data)]; + } + + return this.reduce((acc, item) => acc < item ? item : acc, Number.NEGATIVE_INFINITY); + } + + /** + * Check if `index` is within the bound for current vector. + */ + check(index: number): void { + if (!isFinite(index) || index < 0 || index > this.length - 1) { + throw new Error('index out of bounds'); + } + } + + /** + * Gets the element at `index` from current vector. + */ + get(index: number): number { + this.check(index); + return this.data[index]; + } + + /** + * Sets the element at `index` to `value`. + */ + set(index: number, value: number): Vector { + this.check(index); + this.data[index] = value; + return this; + } + + /** + * Getter for vector[0] + */ + get x(): number { + return this.get(0); + } + + /** + * Setter for vector[0] + */ + set x(value: number) { + this.set(0, value); + } + + /** + * Getter for vector[1] + */ + get y(): number { + return this.get(1); + } + + /** + * Setter for vector[1] + */ + set y(value: number) { + this.set(1, value); + } + + /** + * Getter for vector[2] + */ + get z(): number { + return this.get(2); + } + + /** + * Setter for vector[2] + */ + set z(value: number) { + this.set(2, value); + } + + /** + * Getter for vector[3] + */ + get w(): number { + return this.get(3); + } + + /** + * Setter for vector[3] + */ + set w(value: number) { + this.set(3, value); + } + + /** + * Static method. Combines two vectors `a` and `b` (appends `b` to `a`). + */ + static combine(a: Vector, b: Vector): Vector { + return new Vector(a).combine(b); + } + + /** + * Combines the current vector with `vector` + */ + combine(vector: Vector): Vector { + const l1 = this.length; + const l2 = vector.length; + + if (!l2) { + return this; + } + + if (!l1) { + this.data = new vector.type(vector.data); + this.length = l2; + this.type = vector.type; + return this; + } + + const d1 = this.data; + const d2 = vector.data; + const data = new this.type(l1 + l2); + + data.set(d1); + data.set(d2, l1); + + this.data = data; + this.length = l1 + l2; + + return this; + } + + /** + * Pushes a new `value` into current vector. + */ + push(value: number): Vector { + return this.combine(new Vector([value])); + } + + /** + * Maps a function `callback` to all elements of current vector. + */ + map(callback: (value: number, i: number, src: TypedArray) => number): Vector { + const l = this.length; + const mapped = new Vector(this); + const data = mapped.data; + + let i; + for (i = 0; i < l; i++) { + data[i] = callback.call(mapped, data[i], i, data); + } + + return mapped; + } + + /** + * Functional version of for-looping the vector, is equivalent + * to `Array.prototype.forEach`. + */ + each(callback: (value: number, i: number, src: TypedArray) => void): Vector { + let i; + for (i = 0; i < this.length; i++) { + callback.call(this, this.data[i], i, this.data); + } + + return this; + } + + /** + * Equivalent to `TypedArray.prototype.reduce`. + */ + reduce(callback: (acc: number, value: number, i: number, src: TypedArray) => number, initialValue?: number): number { + const l = this.length; + if (!l && !initialValue) { + throw new Error('Reduce of empty matrix with no initial value.'); + } + + let i = 0; + let value = initialValue != null ? initialValue : this.data[i++]; + + for (; i < l; i++) { + value = callback.call(this, value, this.data[i], i, this.data); + } + + return value; + } + + /** + * Converts current vector into a readable formatted string. + */ + toString(): string { + const l = this.length; + const result = ['[']; + + let i = 0; + if (i < l) { + result.push(String(this.data[i++])); + } + + while (i < l) { + result.push(', ' + this.data[i++]); + } + + result.push(']'); + + return result.join(''); + } + + /** + * Converts current vector into a JavaScript array. + */ + toArray(): number[] { + if (!this.data) { + return []; + } + + return [].slice.call(this.data); + } +} + +try { + (window).Vector = Vector; +} catch (error) {} diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 00000000..34e3133a --- /dev/null +++ b/src/index.ts @@ -0,0 +1,2 @@ +export { default as Vector } from './Vector'; +export { default as Matrix } from './Matrix'; diff --git a/src/types.ts b/src/types.ts new file mode 100644 index 00000000..4bad775a --- /dev/null +++ b/src/types.ts @@ -0,0 +1,21 @@ +type TypedArray = + | Int8Array + | Uint8Array + | Int16Array + | Uint16Array + | Int32Array + | Uint32Array + | Uint8ClampedArray + | Float32Array + | Float64Array; + +type TypedArrayConstructor = + | Int8ArrayConstructor + | Uint8ArrayConstructor + | Int16ArrayConstructor + | Uint16ArrayConstructor + | Int32ArrayConstructor + | Uint32ArrayConstructor + | Uint8ClampedArrayConstructor + | Float32ArrayConstructor + | Float64ArrayConstructor; diff --git a/test/matrix.js b/test/matrix.js deleted file mode 100644 index e7fc7a69..00000000 --- a/test/matrix.js +++ /dev/null @@ -1,630 +0,0 @@ -(function() { - 'use strict'; - - var assert = require('assert'), - Matrix = require('../matrix'), - Vector = require('../vector'); - - describe('Matrix', function() { - describe('Matrix(data, options)', function() { - it('should work equivalent to Matrix.fromTypedArray when data is a typed array', function() { - var a = new Matrix(new Float64Array([1, 2, 3]), { shape: [1, 3] }); - var b = Matrix.fromTypedArray(new Float64Array([1, 2, 3]), [1, 3]); - - assert.deepEqual(a, b); - }); - - it('should work equivalent to Matrix.fromArray when data is a regular 2d array', function() { - var a = new Matrix([[1, 2, 3]]); - var b = Matrix.fromArray([[1, 2, 3]]); - - assert.deepEqual(a, b); - }); - - it('should work equivalent to Matrix.fromMatrix when data is a Matrix', function() { - var a = new Matrix(new Matrix([[1, 2, 3]])); - var b = Matrix.fromMatrix(new Matrix([[1, 2, 3]])); - - assert.deepEqual(a, b); - }); - - it('should work equivalent to Matrix.fromVector when data is a Vector', function() { - var a = new Matrix(new Vector([1, 2, 3])); - var b = Matrix.fromVector(new Vector([1, 2, 3])); - - assert.deepEqual(a, b); - }); - - it('should work equivalent to Matrix.fromShape when data is a shape', function() { - var a = new Matrix(3, 2); - var b = new Matrix({ shape: [3, 2] }); - var c = Matrix.fromShape([3, 2]); - - assert.deepEqual(a, c); - assert.deepEqual(b, c); - }); - }); - - describe('Matrix.fromTypedArray(data, shape)', function() { - it('should work as expected', function() { - var a = new Matrix(new Float64Array([1, 2, 3]), { shape: [1, 3] }); - - assert(a instanceof Matrix); - assert.equal(a.type, Float64Array); - assert.deepEqual(a.shape, [1, 3]); - }); - }); - - describe('Matrix.fromArray(array)', function() { - it('should work as expected', function() { - var a = Matrix.fromArray([[1, 2, 3]]); - - assert(a instanceof Matrix); - assert.equal(a.type, Float64Array); - assert.deepEqual(a.data, [1, 2, 3]); - assert.deepEqual(a.shape, [1, 3]); - }); - }); - - describe('Matrix.fromMatrix(matrix)', function() { - it('should work as expected', function() { - var a = Matrix.fromArray([[1, 2, 3]]); - var b = Matrix.fromMatrix(a); - - assert(b instanceof Matrix); - assert.deepEqual(a, b); - }); - }); - - describe('Matrix.fromVector(vector, shape)', function() { - it('should work as expected', function() { - var v = new Vector([1, 2, 3]); - var a = Matrix.fromVector(v); - - assert(a instanceof Matrix); - assert.equal(a.type, v.type); - assert.deepEqual(a.data, [1, 2, 3]); - assert.deepEqual(a.shape, [3, 1]); - }); - }); - - describe('Matrix.fromShape(shape)', function() { - it('should work as expected', function() { - var a = Matrix.fromShape([3, 2]); - - assert(a instanceof Matrix); - assert.equal(a.type, Float64Array); - assert.deepEqual(a.data, [0, 0, 0, 0, 0, 0]); - assert.deepEqual(a.shape, [3, 2]); - }); - }); - - describe('Matrix.add(a, b)', function() { - it('should work as the static equivalent of a.add(b)', function() { - var a = new Matrix([[1, 1, 1]]); - var b = new Matrix([[1, 2, 3]]); - - assert.deepEqual(new Matrix(a).add(b), Matrix.add(a, b)); - }); - }); - - describe('Matrix.subtract(a, b)', function() { - it('should work as the static equivalent of a.subtract(b)', function() { - var a = new Matrix([[1, 1, 1]]); - var b = new Matrix([[1, 2, 3]]); - - assert.deepEqual(new Matrix(a).subtract(b), Matrix.subtract(a, b)); - }); - }); - - describe('Matrix.scale(a, scalar)', function() { - it('should work as the static equivalent of a.scale(scalar)', function() { - var a = new Matrix([[1, 1, 1]]); - - assert.deepEqual(new Matrix(a).scale(5), Matrix.scale(a, 5)); - }); - }); - - describe('Matrix.product(a, b)', function() { - it('should work as the static equivalent of a.product(b)', function() { - var a = new Matrix([[3, 2, 1]]); - var b = new Matrix([[1, 2, 3]]); - - assert.deepEqual(new Matrix(a).product(b), Matrix.product(a, b)); - }); - }); - - describe('Matrix.multiply(a, b)', function() { - it('should work as the static equivalent of a.multiply(b)', function() { - var a = new Matrix([[1], [2], [3]]); - var b = new Matrix([[1, 1, 1]]); - - assert.deepEqual(new Matrix(a).multiply(b), Matrix.multiply(a, b)); - }); - }); - - describe('Matrix.plu(a)', function() { - it('should work as the static equivalent of a.plu()', function() { - var a = new Matrix([[1, 3, 5], [2, 4, 7], [1, 1, 0]]); - - assert.deepEqual(new Matrix(a).plu(), Matrix.plu(a)); - }); - }); - - describe('Matrix.augment(a, b)', function() { - it('should work as the static equivalent of a.augment(b)', function() { - var a = new Matrix([[1, 1, 1]]); - var b = new Matrix([[1, 2, 3]]); - - assert.deepEqual(new Matrix(a).augment(b), Matrix.augment(a, b)); - }); - }); - - describe('Matrix.equals(a, b)', function() { - it('should work as the static equivalent of a.equals(b)', function() { - var a = new Matrix([[1, 1, 1]]); - var b = new Matrix([[1, 1, 1]]); - - assert.deepEqual(new Matrix(a).equals(b), Matrix.equals(a, b)); - }); - }); - - describe('Matrix.identity()', function() { - it('should throw error if invalid size', function() { - assert.throws(Matrix.identity.bind(new Matrix(), -1), Error); - assert.throws(Matrix.identity.bind(new Matrix(), 0), Error); - }); - - it('should work as expected', function() { - assert.deepEqual(new Matrix([[1, 0, 0], [0, 1, 0], [0, 0, 1]]), Matrix.identity(3)); - }); - }); - - describe('Matrix.magic()', function() { - it('should throw error if invalid size', function() { - assert.throws(Matrix.magic.bind(new Matrix(), -1), Error); - assert.throws(Matrix.identity.bind(new Matrix(), 0), Error); - }); - - it('should work as expected', function() { - assert.deepEqual(new Matrix([[8, 1, 6], [3, 5, 7], [4, 9, 2]]), Matrix.magic(3)); - }); - }); - - describe('Matrix.zeros()', function() { - it('should throw error if invalid size', function() { - assert.throws(Matrix.zeros.bind(new Matrix(), 0, 0), Error); - assert.throws(Matrix.zeros.bind(new Matrix(), -1, 1), Error); - assert.throws(Matrix.zeros.bind(new Matrix(), 1, -1), Error); - }); - - it('should work as expected', function() { - assert.deepEqual(new Matrix([[0, 0, 0]]), Matrix.zeros(1, 3)); - assert.deepEqual(new Matrix([[0], [0], [0]]), Matrix.zeros(3, 1)); - assert.deepEqual(new Matrix([[0, 0], [0, 0]]), Matrix.zeros(2, 2)); - }); - }); - - describe('Matrix.ones()', function() { - it('should throw error if invalid size', function() { - assert.throws(Matrix.ones.bind(new Matrix(), 0, 0), Error); - assert.throws(Matrix.ones.bind(new Matrix(), -1, 1), Error); - assert.throws(Matrix.ones.bind(new Matrix(), 1, -1), Error); - }); - - it('should work as expected', function() { - assert.deepEqual(new Matrix([[1, 1, 1]]), Matrix.ones(1, 3)); - assert.deepEqual(new Matrix([[1], [1], [1]]), Matrix.ones(3, 1)); - assert.deepEqual(new Matrix([[1, 1], [1, 1]]), Matrix.ones(2, 2)); - }); - }); - - describe('Matrix.prototype', function() { - describe('.add()', function() { - it('should throw error when sizes do not match', function() { - var a = new Matrix([[1, 2], [3, 4]]); - var b = new Matrix([[1, 2]]); - - assert.throws(a.add.bind(a, b), Error); - }); - - it('should work as expected', function() { - var a = new Matrix([[1, 2], [3, 4]]); - var b = new Matrix([[5, 6], [7, 8]]); - var c = new Matrix([[6, 8], [10, 12]]); - - assert.deepEqual(c, a.add(b)); - }); - }); - - describe('.subtract()', function() { - it('should throw error when sizes do not match', function() { - var a = new Matrix([[1, 2], [3, 4]]); - var b = new Matrix([[1, 2]]); - - assert.throws(a.subtract.bind(a, b), Error); - }); - - it('should work as expected', function() { - var a = new Matrix([[1, 2], [3, 4]]); - var b = new Matrix([[5, 6], [7, 8]]); - var c = new Matrix([[-4, -4], [-4, -4]]); - - assert.deepEqual(c, a.subtract(b)); - }); - }); - - describe('.scale()', function() { - it('should work as expected', function() { - var a = new Matrix([[1, 2], [3, 4]]); - var b = new Matrix([[2, 4], [6, 8]]); - - assert.deepEqual(b, a.scale(2)); - }); - }); - - describe('.product(b)', function() { - it('should work as the static equivalent of a.product(b)', function() { - var a = new Matrix([[3, 2, 1]]); - var b = new Matrix([[1, 2, 3]]); - var c = new Matrix([[3, 4, 3]]); - - assert.deepEqual(c, a.product(b)); - }); - }); - - describe('.multiply()', function() { - it('should throw error if sizes do not match', function() { - var a = new Matrix([[1, 2], [3, 4]]); - var b = new Matrix([[1, 2]]); - - assert.throws(a.multiply.bind(a, b), Error); - }); - - it('should work as expected', function() { - var a = new Matrix([[1, 2]]); - var b = new Matrix([[1], [2]]); - var c = new Matrix([[5]]); - var d = new Matrix([[1, 2], [2, 4]]); - - var e = new Matrix([[1, 2, 3], [4, 5, 6], [7, 8, 9]]); - var f = new Matrix([[ 30, 36, 42], [ 66, 81, 96], [102, 126, 150]]); - - var g = new Matrix([[0,1,0], [1,0,0], [0,0,1]]); - var h = new Matrix([[1,3,5], [2,4,7], [1,1,0]]); - var i = new Matrix([[2, 4, 7], [1, 3, 5], [1, 1, 0]]); - - assert.deepEqual(c, a.multiply(b)); - assert.deepEqual(d, b.multiply(a)); - assert.deepEqual(f, e.multiply(e)); - assert.deepEqual(i, g.multiply(h)); - }); - }); - - describe('.transpose()', function() { - var a = new Matrix([[1, 2]]); - var b = new Matrix([[1, 2, 3], [4, 5, 6], [7, 8, 9]]); - var c = new Matrix([[1], [2]]); - var d = new Matrix([[1, 4, 7], [2, 5, 8], [3, 6, 9]]); - var e = Matrix.random(20, 20); - - it('should work as expected', function() { - - assert.deepEqual(a, c.T); - assert.deepEqual(c, a.T); - - assert.deepEqual(b, d.T); - assert.deepEqual(d, b.T); - - assert.deepEqual(e, e.T.T); - }); - }); - - describe('.inverse()', function() { - it('should throw error if matrix is not square', function() { - var a = new Matrix([[1, 2]]); - - assert.throws(a.inverse.bind(a), Error); - }); - - it('should throw error if matrix is not invertible', function() { - var a = new Matrix([ - [1, 2, 3], - [4, 5, 6], - [7, 8, 9] - ]); - - assert.throws(a.inverse.bind(a), Error); - }); - - it('should work as expected', function() { - var a = new Matrix([ - [2, -1, 0], - [-1, 2, -1], - [0, -1, 2] - ]); - var b = new Matrix([ - [3/4, 1/2, 1/4], - [1/2, 1, 1/2], - [1/4, 1/2, 3/4] - ]); - - // need to round result to avoid floating point rounding errors, e.g. 0.99999999994 - assert.deepEqual(b, a.inverse().map(function(value) { - return Number(value.toFixed(2)); - })); - }); - }); - - describe('.gauss()', function() { - it('should work as expected', function() { - var a = new Matrix([[1, 2, 3], [3, 4, 5]]); - var b = new Matrix([[1, 0, -1], [0, 1, 2]]); - - assert.deepEqual(b, a.gauss()); - - var c = new Matrix([[1, 2, -1, -4], [2, 3, -1, -11], [-2, 0, -3, 22]]); - var d = new Matrix([[1, 0, 0, -8], [0, 1, 0, 1], [0, 0, 1, -2]]); - - assert.deepEqual(d, c.gauss()); - }); - }); - - describe('.lu()', function() { - it('should work as expected', function() { - var a = new Matrix([[1, 3, 5], [2, 4, 7], [1, 1, 0]]); - var b = [ - new Matrix([[1, 0, 0], [0.5, 1, 0], [0.5, -1, 1]]), - new Matrix([[2, 4, 7], [0, 1, 1.5], [0, 0, -2]]) - ]; - - assert.deepEqual(b, a.lu().splice(0, 2)); - - var c = new Matrix([[11, 9, 24, 2], [1, 5, 2, 6], [3, 17, 18, 1], [2, 5, 7, 1]]); - var d = [ - new Matrix([[1, 0, 0, 0], [0.27273, 1, 0, 0], [0.09091, 0.2875, 1, 0], [0.18182, 0.23125, 0.0036, 1]]), - new Matrix([[11, 9, 24, 2], [0, 14.54545, 11.45455, 0.45455], [0, 0, -3.475, 5.6875], [0, 0, 0, 0.51079]]), - ]; - - assert.deepEqual(d, c.lu().splice(0, 2).map(function(matrix) { - return matrix.map(function(value) { - return Number(value.toFixed(5)); - }); - })); - }); - }); - - describe('.plu()', function() { - it('should work as expected', function() { - var a = new Matrix([[1, 3, 5], [2, 4, 7], [1, 1, 0]]); - var b = new Matrix([[2, 4, 7], [0.5, 1, 1.5], [0.5, -1, -2]]); - var ipiv = new Int32Array([1, 1, 2]); - - var plu = a.plu(); - assert.deepEqual(ipiv, plu.pop()); - assert.deepEqual(b, plu.pop()); - }); - }); - - describe('.lusolve()', function() { - it('should work as expected', function() { - var a = new Matrix([[1, 3, 5], [2, 4, 7], [1, 1, 0]]); - var rhs = new Matrix([[1], [3], [5]]); - var x = new Matrix([[3.25], [1.75], [-1.5]]); - - var plu = a.plu(), - lu = plu[0], - ipiv = plu[1]; - - lu.lusolve(rhs, ipiv); - assert.deepEqual(x, rhs); - }); - }); - - describe('.solve()', function() { - it('should work as expected', function() { - var a = new Matrix([[1, 3, 5], [2, 4, 7], [1, 1, 0]]); - var rhs = new Matrix([[1], [3], [5]]); - var x = new Matrix([[3.25], [1.75], [-1.5]]); - - assert.deepEqual(x, a.solve(rhs)); - }); - }); - - describe('.augment()', function() { - it('should return current matrix when combined with empty matrix', function() { - var a = new Matrix([[1, 2], [3, 4]]); - - assert.deepEqual(a, a.augment(new Matrix())); - }); - - it('should work as expected', function() { - var a = new Matrix([[1, 2], [3, 4]]); - var b = new Matrix([[5, 6], [7, 8]]); - var c = new Matrix([[1, 2, 5, 6], [3, 4, 7, 8]]); - - assert.deepEqual(c, a.augment(b)); - }); - }); - - describe('.diag()', function() { - it('should work as expected', function() { - var a = new Matrix([[1, 2, 3], [4, 5, 6], [7, 8, 9]]); - var b = new Matrix([[1, 2, 3, 4], [5, 6, 7, 8]]); - - assert.deepEqual(new Vector([1, 5, 9]), a.diag()); - assert.deepEqual(new Vector([1, 6]), b.diag()); - }); - }); - - describe('.trace()', function() { - it('should work as expected', function() { - var a = new Matrix([[1, 2, 3], [4, 5, 6], [7, 8, 9]]); - var b = new Matrix([[1, 2], [3, 4]]); - - assert.equal(15, a.trace()); - assert.equal(5, b.trace()); - }); - }); - - describe('.determinant()', function() { - it('should throw error if matrix is not square', function() { - var a = new Matrix([[0, 0]]); - assert.throws(a.determinant.bind(a), Error); - }); - - it('should work as expected', function() { - var a = new Matrix([[1, 2], [3, 4]]); - var b = new Matrix([[1, 5, 6], [3.3, 9, 10], [7, 9, 3.2]]); - var c = new Matrix([[2, -1, 1], [-1, -2, 1], [-1, -1, -1]]); - - assert.equal(-2, Number(a.determinant().toFixed(2))); - assert.equal(36.2, Number(b.determinant().toFixed(2))); - assert.equal(7, Number(c.determinant().toFixed(2))); - }); - }); - - describe('.equals()', function() { - it('should work as expected', function() { - var a = new Matrix([[1, 2], [3, 4]]), - b = new Matrix([[3, 4], [1, 2]]); - - assert.equal(true, a.equals(new Matrix([[1, 2], [3, 4]]))); - assert.equal(true, new Matrix().equals(new Matrix())); - assert.equal(false, a.equals(b)); - }); - }); - - describe('.get()', function() { - it('should throw error if index out of bounds', function() { - var a = new Matrix([[1, 2], [3, 4]]); - - assert.throws(a.get.bind(a, -1, 0), Error); - assert.throws(a.get.bind(a, 0, -1), Error); - assert.throws(a.get.bind(a, 2, 0), Error); - assert.throws(a.get.bind(a, 0, 2), Error); - }); - - it('should work as expected', function() { - var a = new Matrix([[1, 2], [3, 4], [5, 6]]); - - assert.equal(1, a.get(0, 0)); - assert.equal(2, a.get(0, 1)); - assert.equal(3, a.get(1, 0)); - assert.equal(4, a.get(1, 1)); - assert.equal(5, a.get(2, 0)); - }); - }); - - describe('.set()', function() { - it('should throw error if index out of bounds', function() { - var a = new Matrix([[1, 2], [3, 4]]); - - assert.throws(a.set.bind(a, -1, 0), Error); - assert.throws(a.set.bind(a, 0, -1), Error); - assert.throws(a.set.bind(a, 2, 0), Error); - assert.throws(a.set.bind(a, 0, 2), Error); - }); - - it('should work as expected', function() { - var a = new Matrix([[1, 2], [3, 4]]); - a.set(0, 0, 0); - a.set(0, 1, 1); - a.set(1, 0, 0); - a.set(1, 1, 1); - - assert.equal(0, a.get(0, 0)); - assert.equal(1, a.get(0, 1)); - assert.equal(0, a.get(1, 0)); - assert.equal(1, a.get(1, 1)); - }); - }); - - describe('.swap()', function() { - it('should throw error if index out of bounds', function() { - var a = new Matrix([[1, 2], [3, 4]]); - - assert.throws(a.swap.bind(a, -1, 0), Error); - assert.throws(a.swap.bind(a, 0, -1), Error); - assert.throws(a.swap.bind(a, 2, 0), Error); - assert.throws(a.swap.bind(a, 0, 2), Error); - }); - - it('should work as expected', function() { - var a = new Matrix([[1, 2], [3, 4], [5, 6]]); - a.swap(0, 1); - assert.deepEqual(new Matrix([[3, 4], [1, 2], [5, 6]]), a); - - a.swap(0, 2); - assert.deepEqual(new Matrix([[5, 6], [1, 2], [3, 4]]), a); - }); - }); - - describe('.map()', function() { - it('should work as expected', function() { - var a = new Matrix([[1, 2, 3], [4, 5, 6]]); - var b = a.map(function(element) { return element * 2; }); - - assert.deepEqual(new Matrix([[2, 4, 6], [8, 10, 12]]), b); - }); - }); - - describe('.each()', function() { - it('should work as expected', function() { - var a = new Matrix([[1, 2], [3, 4]]); - var b = Matrix.zeros(2, 2); - - a.each(function(value, i, j){ - b.set(i, j, value * j); - }); - - assert.deepEqual(new Matrix([[0, 2], [0, 4]]), b); - }); - }); - - describe('.reduce()', function() { - it('should work as expected', function() { - function sum(a, b) { - return a + b; - } - - var a = new Matrix([[1, 2, 3]]); - var b = new Matrix([[1, 2, 3], [4, 5, 6]]); - - assert.deepEqual(6, a.reduce(sum)); - assert.deepEqual(21, b.reduce(sum)); - }); - }); - - describe('.rank()', function() { - it('should work as expected', function() { - var a = new Matrix([[1, 2, 1], [-2, -3, 1], [3, 5, 0]]); - var b = new Matrix([[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12]]); - var c = new Matrix([[1, 1, 1], [2, 2, 2], [3, 3, 3]]); - var d = new Matrix([[0, 0, 0], [0, 0, 0]]); - - assert.equal(a.rank(), 2); - assert.equal(b.rank(), 2); - assert.equal(c.rank(), 1); - assert.equal(d.rank(), 0); - - assert.equal(a.rank(), Matrix.rank(a)); - }); - }); - - describe('.toString()', function() { - it('should work as expected', function() { - assert.equal('[[1,2], \n[3,4]]', new Matrix([[1, 2], [3, 4]]).toString()); - assert.equal('[[1,2], \n[3,4], \n[5,6]]', new Matrix([[1, 2], [3, 4], [5, 6]]).toString()); - }); - }); - - describe('.toArray()', function() { - it('should work as expected', function() { - assert.deepEqual([[1, 2], [3, 4]], new Matrix([[1, 2], [3, 4]]).toArray()); - assert.deepEqual([[1, 2], [3, 4], [5, 6]], new Matrix([[1, 2], [3, 4], [5, 6]]).toArray()); - }); - }); - }); - }); -})(); diff --git a/test/matrix_optimized.js b/test/matrix_optimized.js deleted file mode 100644 index 83779aac..00000000 --- a/test/matrix_optimized.js +++ /dev/null @@ -1,110 +0,0 @@ -(function() { - 'use strict'; - - var vectorious = require('../vectorious'), - assert = require('assert'), - Matrix = vectorious.Matrix, - Vector = vectorious.Vector; - - describe('Matrix (optimized)', function() { - describe('Matrix.add(a, b)', function() { - it('should work as the static equivalent of a.add(b)', function() { - var a = new Matrix([[1, 1, 1]]); - var b = new Matrix([[1, 2, 3]]); - - assert.deepEqual(new Matrix(a).add(b), Matrix.add(a, b)); - }); - }); - - describe('Matrix.subtract(a, b)', function() { - it('should work as the static equivalent of a.subtract(b)', function() { - var a = new Matrix([[1, 1, 1]]); - var b = new Matrix([[1, 2, 3]]); - - assert.deepEqual(new Matrix(a).subtract(b), Matrix.subtract(a, b)); - }); - }); - - describe('Matrix.multiply(a, b)', function() { - it('should work as the static equivalent of a.multiply(b)', function() { - var a = new Matrix([[1], [2], [3]]); - var b = new Matrix([[1, 1, 1]]); - - assert.deepEqual(new Matrix(a).multiply(b), Matrix.multiply(a, b)); - }); - }); - - describe('Matrix.prototype', function() { - describe('.add()', function() { - it('should throw error when sizes do not match', function() { - var a = new Matrix([[1, 2], [3, 4]]); - var b = new Matrix([[1, 2]]); - - assert.throws(a.add.bind(a, b), Error); - }); - - it('should work as expected', function() { - var a = new Matrix([[1, 2], [3, 4]]); - var b = new Matrix([[5, 6], [7, 8]]); - var c = new Matrix([[6, 8], [10, 12]]); - - assert.deepEqual(c, a.add(b)); - }); - }); - - describe('.subtract()', function() { - it('should throw error when sizes do not match', function() { - var a = new Matrix([[1, 2], [3, 4]]); - var b = new Matrix([[1, 2]]); - - assert.throws(a.subtract.bind(a, b), Error); - }); - - it('should work as expected', function() { - var a = new Matrix([[1, 2], [3, 4]]); - var b = new Matrix([[5, 6], [7, 8]]); - var c = new Matrix([[-4, -4], [-4, -4]]); - - assert.deepEqual(c, a.subtract(b)); - }); - }); - - describe('.scale()', function() { - it('should work as expected', function() { - var a = new Matrix([[1, 2], [3, 4]]); - var b = new Matrix([[2, 4], [6, 8]]); - - assert.deepEqual(b, a.scale(2)); - }); - }); - - describe('.multiply()', function() { - it('should throw error if sizes do not match', function() { - var a = new Matrix([[1, 2], [3, 4]]); - var b = new Matrix([[1, 2]]); - - assert.throws(a.multiply.bind(a, b), Error); - }); - - it('should work as expected', function() { - var a = new Matrix([[1, 2]]); - var b = new Matrix([[1], [2]]); - var c = new Matrix([[5]]); - var d = new Matrix([[1, 2], [2, 4]]); - - var e = new Matrix([[1, 2, 3], [4, 5, 6], [7, 8, 9]]); - var f = new Matrix([[ 30, 36, 42], [ 66, 81, 96], [102, 126, 150]]); - - var g = new Matrix([[0,1,0], [1,0,0], [0,0,1]]); - var h = new Matrix([[1,3,5], [2,4,7], [1,1,0]]); - var i = new Matrix([[2, 4, 7], [1, 3, 5], [1, 1, 0]]); - - assert.deepEqual(c, a.multiply(b)); - assert.deepEqual(d, b.multiply(a)); - assert.deepEqual(f, e.multiply(e)); - assert.deepEqual(i, g.multiply(h)); - }); - }); - }); - }); -})(); diff --git a/test/vector.js b/test/vector.js deleted file mode 100644 index 5939046c..00000000 --- a/test/vector.js +++ /dev/null @@ -1,395 +0,0 @@ -(function() { - 'use strict'; - - var assert = require('assert'), - Vector = require('../vector'); - - describe('Vector', function() { - describe('Vector.add(a, b)', function() { - it('should work as the static equivalent of a.add(b)', function() { - var a = new Vector([1, 1, 1]); - var b = new Vector([1, 2, 3]); - - assert.deepEqual(new Vector(a).add(b), Vector.add(a, b)); - }); - }); - - describe('Vector.subtract(a, b)', function() { - it('should work as the static equivalent of a.subtract(b)', function() { - var a = new Vector([2, 3, 4]); - var b = new Vector([1, 2, 3]); - - assert.deepEqual(new Vector(a).subtract(b), Vector.subtract(a, b)); - }); - }); - - describe('Vector.dot(a, b)', function() { - it('should work as the static equivalent of a.dot(b)', function() { - var a = new Vector([2, 3, 4]); - var b = new Vector([1, 2, 3]); - - assert.deepEqual(new Vector(a).dot(b), Vector.dot(a, b)); - }); - }); - - describe('Vector.scale(a, scalar)', function() { - it('should work as the static equivalent of a.scale(scalar)', function() { - var a = new Vector([2, 3, 4]); - - assert.deepEqual(new Vector(a).scale(5), Vector.scale(a, 5)); - }); - }); - - describe('Vector.angle(a, b)', function() { - it('should work as the static equivalent of a.angle(b)', function() { - var a = new Vector([0, 1, 0]); - var b = new Vector([1, 0, 1]); - - assert.deepEqual(new Vector(a).angle(b), Vector.angle(a, b)); - }); - }); - - describe('Vector.equals(a, b)', function() { - it('should work as the static equivalent of a.equals(b)', function() { - var a = new Vector([0, 1, 0]); - var b = new Vector([1, 0, 1]); - - assert.deepEqual(new Vector(a).equals(b), Vector.equals(a, b)); - }); - }); - - describe('Vector.combine(a, b)', function() { - it('should work as the static equivalent of a.combine(b)', function() { - var a = new Vector([0, 1, 0]); - var b = new Vector([1, 0, 1]); - - assert.deepEqual(new Vector(a).combine(b), Vector.combine(a, b)); - }); - }); - - describe('Vector.zeros()', function() { - it('should throw error if argument < 0', function() { - assert.throws(Vector.zeros.bind(new Vector(), -1), Error); - }); - - it('should return empty vector if argument === 0', function() { - assert.deepEqual(new Vector(), Vector.zeros(0)); - }); - - it('should create Vector(0, 0, 0)', function() { - assert.deepEqual(new Vector([0, 0, 0]), Vector.zeros(3)); - }); - }); - - describe('Vector.ones()', function() { - it('should throw error if argument < 0', function() { - assert.throws(Vector.ones.bind(new Vector(), -1), Error); - }); - - it('should return empty vector if argument === 0', function() { - assert.deepEqual(new Vector(), Vector.ones(0)); - }); - - it('should create Vector(1, 1, 1)', function() { - assert.deepEqual(new Vector([1, 1, 1]), Vector.ones(3)); - }); - }); - - describe('Vector.prototype', function() { - describe('.add()', function() { - it('should return empty vector if adding two empty vectors', function() { - var a = new Vector(); - var b = new Vector(); - - assert.deepEqual(new Vector(), a.add(b)); - }); - - it('should throw error if sizes do not match', function() { - var a = new Vector([1]); - var b = new Vector([1, 2]); - - assert.throws(a.add.bind(a, b), Error); - }); - - it('should produce Vector(5, 7, 9) from Vector(1, 2, 3) and Vector(4, 5, 6)', function() { - var a = new Vector([1, 2, 3]); - var b = new Vector([4, 5, 6]); - var c = new Vector([5, 7, 9]); - - assert.deepEqual(c, a.add(b)); - }); - }); - - describe('.subtract()', function() { - it('should return empty vector if subtracting two empty vectors', function() { - var a = new Vector(); - var b = new Vector(); - - assert.deepEqual(new Vector(), a.subtract(b)); - }); - - it('should throw error if sizes do not match', function() { - var a = new Vector([1]); - var b = new Vector([1, 2]); - - assert.throws(a.subtract.bind(a, b), Error); - }); - - it('should produce Vector(-3, -3, -3) from Vector(1, 2, 3) and Vector(4, 5, 6)', function() { - var a = new Vector([1, 2, 3]); - var b = new Vector([4, 5, 6]); - var c = new Vector([-3, -3, -3]); - - assert.deepEqual(c, a.subtract(b)); - }); - }); - - describe('.scale()', function() { - it('should scale Vector(1, 2, 3) by 2 to Vector(2, 4, 6)', function() { - var a = new Vector([1, 2, 3]); - var b = new Vector([2, 4, 6]); - - assert.deepEqual(b, a.scale(2)); - }); - }); - - describe('.normalize()', function() { - it('should work as expected', function() { - var a = new Vector([1, 1]); - var b = new Vector([1 / Math.sqrt(2), 1 / Math.sqrt(2)]); - - assert.deepEqual(b, a.normalize()); - }); - }); - - describe('.project()', function() { - it('should throw error if sizes do not match', function() { - var a = new Vector([1]); - var b = new Vector([1, 2]); - - assert.throws(a.project.bind(a, b), Error); - }); - - it('should work as expected', function() { - var a = new Vector([2, 1]); - var b = new Vector([-3, 4]); - var c = new Vector([6 / 25, -8 / 25]); - - assert.deepEqual(c, a.project(b)); - }); - }); - - describe('.range()', function() { - it('should throw error if wrong number or arguments supplied', function() { - assert.throws(Vector.range.bind(new Vector(), 1), Error); - assert.throws(Vector.range.bind(new Vector(), 1, 2, 3, 4), Error); - }); - - it('should throw error if step > start - end', function() { - assert.throws(Vector.range.bind(new Vector(), 0, 0), Error); - assert.throws(Vector.range.bind(new Vector(), 1, 3, 2), Error); - }); - - it('should work as expected', function() { - var a = Vector.range(0, 5); - var b = Vector.range(5, 2, 10); - var c = Vector.range(5, 0); - var d = Vector.range(5, 2, 0); - - assert.deepEqual(new Vector([0, 1, 2, 3, 4]), a); - assert.deepEqual(new Vector([5, 7, 9]), b); - assert.deepEqual(new Vector([5, 4, 3, 2, 1]), c); - assert.deepEqual(new Vector([5, 3, 1]), d); - }); - }); - - describe('.dot()', function() { - it('should throw error if sizes do not match', function() { - var a = new Vector([1]); - var b = new Vector([1, 2]); - - assert.throws(a.dot.bind(a, b), Error); - }); - - it('should work as expected', function() { - var a = new Vector([1, 2, 3]); - var b = new Vector([4, 5, 6]); - - assert.equal(32, a.dot(b)); - }); - }); - - describe('.magnitude()', function() { - it('should return 0 if empty vector', function() { - assert.equal(0, new Vector().magnitude()); - }); - - it('should work as expected', function() { - assert.equal(4, new Vector([1, 1, 1, 2, 3]).magnitude()); - }); - }); - - describe('.angle()', function() { - it('should work as expected', function() { - var a = new Vector([1, 0]); - var b = new Vector([0, 1]); - - assert.equal(Math.PI / 2, a.angle(b)); - }); - }); - - describe('.equals()', function() { - it('should work as expected', function() { - assert.equal(true, new Vector([1, 3, 2]).equals(new Vector([1, 3, 2]))); - assert.equal(true, new Vector().equals(new Vector())); - assert.equal(false, new Vector([1, 2, 3]).equals(new Vector([1, 3, 2]))); - }); - }); - - describe('.get()', function() { - it('should throw error if index out of bounds', function() { - var a = new Vector([1, 2, 3]); - assert.throws(a.get.bind(a, -1), Error); - assert.throws(a.get.bind(a, 3), Error); - }); - - it('should work as expected', function() { - var a = new Vector([1, 3, 2, 4]); - assert.equal(1, a.get(0)); - assert.equal(3, a.get(1)); - assert.equal(2, a.get(2)); - assert.equal(4, a.get(3)); - }); - }); - - describe('.x, .y, .z, .w', function() { - it('should retrieve properties as expected', function() { - var a = new Vector([1,2,3,4,5]); - - assert.equal(a.x, 1) - assert.equal(a.y, 2) - assert.equal(a.z, 3) - assert.equal(a.w, 4) - }); - - it('should set proeprties as expected', function() { - var a = new Vector([-1,-1,-1,-1]); - - a.x = 0; - a.y = 1; - a.z = 2; - a.w = 3; - - assert.equal(a.get(0), 0); - assert.equal(a.get(1), 1); - assert.equal(a.get(2), 2); - assert.equal(a.get(3), 3); - - }) - }) - - describe('.min()', function() { - it('should find the minimum number in vectors', function() { - var a = new Vector([1, 2, 3]); - var b = new Vector([3, -1, 1]); - var c = new Vector([2, 5, 1]); - - assert.equal(1, a.min()); - assert.equal(-1, b.min()); - assert.equal(1, c.min()); - }); - }); - - describe('.max()', function() { - it('should find the maximum number in vectors', function() { - var a = new Vector([1, 2, 3]); - var b = new Vector([3, -1, 1]); - var c = new Vector([2, 5, 1]); - - assert.equal(3, a.max()); - assert.equal(3, b.max()); - assert.equal(5, c.max()); - }); - }); - - describe('.set()', function() { - it('should throw error if index out of bounds', function() { - var a = new Vector([1, 2]); - assert.throws(a.set.bind(a, -1, 0), Error); - assert.throws(a.set.bind(a, 2, 0), Error); - }); - - it('should work as expected', function() { - var a = new Vector([1, 2]); - a.set(0, 0); - a.set(1, 1); - assert.equal(0, a.get(0)); - assert.equal(1, a.get(1)); - }); - }); - - describe('.combine()', function() { - it('should return current vector if combined with empty vector', function() { - assert.deepEqual(new Vector([1, 2, 3]), new Vector([1, 2, 3]).combine(new Vector())); - }); - - it('should work as expected', function() { - assert.deepEqual(new Vector([1, 2, 3, 0, 1]), new Vector([1, 2, 3]).combine(new Vector([0, 1]))); - }); - }); - - describe('.push()', function() { - it('should start with Vector(1, 2), push(3) to get Vector(1, 2, 3)', function() { - assert.deepEqual(new Vector([1, 2, 3]), new Vector([1, 2]).push(3)); - }); - }); - - describe('.map()', function() { - it('should work as expected', function() { - var a = new Vector([1, 2, 3]); - var b = a.map(function(value) { return value * value; }); - - assert.deepEqual(new Vector([1, 4, 9]), b); - }); - }); - - describe('.each()', function() { - it('should work as expected', function() { - var a = new Vector([1, 2, 3]); - var b = new Vector(); - a.each(function(value, index) { - b.push(value * index); - }); - - assert.deepEqual(new Vector([0, 2, 6]), b); - }); - }); - - describe('.reduce()', function() { - it('should work as expected', function() { - function sum(a, b) { - return a + b; - } - - var a = new Vector([1, 2, 3]); - var b = new Vector([1, 2, 3, 4, 5, 6]); - - assert.deepEqual(6, a.reduce(sum)); - assert.deepEqual(21, b.reduce(sum)); - }); - }); - - describe('.toString()', function() { - it('should work as expected', function() { - assert.equal('[1, 2, 3]', new Vector([1, 2, 3]).toString()); - }); - }); - - describe('.toArray()', function() { - it('should work as expected', function() { - assert.deepEqual([1, 2, 3], new Vector([1, 2, 3]).toArray()); - }); - }); - }); - }); -})(); diff --git a/test/vector_optimized.js b/test/vector_optimized.js deleted file mode 100644 index 4d367d00..00000000 --- a/test/vector_optimized.js +++ /dev/null @@ -1,142 +0,0 @@ -(function() { - 'use strict'; - - var vectorious = require('../vectorious'), - assert = require('assert'), - Vector = vectorious.Vector; - - describe('Vector (optimized)', function() { - describe('Vector.add(a, b)', function() { - it('should work as the static equivalent of a.add(b)', function() { - var a = new Vector([1, 1, 1]); - var b = new Vector([1, 2, 3]); - - assert.deepEqual(new Vector(a).add(b), Vector.add(a, b)); - }); - }); - - describe('Vector.subtract(a, b)', function() { - it('should work as the static equivalent of a.subtract(b)', function() { - var a = new Vector([2, 3, 4]); - var b = new Vector([1, 2, 3]); - - assert.deepEqual(new Vector(a).subtract(b), Vector.subtract(a, b)); - }); - }); - - describe('Vector.dot(a, b)', function() { - it('should work as the static equivalent of a.dot(b)', function() { - var a = new Vector([2, 3, 4]); - var b = new Vector([1, 2, 3]); - - assert.deepEqual(new Vector(a).dot(b), Vector.dot(a, b)); - }); - }); - - describe('Vector.prototype', function() { - describe('.add()', function() { - it('should return empty vector if adding two empty vectors', function() { - var a = new Vector(); - var b = new Vector(); - - assert.deepEqual(new Vector(), a.add(b)); - }); - - it('should throw error if sizes do not match', function() { - var a = new Vector([1]); - var b = new Vector([1, 2]); - - assert.throws(a.add.bind(a, b), Error); - }); - - it('should produce Vector(5, 7, 9) from Vector(1, 2, 3) and Vector(4, 5, 6)', function() { - var a = new Vector([1, 2, 3]); - var b = new Vector([4, 5, 6]); - var c = new Vector([5, 7, 9]); - - assert.deepEqual(c, a.add(b)); - }); - }); - - describe('.subtract()', function() { - it('should return empty vector if subtracting two empty vectors', function() { - var a = new Vector(); - var b = new Vector(); - - assert.deepEqual(new Vector(), a.subtract(b)); - }); - - it('should throw error if sizes do not match', function() { - var a = new Vector([1]); - var b = new Vector([1, 2]); - - assert.throws(a.subtract.bind(a, b), Error); - }); - - it('should produce Vector(-3, -3, -3) from Vector(1, 2, 3) and Vector(4, 5, 6)', function() { - var a = new Vector([1, 2, 3]); - var b = new Vector([4, 5, 6]); - var c = new Vector([-3, -3, -3]); - - assert.deepEqual(c, a.subtract(b)); - }); - }); - - describe('.scale()', function() { - it('should scale Vector(1, 2, 3) by 2 to Vector(2, 4, 6)', function() { - var a = new Vector([1, 2, 3]); - var b = new Vector([2, 4, 6]); - - assert.deepEqual(b, a.scale(2)); - }); - }); - - describe('.normalize()', function() { - it('should work as expected', function() { - var a = new Vector([1, 1]); - var b = new Vector([1 / Math.sqrt(2), 1 / Math.sqrt(2)]); - - assert.deepEqual(b, a.normalize()); - }); - }); - - describe('.dot()', function() { - it('should throw error if sizes do not match', function() { - var a = new Vector([1]); - var b = new Vector([1, 2]); - - assert.throws(a.dot.bind(a, b), Error); - }); - - it('should work as expected', function() { - var a = new Vector([1, 2, 3]); - var b = new Vector([4, 5, 6]); - - assert.equal(32, a.dot(b)); - }); - }); - - describe('.magnitude()', function() { - it('should return 0 if empty vector', function() { - assert.equal(0, new Vector().magnitude()); - }); - - it('should work as expected', function() { - assert.equal(4, new Vector([1, 1, 1, 2, 3]).magnitude()); - }); - }); - - describe('.max()', function() { - it('should find the maximum number in vectors', function() { - var a = new Vector([1, 2, 3]); - var b = new Vector([3, -1, 1]); - var c = new Vector([2, 5, 1]); - - assert.equal(3, a.max()); - assert.equal(3, b.max()); - assert.equal(5, c.max()); - }); - }); - }); - }); -})(); diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 00000000..441d8bea --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "outDir": "./built", + "target": "es5", + "strict": true, + "declaration": true, + "removeComments": true, + "forceConsistentCasingInFileNames": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "lib": [ + "es2015", + "dom" + ] + }, + "include": [ + "src/**/*" + ], + "exclude": [ + "src/**/*.spec.ts" + ] +} diff --git a/vector.js b/vector.js deleted file mode 100644 index f7b72ea1..00000000 --- a/vector.js +++ /dev/null @@ -1,683 +0,0 @@ -/** - * @class Vector - **/ -class Vector { - /** - * @method constructor - * @memberof Vector - * @desc Creates a two-dimensional `Vector` from the supplied arguments. - **/ - constructor(data) { - this.type = Float64Array; - this.length = 0; - - if (data instanceof Vector) { - this.combine(data); - } else if (data && data.shape) { - this.data = new data.type(data.data); - this.length = data.shape[0] * data.shape[1]; - this.type = data.type; - } else if (data instanceof Array) { - this.data = new this.type(data); - this.length = data.length; - } else if (data && data.buffer && data.buffer instanceof ArrayBuffer) { - this.data = data; - this.length = data.length; - this.type = data.constructor; - } - } - - /** - * Static method. Perform binary operation on two vectors `a` and `b` together. - * @memberof Vector - * @param {Vector} a - * @param {Vector} b - * @param {Function} op - * @returns {Vector} a vector containing the results of binaery operation of `a` and `b` - **/ - static binOp(a, b, op) { - return new Vector(a).binOp(b, op); - } - - /** - * Perform binary operation on `vector` to the current vector. - * @memberof Vector - * @param {Vector} vector - * @param {Function} op - * @returns {Vector} this - **/ - binOp(vector, op) { - var l1 = this.length, - l2 = vector.length; - if (l1 !== l2) - throw new Error('sizes do not match!'); - if (!l1 && !l2) - return this; - - var i; - for (i = 0; i < l1; i++) - this.data[i] = op(this.data[i], vector.data[i], i); - - return this; - } - - /** - * Static method. Adds two vectors `a` and `b` together. - * @memberof Vector - * @param {Vector} a - * @param {Vector} b - * @returns {Vector} a vector containing the sum of `a` and `b` - **/ - static add(a, b) { - return new Vector(a).add(b); - } - - /** - * Adds `vector` to the current vector. - * @memberof Vector - * @param {Vector} vector - * @returns {Vector} this - **/ - add(vector) { - return this.binOp(vector, function(a, b) { return a + b }); - } - - /** - * Static method. Subtracts the vector `b` from vector `a`. - * @memberof Vector - * @param {Vector} a - * @param {Vector} b - * @returns {Vector} a vector containing the difference between `a` and `b` - **/ - static subtract(a, b) { - return new Vector(a).subtract(b); - } - - /** - * Subtracts `vector` from the current vector. - * @memberof Vector - * @param {Vector} vector - * @returns {Vector} this - **/ - subtract(vector) { - return this.binOp(vector, function(a, b) { return a - b }); - } - - /** - * Static method. Multiplies all elements of `vector` with a specified `scalar`. - * @memberof Vector - * @param {Vector} vector - * @param {Number} scalar - * @returns {Vector} a resultant scaled vector - **/ - static scale(vector, scalar) { - return new Vector(vector).scale(scalar); - } - - /** - * Multiplies all elements of current vector with a specified `scalar`. - * @memberof Vector - * @param {Number} scalar - * @returns {Vector} this - **/ - scale(scalar) { - return this.each(function(_, i, data) { - data[i] *= scalar; - }); - } - - /** - * Static method. Normalizes `vector`, i.e. divides all elements with the magnitude. - * @memberof Vector - * @param {Vector} vector - * @returns {Vector} a resultant normalized vector - **/ - static normalize(vector) { - return new Vector(vector).normalize(); - } - - /** - * Normalizes current vector. - * @memberof Vector - * @returns {Vector} a resultant normalized vector - **/ - normalize() { - return this.scale(1 / this.magnitude()); - } - - /** - * Static method. Projects the vector `a` onto the vector `b` using - * the projection formula `(b * (a * b / b * b))`. - * @memberof Vector - * @param {Vector} a - * @param {Vector} b - * @returns {Vector} a new resultant projected vector - **/ - static project(a, b) { - return a.project(new Vector(b)); - } - - /** - * Projects the current vector onto `vector` using - * the projection formula `(b * (a * b / b * b))`. - * @memberof Vector - * @param {Vector} vector - * @returns {Vector} `vector` - **/ - project(vector) { - return vector.scale(this.dot(vector) / vector.dot(vector)); - } - - /** - * Static method. Creates a vector containing optional 'value' (default 0) of `count` size, takes - * an optional `type` argument which should be an instance of `TypedArray`. - * @memberof Vector - * @param {Number} count - * @param {Number|Function} value - * @param {TypedArray} type - * @returns {Vector} a new vector of the specified size and `type` - **/ - static fill(count, value, type) { - if (count < 0) - throw new Error('invalid size'); - if (count === 0) - return new Vector(); - - if (value == null) { - value = 0.0; - } - if (type == null) { - type = Float64Array; - } - var data = new type(count), - i; - - if (typeof value === 'function') - for (i = 0; i < count; i++) - data[i] = value(i); - else - for (i = 0; i < count; i++) - data[i] = value; - - return new Vector(data); - } - - /** - * Static method. Creates a vector containing zeros (`0`) of `count` size, takes - * an optional `type` argument which should be an instance of `TypedArray`. - * @memberof Vector - * @param {Number} count - * @param {TypedArray} type - * @returns {Vector} a new vector of the specified size and `type` - **/ - static zeros(count, type) { - return Vector.fill(count, 0.0, type); - } - - /** - * Static method. Creates a vector containing ones (`1`) of `count` size, takes - * an optional `type` argument which should be an instance of `TypedArray`. - * @memberof Vector - * @param {Number} count - * @param {TypedArray} type - * @returns {Vector} a new vector of the specified size and `type` - **/ - static ones(count, type) { - return Vector.fill(count, 1, type); - } - - /** - * Static method. Creates a vector of `count` elements containing random - * values according to a normal distribution, takes an optional `type` - * argument which should be an instance of `TypedArray`. - * @memberof Vector - * @param {Number} count - * @param {Number} deviation (default 1) - * @param {Number} mean (default 0) - * @param {TypedArray} type - * @returns {Vector} a new vector of the specified size and `type` - **/ - static random(count, deviation, mean, type) { - if (deviation == null) { - deviation = 1; - } - if (mean == null) { - mean = 0; - } - return Vector.fill(count, function() { - return deviation * Math.random() + mean; - }, type); - } - - /** - * Static method. Creates a vector containing a range (can be either ascending or descending) - * of numbers specified by the arguments provided (e.g. `Vector.range(0, .5, 2)` - * gives a vector containing all numbers in the interval `[0, 2)` separated by - * steps of `0.5`), takes an optional `type` argument which should be an instance of - * `TypedArray`. - * @memberof Vector - * @param {Number} start - * @param {Number} step - optional - * @param {Number} end - * @returns {Vector} a new vector containing the specified range of the specified `type` - **/ - static range() { - var args = [].slice.call(arguments), - backwards = false, - start, step, end; - - var type = Float64Array; - if (typeof args[args.length - 1] === 'function') - type = args.pop(); - - switch (args.length) { - case 2: - end = args.pop(); - step = 1; - start = args.pop(); - break; - case 3: - end = args.pop(); - step = args.pop(); - start = args.pop(); - break; - default: - throw new Error('invalid range'); - } - - if (end - start < 0) { - var copy = end; - end = start; - start = copy; - backwards = true; - } - - if (step > end - start) - throw new Error('invalid range'); - - var data = new type(Math.ceil((end - start) / step)), - i = start, - j = 0; - if (backwards) - for (; i < end; i += step, j++) - data[j] = end - i + start; - else - for (; i < end; i += step, j++) - data[j] = i; - - return new Vector(data); - } - - /** - * Static method. Performs dot multiplication with two vectors `a` and `b`. - * @memberof Vector - * @param {Vector} a - * @param {Vector} b - * @returns {Number} the dot product of the two vectors - **/ - static dot(a, b) { - return a.dot(b); - } - - /** - * Performs dot multiplication with current vector and `vector` - * @memberof Vector - * @param {Vector} vector - * @returns {Number} the dot product of the two vectors - **/ - dot(vector) { - if (this.length !== vector.length) - throw new Error('sizes do not match'); - - var a = this.data, - b = vector.data, - result = 0, - i, l; - - for (i = 0, l = this.length; i < l; i++) - result += a[i] * b[i]; - - return result; - } - - /** - * Calculates the magnitude of a vector (also called L2 norm or Euclidean length). - * @memberof Vector - * @returns {Number} the magnitude (L2 norm) of the vector - **/ - magnitude() { - if (!this.length) - return 0; - - var result = 0, - data = this.data, - i, l; - for (i = 0, l = this.length; i < l; i++) - result += data[i] * data[i]; - - return Math.sqrt(result); - } - - /** - * Static method. Determines the angle between two vectors `a` and `b`. - * @memberof Vector - * @param {Vector} a - * @param {Vector} b - * @returns {Number} the angle between the two vectors in radians - **/ - static angle(a, b) { - return a.angle(b); - } - - /** - * Determines the angle between the current vector and `vector`. - * @memberof Vector - * @param {Vector} vector - * @returns {Number} the angle between the two vectors in radians - **/ - angle(vector) { - return Math.acos(this.dot(vector) / this.magnitude() / vector.magnitude()); - } - - /** - * Static method. Checks the equality of two vectors `a` and `b`. - * @memberof Vector - * @param {Vector} a - * @param {Vector} b - * @returns {Boolean} `true` if the two vectors are equal, `false` otherwise - **/ - static equals(a, b) { - return a.equals(b); - } - - /** - * Checks the equality of the current vector and `vector`. - * @memberof Vector - * @param {Vector} vector - * @returns {Boolean} `true` if the two vectors are equal, `false` otherwise - **/ - equals(vector) { - if (this.length !== vector.length) - return false; - - var i = 0; - while (i < this.length && this.data[i] === vector.data[i]) - i++; - return i === this.length; - } - - /** - * Gets the minimum value (smallest) element of current vector. - * @memberof Vector - * @returns {Number} the smallest element of the current vector - **/ - min() { - return this.reduce(function(acc, item) { - return acc < item ? acc : item; - }, Number.POSITIVE_INFINITY); - } - - /** - * Gets the maximum value (largest) element of current vector. - * @memberof Vector - * @returns {Number} the largest element of current vector - **/ - max() { - return this.reduce(function(acc, item) { - return acc < item ? item : acc; - }, Number.NEGATIVE_INFINITY); - } - - /** - * Check if `index` is within the bound for current vector. - * @memberof Vector - * @param {Number} index - **/ - check(index) { - if (!Number.isFinite(index) || index < 0 || index > this.length - 1) - throw new Error('index out of bounds'); - } - - /** - * Gets the element at `index` from current vector. - * @memberof Vector - * @param {Number} index - * @returns {Number} the element at `index` - **/ - get(index) { - this.check(index); - return this.data[index]; - } - - /** - * Sets the element at `index` to `value`. - * @memberof Vector - * @param {Number} index - * @param {Number} value - * @returns {Vector} this - **/ - set(index, value) { - this.check(index); - this.data[index] = value; - return this; - } - - /** - * Getter for vector[0] - * @memberof Vector - * @property {Number} - * @name Vector#x - */ - get x() { - return this.get(0); - } - - /** - * Setter for vector[0] - * @memberof Vector - * @property {Number} - * @name Vector#x - */ - set x(value) { - return this.set(0, value); - } - - /** - * Getter for vector[1] - * @memberof Vector - * @property {Number} - * @name Vector#y - */ - get y() { - return this.get(1); - } - - /** - * Setter for vector[1] - * @memberof Vector - * @property {Number} - * @name Vector#y - */ - set y(value) { - return this.set(1, value); - } - - /** - * Getter for vector[2] - * @memberof Vector - * @property {Number} - * @name Vector#z - */ - get z() { - return this.get(2); - } - - /** - * Setter for vector[2] - * @memberof Vector - * @property {Number} - * @name Vector#z - */ - set z(value) { - return this.set(2, value); - } - - /** - * Getter for vector[3] - * @memberof Vector - * @property {Number} - * @name Vector#w - */ - get w() { - return this.get(3); - } - - /** - * Setter for vector[3] - * @memberof Vector - * @property {Number} - * @name Vector#w - */ - set w(value) { - return this.set(3, value); - } - - /** - * Static method. Combines two vectors `a` and `b` (appends `b` to `a`). - * @memberof Vector - * @param {Vector} a - * @param {Vector} b - * @returns {Vector} `b` appended to vector `a` - **/ - static combine(a, b) { - return new Vector(a).combine(b); - } - - /** - * Combines the current vector with `vector` - * @memberof Vector - * @param {Vector} vector - * @returns {Vector} `vector` combined with current vector - **/ - combine(vector) { - if (!vector.length) - return this; - if (!this.length) { - this.data = new vector.type(vector.data); - this.length = vector.length; - this.type = vector.type; - return this; - } - - var l1 = this.length, - l2 = vector.length, - d1 = this.data, - d2 = vector.data; - - var data = new this.type(l1 + l2); - data.set(d1); - data.set(d2, l1); - - this.data = data; - this.length = l1 + l2; - - return this; - } - - /** - * Pushes a new `value` into current vector. - * @memberof Vector - * @param {Number} value - * @returns {Vector} `this` - **/ - push(value) { - return this.combine(new Vector([value])); - } - - /** - * Maps a function `callback` to all elements of current vector. - * @memberof Vector - * @param {Function} callback - * @returns {Vector} `this` - **/ - map(callback) { - var mapped = new Vector(this), - data = mapped.data, - i; - for (i = 0; i < this.length; i++) - data[i] = callback.call(mapped, data[i], i, data); - - return mapped; - } - - /** - * Functional version of for-looping the vector, is equivalent - * to `Array.prototype.forEach`. - * @memberof Vector - * @param {Function} callback - * @returns {Vector} `this` - **/ - each(callback) { - var i; - for (i = 0; i < this.length; i++) - callback.call(this, this.data[i], i, this.data); - - return this; - } - - /** - * Equivalent to `TypedArray.prototype.reduce`. - * @memberof Vector - * @param {Function} callback - * @param {Number} initialValue - * @returns {Number} result of reduction - **/ - reduce(callback, initialValue) { - var l = this.length; - if (l === 0 && !initialValue) - throw new Error('Reduce of empty matrix with no initial value.'); - - var i = 0, - value = initialValue != null ? initialValue : this.data[i++]; - - for (; i < l; i++) - value = callback.call(this, value, this.data[i], i, this.data); - return value; - } - - /** - * Converts current vector into a readable formatted string. - * @memberof Vector - * @returns {String} a string of the vector's contents - **/ - toString() { - var result = ['['], - i = 0; - - if (i < this.length) - result.push(this.data[i++]); - while (i < this.length) - result.push(', ' + this.data[i++]); - - result.push(']'); - - return result.join(''); - } - - /** - * Converts current vector into a JavaScript array. - * @memberof Vector - * @returns {Array} an array containing all elements of current vector - **/ - toArray() { - if (!this.data) - return []; - - return [].slice.call(this.data); - } -} - -module.exports = Vector; -try { - window.Vector = Vector; -} catch (e) {} diff --git a/vectorious.js b/vectorious.js deleted file mode 100644 index b9d2c543..00000000 --- a/vectorious.js +++ /dev/null @@ -1,15 +0,0 @@ -(function () { - 'use strict'; - - var Vector = module.exports.Vector = require('./vector'), - Matrix = module.exports.Matrix = require('./matrix'); - - try { - var nblas = module.exports.BLAS = require('nblas'), - applyBlasOptimizations = require('./applyBlasOptimizations'); - - applyBlasOptimizations(Vector, Matrix, nblas); - } catch (error) { - - } -}()); diff --git a/withblas.js b/withblas.js deleted file mode 100644 index aab2f612..00000000 --- a/withblas.js +++ /dev/null @@ -1,11 +0,0 @@ -(function () { - 'use strict'; - - var Vector = module.exports.Vector = require('./vector'), - Matrix = module.exports.Matrix = require('./matrix'), - nblas = module.exports.BLAS = require('nblas'), - - applyBlasOptimizations = require('./applyBlasOptimizations'); - - applyBlasOptimizations(Vector, Matrix, nblas); -}()); diff --git a/withoutblas.js b/withoutblas.js deleted file mode 100644 index cfa7483c..00000000 --- a/withoutblas.js +++ /dev/null @@ -1,6 +0,0 @@ -(function () { - 'use strict'; - - var Vector = module.exports.Vector = require('./vector'), - Matrix = module.exports.Matrix = require('./matrix'); -}());