From d2b8d552db96943054bed8123eb4e1d1b0a893e9 Mon Sep 17 00:00:00 2001 From: Brandon Semilla Date: Mon, 12 Mar 2018 20:07:49 -0700 Subject: [PATCH 01/13] simplify interface --- simplex-noise.js | 218 ++++++++++++++++++----------------------------- 1 file changed, 83 insertions(+), 135 deletions(-) diff --git a/simplex-noise.js b/simplex-noise.js index 0aaa142..85c5e69 100644 --- a/simplex-noise.js +++ b/simplex-noise.js @@ -29,6 +29,56 @@ Better rank ordering method by Stefan Gustavson in 2012. (function() { 'use strict'; + var grad3 = new Float32Array([ + 1, 1, 0, + -1, 1, 0, + 1, -1, 0, + -1, -1, 0, + 1, 0, 1, + -1, 0, 1, + 1, 0, -1, + -1, 0, -1, + 0, 1, 1, + 0, -1, 1, + 0, 1, -1, + 0, -1, -1 + ]); + + var grad4 = new Float32Array([ + 0, 1, 1, 1, + 0, 1, 1, -1, + 0, 1, -1, 1, + 0, 1, -1, -1, + 0, -1, 1, 1, + 0, -1, 1, -1, + 0, -1, -1, 1, + 0, -1, -1, -1, + 1, 0, 1, 1, + 1, 0, 1, -1, + 1, 0, -1, 1, + 1, 0, -1, -1, + -1, 0, 1, 1, + -1, 0, 1, -1, + -1, 0, -1, 1, + -1, 0, -1, -1, + 1, 1, 0, 1, + 1, 1, 0, -1, + 1, -1, 0, 1, + 1, -1, 0, -1, + -1, 1, 0, 1, + -1, 1, 0, -1, + -1, -1, 0, 1, + -1, -1, 0, -1, + 1, 1, 1, 0, + 1, 1, -1, 0, + 1, -1, 1, 0, + 1, -1, -1, 0, + -1, 1, 1, 0, + -1, 1, -1, 0, + -1, -1, 1, 0, + -1, -1, -1, 0 + ]); + var F2 = 0.5 * (Math.sqrt(3.0) - 1.0); var G2 = (3.0 - Math.sqrt(3.0)) / 6.0; var F3 = 1.0 / 3.0; @@ -36,65 +86,41 @@ Better rank ordering method by Stefan Gustavson in 2012. var F4 = (Math.sqrt(5.0) - 1.0) / 4.0; var G4 = (5.0 - Math.sqrt(5.0)) / 20.0; - function SimplexNoise(randomOrSeed) { - var random; - if (typeof randomOrSeed == 'function') { - random = randomOrSeed; - } - else if (randomOrSeed) { - random = alea(randomOrSeed); - } else { - random = Math.random; - } - this.p = buildPermutationTable(random); - this.perm = new Uint8Array(512); - this.permMod12 = new Uint8Array(512); + function simplex(random) { + var p = buildPermutationTable(random); + var perm = new Uint8Array(512); + var permMod12 = new Uint8Array(512); for (var i = 0; i < 512; i++) { - this.perm[i] = this.p[i & 255]; - this.permMod12[i] = this.perm[i] % 12; + perm[i] = p[i & 255]; + permMod12[i] = perm[i] % 12; } - } - SimplexNoise.prototype = { - grad3: new Float32Array([1, 1, 0, - -1, 1, 0, - 1, -1, 0, - - -1, -1, 0, - 1, 0, 1, - -1, 0, 1, + return function noise(x, y, z, w) { + switch (arguments.length) { + case 1: return noise1D(x); + case 2: return noise2D(x, y); + case 3: return noise3D(x, y, z); + case 4: return noise4D(x, y, z, w); + } + } - 1, 0, -1, - -1, 0, -1, - 0, 1, 1, + function noise1D(x) { + return noise2D(x, 0) + } - 0, -1, 1, - 0, 1, -1, - 0, -1, -1]), - grad4: new Float32Array([0, 1, 1, 1, 0, 1, 1, -1, 0, 1, -1, 1, 0, 1, -1, -1, - 0, -1, 1, 1, 0, -1, 1, -1, 0, -1, -1, 1, 0, -1, -1, -1, - 1, 0, 1, 1, 1, 0, 1, -1, 1, 0, -1, 1, 1, 0, -1, -1, - -1, 0, 1, 1, -1, 0, 1, -1, -1, 0, -1, 1, -1, 0, -1, -1, - 1, 1, 0, 1, 1, 1, 0, -1, 1, -1, 0, 1, 1, -1, 0, -1, - -1, 1, 0, 1, -1, 1, 0, -1, -1, -1, 0, 1, -1, -1, 0, -1, - 1, 1, 1, 0, 1, 1, -1, 0, 1, -1, 1, 0, 1, -1, -1, 0, - -1, 1, 1, 0, -1, 1, -1, 0, -1, -1, 1, 0, -1, -1, -1, 0]), - noise2D: function(xin, yin) { - var permMod12 = this.permMod12; - var perm = this.perm; - var grad3 = this.grad3; + function noise2D(x, y) { var n0 = 0; // Noise contributions from the three corners var n1 = 0; var n2 = 0; // Skew the input space to determine which simplex cell we're in - var s = (xin + yin) * F2; // Hairy factor for 2D - var i = Math.floor(xin + s); - var j = Math.floor(yin + s); + var s = (x + y) * F2; // Hairy factor for 2D + var i = Math.floor(x + s); + var j = Math.floor(y + s); var t = (i + j) * G2; var X0 = i - t; // Unskew the cell origin back to (x,y) space var Y0 = j - t; - var x0 = xin - X0; // The x,y distances from the cell origin - var y0 = yin - Y0; + var x0 = x - X0; // The x,y distances from the cell origin + var y0 = y - Y0; // For the 2D case, the simplex shape is an equilateral triangle. // Determine which simplex we are in. var i1, j1; // Offsets for second (middle) corner of simplex in (i,j) coords @@ -138,24 +164,21 @@ Better rank ordering method by Stefan Gustavson in 2012. // Add contributions from each corner to get the final noise value. // The result is scaled to return values in the interval [-1,1]. return 70.0 * (n0 + n1 + n2); - }, - // 3D simplex noise - noise3D: function(xin, yin, zin) { - var permMod12 = this.permMod12; - var perm = this.perm; - var grad3 = this.grad3; + } + + function noise3D(x, y, z) { var n0, n1, n2, n3; // Noise contributions from the four corners // Skew the input space to determine which simplex cell we're in - var s = (xin + yin + zin) * F3; // Very nice and simple skew factor for 3D - var i = Math.floor(xin + s); - var j = Math.floor(yin + s); + var s = (x + y + zin) * F3; // Very nice and simple skew factor for 3D + var i = Math.floor(x + s); + var j = Math.floor(y + s); var k = Math.floor(zin + s); var t = (i + j + k) * G3; var X0 = i - t; // Unskew the cell origin back to (x,y,z) space var Y0 = j - t; var Z0 = k - t; - var x0 = xin - X0; // The x,y,z distances from the cell origin - var y0 = yin - Y0; + var x0 = x - X0; // The x,y,z distances from the cell origin + var y0 = y - Y0; var z0 = zin - Z0; // For the 3D case, the simplex shape is a slightly irregular tetrahedron. // Determine which simplex we are in. @@ -262,12 +285,9 @@ Better rank ordering method by Stefan Gustavson in 2012. // Add contributions from each corner to get the final noise value. // The result is scaled to stay just inside [-1,1] return 32.0 * (n0 + n1 + n2 + n3); - }, - // 4D simplex noise, better simplex rank ordering method 2012-03-09 - noise4D: function(x, y, z, w) { - var perm = this.perm; - var grad4 = this.grad4; + } + function noise4D(x, y, z, w) { var n0, n1, n2, n3, n4; // Noise contributions from the five corners // Skew the (x,y,z,w) space to determine which cell of 24 simplices we're in var s = (x + y + z + w) * F4; // Factor for 4D skewing @@ -388,78 +408,6 @@ Better rank ordering method by Stefan Gustavson in 2012. // Sum up and scale the result to cover the range [-1,1] return 27.0 * (n0 + n1 + n2 + n3 + n4); } - }; - - function buildPermutationTable(random) { - var i; - var p = new Uint8Array(256); - for (i = 0; i < 256; i++) { - p[i] = i; - } - for (i = 0; i < 255; i++) { - var r = i + ~~(random() * (256 - i)); - var aux = p[i]; - p[i] = p[r]; - p[r] = aux; - } - return p; - } - SimplexNoise._buildPermutationTable = buildPermutationTable; - - /* - The ALEA PRNG and masher code used by simplex-noise.js - is based on code by Johannes Baagøe, modified by Jonas Wagner. - See alea.md for the full license. - */ - function alea() { - var s0 = 0; - var s1 = 0; - var s2 = 0; - var c = 1; - - var mash = masher(); - s0 = mash(' '); - s1 = mash(' '); - s2 = mash(' '); - - for (var i = 0; i < arguments.length; i++) { - s0 -= mash(arguments[i]); - if (s0 < 0) { - s0 += 1; - } - s1 -= mash(arguments[i]); - if (s1 < 0) { - s1 += 1; - } - s2 -= mash(arguments[i]); - if (s2 < 0) { - s2 += 1; - } - } - mash = null; - return function() { - var t = 2091639 * s0 + c * 2.3283064365386963e-10; // 2^-32 - s0 = s1; - s1 = s2; - return s2 = t - (c = t | 0); - }; - } - function masher() { - var n = 0xefc8249d; - return function(data) { - data = data.toString(); - for (var i = 0; i < data.length; i++) { - n += data.charCodeAt(i); - var h = 0.02519603282416938 * n; - n = h >>> 0; - h -= n; - h *= n; - n = h >>> 0; - h -= n; - n += h * 0x100000000; // 2^32 - } - return (n >>> 0) * 2.3283064365386963e-10; // 2^-32 - }; } // amd From 9d8d203d8351c69d562dc14ca4e6007224a5102b Mon Sep 17 00:00:00 2001 From: Brandon Semilla Date: Mon, 12 Mar 2018 20:48:30 -0700 Subject: [PATCH 02/13] evaluate tests --- shrinkwrap.yaml | 1378 ++++++++++++++++++++++++++++++++++++ simplex-noise.js | 130 ++-- test/simplex-noise-test.js | 120 +--- 3 files changed, 1486 insertions(+), 142 deletions(-) create mode 100644 shrinkwrap.yaml diff --git a/shrinkwrap.yaml b/shrinkwrap.yaml new file mode 100644 index 0000000..c38e581 --- /dev/null +++ b/shrinkwrap.yaml @@ -0,0 +1,1378 @@ +devDependencies: + alea: 0.0.9 + benchmark: 2.1.4 + chai: 4.1.2 + eslint: 4.18.2 + eslint-config-standard: 11.0.0 + eslint-plugin-import: 2.9.0 + eslint-plugin-node: 6.0.1 + eslint-plugin-promise: 3.7.0 + eslint-plugin-standard: 3.0.1 + mocha: 5.0.4 +packages: + /acorn-jsx/3.0.1: + dependencies: + acorn: 3.3.0 + dev: true + resolution: + integrity: sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s= + /acorn/3.3.0: + dev: true + engines: + node: '>=0.4.0' + resolution: + integrity: sha1-ReN/s56No/JbruP/U2niu18iAXo= + /acorn/5.5.3: + dev: true + engines: + node: '>=0.4.0' + resolution: + integrity: sha512-jd5MkIUlbbmb07nXH0DT3y7rDVtkzDi4XZOUVWAer8ajmF/DTSSbl5oNFyDOl/OXA33Bl79+ypHhl2pN20VeOQ== + /ajv-keywords/2.1.1/ajv@5.5.2: + dependencies: + ajv: 5.5.2 + dev: true + id: registry.npmjs.org/ajv-keywords/2.1.1 + peerDependencies: + ajv: ^5.0.0 + resolution: + integrity: sha1-YXmX/F9gV2iUxDX5QNgZ4TW4B2I= + /ajv/5.5.2: + dependencies: + co: 4.6.0 + fast-deep-equal: 1.1.0 + fast-json-stable-stringify: 2.0.0 + json-schema-traverse: 0.3.1 + dev: true + resolution: + integrity: sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU= + /alea/0.0.9: + dev: true + resolution: + integrity: sha1-9zjLRfg0MAafRc9pzL8xLdV6nho= + /ansi-escapes/3.0.0: + dev: true + engines: + node: '>=4' + resolution: + integrity: sha512-O/klc27mWNUigtv0F8NJWbLF00OcegQalkqKURWdosW08YZKi4m6CnSUSvIZG1otNJbTWhN01Hhz389DW7mvDQ== + /ansi-regex/2.1.1: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-w7M6te42DYbg5ijwRorn7yfWVN8= + /ansi-regex/3.0.0: + dev: true + engines: + node: '>=4' + resolution: + integrity: sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= + /ansi-styles/2.2.1: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= + /ansi-styles/3.2.1: + dependencies: + color-convert: 1.9.1 + dev: true + engines: + node: '>=4' + resolution: + integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + /argparse/1.0.10: + dependencies: + sprintf-js: 1.0.3 + dev: true + resolution: + integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== + /array-union/1.0.2: + dependencies: + array-uniq: 1.0.3 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk= + /array-uniq/1.0.3: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-r2rId6Jcx/dOBYiUdThY39sk/bY= + /arrify/1.0.1: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0= + /assertion-error/1.1.0: + dev: true + resolution: + integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== + /babel-code-frame/6.26.0: + dependencies: + chalk: 1.1.3 + esutils: 2.0.2 + js-tokens: 3.0.2 + dev: true + resolution: + integrity: sha1-Y/1D99weO7fONZR9uP42mj9Yx0s= + /balanced-match/1.0.0: + dev: true + resolution: + integrity: sha1-ibTRmasr7kneFk6gK4nORi1xt2c= + /benchmark/2.1.4: + dependencies: + lodash: 4.17.5 + platform: 1.3.5 + dev: true + resolution: + integrity: sha1-CfPeMckWQl1JjMLuVloOvzwqVik= + /brace-expansion/1.1.11: + dependencies: + balanced-match: 1.0.0 + concat-map: 0.0.1 + dev: true + resolution: + integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + /browser-stdout/1.3.1: + dev: true + resolution: + integrity: sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== + /builtin-modules/1.1.1: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8= + /caller-path/0.1.0: + dependencies: + callsites: 0.2.0 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8= + /callsites/0.2.0: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo= + /chai/4.1.2: + dependencies: + assertion-error: 1.1.0 + check-error: 1.0.2 + deep-eql: 3.0.1 + get-func-name: 2.0.0 + pathval: 1.1.0 + type-detect: 4.0.8 + dev: true + engines: + node: '>=4' + resolution: + integrity: sha1-D2RYS6ZC8PKs4oBiefTwbKI61zw= + /chalk/1.1.3: + dependencies: + ansi-styles: 2.2.1 + escape-string-regexp: 1.0.5 + has-ansi: 2.0.0 + strip-ansi: 3.0.1 + supports-color: 2.0.0 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= + /chalk/2.3.2: + dependencies: + ansi-styles: 3.2.1 + escape-string-regexp: 1.0.5 + supports-color: 5.3.0 + dev: true + engines: + node: '>=4' + resolution: + integrity: sha512-ZM4j2/ld/YZDc3Ma8PgN7gyAk+kHMMMyzLNryCPGhWrsfAuDVeuid5bpRFTDgMH9JBK2lA4dyyAkkZYF/WcqDQ== + /chardet/0.4.2: + dev: true + resolution: + integrity: sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I= + /check-error/1.0.2: + dev: true + resolution: + integrity: sha1-V00xLt2Iu13YkS6Sht1sCu1KrII= + /circular-json/0.3.3: + dev: true + resolution: + integrity: sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A== + /cli-cursor/2.1.0: + dependencies: + restore-cursor: 2.0.0 + dev: true + engines: + node: '>=4' + resolution: + integrity: sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU= + /cli-width/2.2.0: + dev: true + resolution: + integrity: sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk= + /co/4.6.0: + dev: true + engines: + iojs: '>= 1.0.0' + node: '>= 0.12.0' + resolution: + integrity: sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ= + /color-convert/1.9.1: + dependencies: + color-name: 1.1.3 + dev: true + resolution: + integrity: sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ== + /color-name/1.1.3: + dev: true + resolution: + integrity: sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= + /commander/2.11.0: + dev: true + resolution: + integrity: sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ== + /concat-map/0.0.1: + dev: true + resolution: + integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + /concat-stream/1.6.1: + dependencies: + inherits: 2.0.3 + readable-stream: 2.3.5 + typedarray: 0.0.6 + dev: true + engines: + '0': node >= 0.8 + resolution: + integrity: sha512-gslSSJx03QKa59cIKqeJO9HQ/WZMotvYJCuaUULrLpjj8oG40kV2Z+gz82pVxlTkOADi4PJxQPPfhl1ELYrrXw== + /contains-path/0.1.0: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo= + /core-util-is/1.0.2: + dev: true + resolution: + integrity: sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= + /cross-spawn/5.1.0: + dependencies: + lru-cache: 4.1.2 + shebang-command: 1.2.0 + which: 1.3.0 + dev: true + resolution: + integrity: sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk= + /debug/2.6.9: + dependencies: + ms: 2.0.0 + dev: true + resolution: + integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + /debug/3.1.0: + dependencies: + ms: 2.0.0 + dev: true + resolution: + integrity: sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== + /deep-eql/3.0.1: + dependencies: + type-detect: 4.0.8 + dev: true + engines: + node: '>=0.12' + resolution: + integrity: sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw== + /deep-is/0.1.3: + dev: true + resolution: + integrity: sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= + /del/2.2.2: + dependencies: + globby: 5.0.0 + is-path-cwd: 1.0.0 + is-path-in-cwd: 1.0.0 + object-assign: 4.1.1 + pify: 2.3.0 + pinkie-promise: 2.0.1 + rimraf: 2.6.2 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag= + /diff/3.5.0: + dev: true + engines: + node: '>=0.3.1' + resolution: + integrity: sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== + /doctrine/1.5.0: + dependencies: + esutils: 2.0.2 + isarray: 1.0.0 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-N53Ocw9hZvds76TmcHoVmwLFpvo= + /doctrine/2.1.0: + dependencies: + esutils: 2.0.2 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw== + /error-ex/1.3.1: + dependencies: + is-arrayish: 0.2.1 + dev: true + resolution: + integrity: sha1-+FWobOYa3E6GIcPNoh56dhLDqNw= + /escape-string-regexp/1.0.5: + dev: true + engines: + node: '>=0.8.0' + resolution: + integrity: sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= + /eslint-config-standard/11.0.0: + dev: true + peerDependencies: + eslint: '>=4.18.0' + eslint-plugin-import: '>=2.8.0' + eslint-plugin-node: '>=5.2.1' + eslint-plugin-promise: '>=3.6.0' + eslint-plugin-standard: '>=3.0.1' + resolution: + integrity: sha512-oDdENzpViEe5fwuRCWla7AXQd++/oyIp8zP+iP9jiUPG6NBj3SHgdgtl/kTn00AjeN+1HNvavTKmYbMo+xMOlw== + /eslint-import-resolver-node/0.3.2: + dependencies: + debug: 2.6.9 + resolve: 1.5.0 + dev: true + resolution: + integrity: sha512-sfmTqJfPSizWu4aymbPr4Iidp5yKm8yDkHp+Ir3YiTHiiDfxh69mOUsmiqW6RZ9zRXFaF64GtYmN7e+8GHBv6Q== + /eslint-module-utils/2.1.1: + dependencies: + debug: 2.6.9 + pkg-dir: 1.0.0 + dev: true + engines: + node: '>=4' + resolution: + integrity: sha512-jDI/X5l/6D1rRD/3T43q8Qgbls2nq5km5KSqiwlyUbGo5+04fXhMKdCPhjwbqAa6HXWaMxj8Q4hQDIh7IadJQw== + /eslint-plugin-import/2.9.0: + dependencies: + builtin-modules: 1.1.1 + contains-path: 0.1.0 + debug: 2.6.9 + doctrine: 1.5.0 + eslint-import-resolver-node: 0.3.2 + eslint-module-utils: 2.1.1 + has: 1.0.1 + lodash: 4.17.5 + minimatch: 3.0.4 + read-pkg-up: 2.0.0 + dev: true + engines: + node: '>=4' + peerDependencies: + eslint: 2.x - 4.x + resolution: + integrity: sha1-JgAu+/ylmJtyiKwEdQi9JPIXsWk= + /eslint-plugin-node/6.0.1: + dependencies: + ignore: 3.3.7 + minimatch: 3.0.4 + resolve: 1.5.0 + semver: 5.5.0 + dev: true + engines: + node: '>=4' + peerDependencies: + eslint: '>=3.1.0' + resolution: + integrity: sha512-Q/Cc2sW1OAISDS+Ji6lZS2KV4b7ueA/WydVWd1BECTQwVvfQy5JAi3glhINoKzoMnfnuRgNP+ZWKrGAbp3QDxw== + /eslint-plugin-promise/3.7.0: + dev: true + engines: + node: '>=4' + resolution: + integrity: sha512-2WO+ZFh7vxUKRfR0cOIMrWgYKdR6S1AlOezw6pC52B6oYpd5WFghN+QHxvrRdZMtbo8h3dfUZ2o1rWb0UPbKtg== + /eslint-plugin-standard/3.0.1: + dev: true + peerDependencies: + eslint: '>=3.19.0' + resolution: + integrity: sha1-NNDJFbRe3G8BA5PH7vOCOwhWXPI= + /eslint-scope/3.7.1: + dependencies: + esrecurse: 4.2.1 + estraverse: 4.2.0 + dev: true + engines: + node: '>=4.0.0' + resolution: + integrity: sha1-PWPD7f2gLgbgGkUq2IyqzHzctug= + /eslint-visitor-keys/1.0.0: + dev: true + engines: + node: '>=4' + resolution: + integrity: sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ== + /eslint/4.18.2: + dependencies: + ajv: 5.5.2 + babel-code-frame: 6.26.0 + chalk: 2.3.2 + concat-stream: 1.6.1 + cross-spawn: 5.1.0 + debug: 3.1.0 + doctrine: 2.1.0 + eslint-scope: 3.7.1 + eslint-visitor-keys: 1.0.0 + espree: 3.5.4 + esquery: 1.0.0 + esutils: 2.0.2 + file-entry-cache: 2.0.0 + functional-red-black-tree: 1.0.1 + glob: 7.1.2 + globals: 11.3.0 + ignore: 3.3.7 + imurmurhash: 0.1.4 + inquirer: 3.3.0 + is-resolvable: 1.1.0 + js-yaml: 3.11.0 + json-stable-stringify-without-jsonify: 1.0.1 + levn: 0.3.0 + lodash: 4.17.5 + minimatch: 3.0.4 + mkdirp: 0.5.1 + natural-compare: 1.4.0 + optionator: 0.8.2 + path-is-inside: 1.0.2 + pluralize: 7.0.0 + progress: 2.0.0 + require-uncached: 1.0.3 + semver: 5.5.0 + strip-ansi: 4.0.0 + strip-json-comments: 2.0.1 + table: 4.0.2 + text-table: 0.2.0 + dev: true + engines: + node: '>=4' + resolution: + integrity: sha512-qy4i3wODqKMYfz9LUI8N2qYDkHkoieTbiHpMrYUI/WbjhXJQr7lI4VngixTgaG+yHX+NBCv7nW4hA0ShbvaNKw== + /espree/3.5.4: + dependencies: + acorn: 5.5.3 + acorn-jsx: 3.0.1 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha512-yAcIQxtmMiB/jL32dzEp2enBeidsB7xWPLNiw3IIkpVds1P+h7qF9YwJq1yUNzp2OKXgAprs4F61ih66UsoD1A== + /esprima/4.0.0: + dev: true + engines: + node: '>=4' + resolution: + integrity: sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw== + /esquery/1.0.0: + dependencies: + estraverse: 4.2.0 + dev: true + engines: + node: '>=0.6' + resolution: + integrity: sha1-z7qLV9f7qT8XKYqKAGoEzaE9gPo= + /esrecurse/4.2.1: + dependencies: + estraverse: 4.2.0 + dev: true + engines: + node: '>=4.0' + resolution: + integrity: sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ== + /estraverse/4.2.0: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-De4/7TH81GlhjOc0IJn8GvoL2xM= + /esutils/2.0.2: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs= + /external-editor/2.1.0: + dependencies: + chardet: 0.4.2 + iconv-lite: 0.4.19 + tmp: 0.0.33 + dev: true + engines: + node: '>=0.12' + resolution: + integrity: sha512-E44iT5QVOUJBKij4IIV3uvxuNlbKS38Tw1HiupxEIHPv9qtC2PrDYohbXV5U+1jnfIXttny8gUhj+oZvflFlzA== + /fast-deep-equal/1.1.0: + dev: true + resolution: + integrity: sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ= + /fast-json-stable-stringify/2.0.0: + dev: true + resolution: + integrity: sha1-1RQsDK7msRifh9OnYREGT4bIu/I= + /fast-levenshtein/2.0.6: + dev: true + resolution: + integrity: sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= + /figures/2.0.0: + dependencies: + escape-string-regexp: 1.0.5 + dev: true + engines: + node: '>=4' + resolution: + integrity: sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI= + /file-entry-cache/2.0.0: + dependencies: + flat-cache: 1.3.0 + object-assign: 4.1.1 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E= + /find-up/1.1.2: + dependencies: + path-exists: 2.1.0 + pinkie-promise: 2.0.1 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8= + /find-up/2.1.0: + dependencies: + locate-path: 2.0.0 + dev: true + engines: + node: '>=4' + resolution: + integrity: sha1-RdG35QbHF93UgndaK3eSCjwMV6c= + /flat-cache/1.3.0: + dependencies: + circular-json: 0.3.3 + del: 2.2.2 + graceful-fs: 4.1.11 + write: 0.2.1 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE= + /fs.realpath/1.0.0: + dev: true + resolution: + integrity: sha1-FQStJSMVjKpA20onh8sBQRmU6k8= + /function-bind/1.1.1: + dev: true + resolution: + integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== + /functional-red-black-tree/1.0.1: + dev: true + resolution: + integrity: sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= + /get-func-name/2.0.0: + dev: true + resolution: + integrity: sha1-6td0q+5y4gQJQzoGY2YCPdaIekE= + /glob/7.1.2: + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.3 + minimatch: 3.0.4 + once: 1.4.0 + path-is-absolute: 1.0.1 + dev: true + resolution: + integrity: sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ== + /globals/11.3.0: + dev: true + engines: + node: '>=4' + resolution: + integrity: sha512-kkpcKNlmQan9Z5ZmgqKH/SMbSmjxQ7QjyNqfXVc8VJcoBV2UEg+sxQD15GQofGRh2hfpwUb70VC31DR7Rq5Hdw== + /globby/5.0.0: + dependencies: + array-union: 1.0.2 + arrify: 1.0.1 + glob: 7.1.2 + object-assign: 4.1.1 + pify: 2.3.0 + pinkie-promise: 2.0.1 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0= + /graceful-fs/4.1.11: + dev: true + engines: + node: '>=0.4.0' + resolution: + integrity: sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg= + /growl/1.10.3: + dev: true + engines: + node: '>=4.x' + resolution: + integrity: sha512-hKlsbA5Vu3xsh1Cg3J7jSmX/WaW6A5oBeqzM88oNbCRQFz+zUaXm6yxS4RVytp1scBoJzSYl4YAEOQIt6O8V1Q== + /has-ansi/2.0.0: + dependencies: + ansi-regex: 2.1.1 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE= + /has-flag/2.0.0: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-6CB68cx7MNRGzHC3NLXovhj4jVE= + /has-flag/3.0.0: + dev: true + engines: + node: '>=4' + resolution: + integrity: sha1-tdRU3CGZriJWmfNGfloH87lVuv0= + /has/1.0.1: + dependencies: + function-bind: 1.1.1 + dev: true + engines: + node: '>= 0.8.0' + resolution: + integrity: sha1-hGFzP1OLCDfJNh45qauelwTcLyg= + /he/1.1.1: + dev: true + resolution: + integrity: sha1-k0EP0hsAlzUVH4howvJx80J+I/0= + /hosted-git-info/2.6.0: + dev: true + engines: + node: '>=4' + resolution: + integrity: sha512-lIbgIIQA3lz5XaB6vxakj6sDHADJiZadYEJB+FgA+C4nubM1NwcuvUr9EJPmnH1skZqpqUzWborWo8EIUi0Sdw== + /iconv-lite/0.4.19: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ== + /ignore/3.3.7: + dev: true + resolution: + integrity: sha512-YGG3ejvBNHRqu0559EOxxNFihD0AjpvHlC/pdGKd3X3ofe+CoJkYazwNJYTNebqpPKN+VVQbh4ZFn1DivMNuHA== + /imurmurhash/0.1.4: + dev: true + engines: + node: '>=0.8.19' + resolution: + integrity: sha1-khi5srkoojixPcT7a21XbyMUU+o= + /inflight/1.0.6: + dependencies: + once: 1.4.0 + wrappy: 1.0.2 + dev: true + resolution: + integrity: sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + /inherits/2.0.3: + dev: true + resolution: + integrity: sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= + /inquirer/3.3.0: + dependencies: + ansi-escapes: 3.0.0 + chalk: 2.3.2 + cli-cursor: 2.1.0 + cli-width: 2.2.0 + external-editor: 2.1.0 + figures: 2.0.0 + lodash: 4.17.5 + mute-stream: 0.0.7 + run-async: 2.3.0 + rx-lite: 4.0.8 + rx-lite-aggregates: 4.0.8 + string-width: 2.1.1 + strip-ansi: 4.0.0 + through: 2.3.8 + dev: true + resolution: + integrity: sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ== + /is-arrayish/0.2.1: + dev: true + resolution: + integrity: sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= + /is-builtin-module/1.0.0: + dependencies: + builtin-modules: 1.1.1 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-VAVy0096wxGfj3bDDLwbHgN6/74= + /is-fullwidth-code-point/2.0.0: + dev: true + engines: + node: '>=4' + resolution: + integrity: sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= + /is-path-cwd/1.0.0: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0= + /is-path-in-cwd/1.0.0: + dependencies: + is-path-inside: 1.0.1 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-ZHdYK4IU1gI0YJRWcAO+ip6sBNw= + /is-path-inside/1.0.1: + dependencies: + path-is-inside: 1.0.2 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-jvW33lBDej/cprToZe96pVy0gDY= + /is-promise/2.1.0: + dev: true + resolution: + integrity: sha1-eaKp7OfwlugPNtKy87wWwf9L8/o= + /is-resolvable/1.1.0: + dev: true + resolution: + integrity: sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg== + /isarray/1.0.0: + dev: true + resolution: + integrity: sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= + /isexe/2.0.0: + dev: true + resolution: + integrity: sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= + /js-tokens/3.0.2: + dev: true + resolution: + integrity: sha1-mGbfOVECEw449/mWvOtlRDIJwls= + /js-yaml/3.11.0: + dependencies: + argparse: 1.0.10 + esprima: 4.0.0 + dev: true + resolution: + integrity: sha512-saJstZWv7oNeOyBh3+Dx1qWzhW0+e6/8eDzo7p5rDFqxntSztloLtuKu+Ejhtq82jsilwOIZYsCz+lIjthg1Hw== + /json-schema-traverse/0.3.1: + dev: true + resolution: + integrity: sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A= + /json-stable-stringify-without-jsonify/1.0.1: + dev: true + resolution: + integrity: sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= + /levn/0.3.0: + dependencies: + prelude-ls: 1.1.2 + type-check: 0.3.2 + dev: true + engines: + node: '>= 0.8.0' + resolution: + integrity: sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= + /load-json-file/2.0.0: + dependencies: + graceful-fs: 4.1.11 + parse-json: 2.2.0 + pify: 2.3.0 + strip-bom: 3.0.0 + dev: true + engines: + node: '>=4' + resolution: + integrity: sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg= + /locate-path/2.0.0: + dependencies: + p-locate: 2.0.0 + path-exists: 3.0.0 + dev: true + engines: + node: '>=4' + resolution: + integrity: sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= + /lodash/4.17.5: + dev: true + resolution: + integrity: sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw== + /lru-cache/4.1.2: + dependencies: + pseudomap: 1.0.2 + yallist: 2.1.2 + dev: true + resolution: + integrity: sha512-wgeVXhrDwAWnIF/yZARsFnMBtdFXOg1b8RIrhilp+0iDYN4mdQcNZElDZ0e4B64BhaxeQ5zN7PMyvu7we1kPeQ== + /mimic-fn/1.2.0: + dev: true + engines: + node: '>=4' + resolution: + integrity: sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== + /minimatch/3.0.4: + dependencies: + brace-expansion: 1.1.11 + dev: true + resolution: + integrity: sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== + /minimist/0.0.8: + dev: true + resolution: + integrity: sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= + /mkdirp/0.5.1: + dependencies: + minimist: 0.0.8 + dev: true + resolution: + integrity: sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= + /mocha/5.0.4: + dependencies: + browser-stdout: 1.3.1 + commander: 2.11.0 + debug: 3.1.0 + diff: 3.5.0 + escape-string-regexp: 1.0.5 + glob: 7.1.2 + growl: 1.10.3 + he: 1.1.1 + mkdirp: 0.5.1 + supports-color: 4.4.0 + dev: true + engines: + node: '>= 4.0.0' + resolution: + integrity: sha512-nMOpAPFosU1B4Ix1jdhx5e3q7XO55ic5a8cgYvW27CequcEY+BabS0kUVL1Cw1V5PuVHZWeNRWFLmEPexo79VA== + /ms/2.0.0: + dev: true + resolution: + integrity: sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= + /mute-stream/0.0.7: + dev: true + resolution: + integrity: sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= + /natural-compare/1.4.0: + dev: true + resolution: + integrity: sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= + /normalize-package-data/2.4.0: + dependencies: + hosted-git-info: 2.6.0 + is-builtin-module: 1.0.0 + semver: 5.5.0 + validate-npm-package-license: 3.0.3 + dev: true + resolution: + integrity: sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw== + /object-assign/4.1.1: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= + /once/1.4.0: + dependencies: + wrappy: 1.0.2 + dev: true + resolution: + integrity: sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + /onetime/2.0.1: + dependencies: + mimic-fn: 1.2.0 + dev: true + engines: + node: '>=4' + resolution: + integrity: sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ= + /optionator/0.8.2: + dependencies: + deep-is: 0.1.3 + fast-levenshtein: 2.0.6 + levn: 0.3.0 + prelude-ls: 1.1.2 + type-check: 0.3.2 + wordwrap: 1.0.0 + dev: true + engines: + node: '>= 0.8.0' + resolution: + integrity: sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q= + /os-tmpdir/1.0.2: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= + /p-limit/1.2.0: + dependencies: + p-try: 1.0.0 + dev: true + engines: + node: '>=4' + resolution: + integrity: sha512-Y/OtIaXtUPr4/YpMv1pCL5L5ed0rumAaAeBSj12F+bSlMdys7i8oQF/GUJmfpTS/QoaRrS/k6pma29haJpsMng== + /p-locate/2.0.0: + dependencies: + p-limit: 1.2.0 + dev: true + engines: + node: '>=4' + resolution: + integrity: sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= + /p-try/1.0.0: + dev: true + engines: + node: '>=4' + resolution: + integrity: sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= + /parse-json/2.2.0: + dependencies: + error-ex: 1.3.1 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-9ID0BDTvgHQfhGkJn43qGPVaTck= + /path-exists/2.1.0: + dependencies: + pinkie-promise: 2.0.1 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-D+tsZPD8UY2adU3V77YscCJ2H0s= + /path-exists/3.0.0: + dev: true + engines: + node: '>=4' + resolution: + integrity: sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= + /path-is-absolute/1.0.1: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + /path-is-inside/1.0.2: + dev: true + resolution: + integrity: sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM= + /path-parse/1.0.5: + dev: true + resolution: + integrity: sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME= + /path-type/2.0.0: + dependencies: + pify: 2.3.0 + dev: true + engines: + node: '>=4' + resolution: + integrity: sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM= + /pathval/1.1.0: + dev: true + resolution: + integrity: sha1-uULm1L3mUwBe9rcTYd74cn0GReA= + /pify/2.3.0: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-7RQaasBDqEnqWISY59yosVMw6Qw= + /pinkie-promise/2.0.1: + dependencies: + pinkie: 2.0.4 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-ITXW36ejWMBprJsXh3YogihFD/o= + /pinkie/2.0.4: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-clVrgM+g1IqXToDnckjoDtT3+HA= + /pkg-dir/1.0.0: + dependencies: + find-up: 1.1.2 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-ektQio1bstYp1EcFb/TpyTFM89Q= + /platform/1.3.5: + dev: true + resolution: + integrity: sha512-TuvHS8AOIZNAlE77WUDiR4rySV/VMptyMfcfeoMgs4P8apaZM3JrnbzBiixKUv+XR6i+BXrQh8WAnjaSPFO65Q== + /pluralize/7.0.0: + dev: true + engines: + node: '>=4' + resolution: + integrity: sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow== + /prelude-ls/1.1.2: + dev: true + engines: + node: '>= 0.8.0' + resolution: + integrity: sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= + /process-nextick-args/2.0.0: + dev: true + resolution: + integrity: sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw== + /progress/2.0.0: + dev: true + engines: + node: '>=0.4.0' + resolution: + integrity: sha1-ihvjZr+Pwj2yvSPxDG/pILQ4nR8= + /pseudomap/1.0.2: + dev: true + resolution: + integrity: sha1-8FKijacOYYkX7wqKw0wa5aaChrM= + /read-pkg-up/2.0.0: + dependencies: + find-up: 2.1.0 + read-pkg: 2.0.0 + dev: true + engines: + node: '>=4' + resolution: + integrity: sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4= + /read-pkg/2.0.0: + dependencies: + load-json-file: 2.0.0 + normalize-package-data: 2.4.0 + path-type: 2.0.0 + dev: true + engines: + node: '>=4' + resolution: + integrity: sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg= + /readable-stream/2.3.5: + dependencies: + core-util-is: 1.0.2 + inherits: 2.0.3 + isarray: 1.0.0 + process-nextick-args: 2.0.0 + safe-buffer: 5.1.1 + string_decoder: 1.0.3 + util-deprecate: 1.0.2 + dev: true + resolution: + integrity: sha512-tK0yDhrkygt/knjowCUiWP9YdV7c5R+8cR0r/kt9ZhBU906Fs6RpQJCEilamRJj1Nx2rWI6LkW9gKqjTkshhEw== + /require-uncached/1.0.3: + dependencies: + caller-path: 0.1.0 + resolve-from: 1.0.1 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM= + /resolve-from/1.0.1: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY= + /resolve/1.5.0: + dependencies: + path-parse: 1.0.5 + dev: true + resolution: + integrity: sha512-hgoSGrc3pjzAPHNBg+KnFcK2HwlHTs/YrAGUr6qgTVUZmXv1UEXXl0bZNBKMA9fud6lRYFdPGz0xXxycPzmmiw== + /restore-cursor/2.0.0: + dependencies: + onetime: 2.0.1 + signal-exit: 3.0.2 + dev: true + engines: + node: '>=4' + resolution: + integrity: sha1-n37ih/gv0ybU/RYpI9YhKe7g368= + /rimraf/2.6.2: + dependencies: + glob: 7.1.2 + dev: true + resolution: + integrity: sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w== + /run-async/2.3.0: + dependencies: + is-promise: 2.1.0 + dev: true + engines: + node: '>=0.12.0' + resolution: + integrity: sha1-A3GrSuC91yDUFm19/aZP96RFpsA= + /rx-lite-aggregates/4.0.8: + dependencies: + rx-lite: 4.0.8 + dev: true + resolution: + integrity: sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74= + /rx-lite/4.0.8: + dev: true + resolution: + integrity: sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ= + /safe-buffer/5.1.1: + dev: true + resolution: + integrity: sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg== + /semver/5.5.0: + dev: true + resolution: + integrity: sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA== + /shebang-command/1.2.0: + dependencies: + shebang-regex: 1.0.0 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= + /shebang-regex/1.0.0: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= + /signal-exit/3.0.2: + dev: true + resolution: + integrity: sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0= + /slice-ansi/1.0.0: + dependencies: + is-fullwidth-code-point: 2.0.0 + dev: true + engines: + node: '>=4' + resolution: + integrity: sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg== + /spdx-correct/3.0.0: + dependencies: + spdx-expression-parse: 3.0.0 + spdx-license-ids: 3.0.0 + dev: true + resolution: + integrity: sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g== + /spdx-exceptions/2.1.0: + dev: true + resolution: + integrity: sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg== + /spdx-expression-parse/3.0.0: + dependencies: + spdx-exceptions: 2.1.0 + spdx-license-ids: 3.0.0 + dev: true + resolution: + integrity: sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg== + /spdx-license-ids/3.0.0: + dev: true + resolution: + integrity: sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA== + /sprintf-js/1.0.3: + dev: true + resolution: + integrity: sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= + /string-width/2.1.1: + dependencies: + is-fullwidth-code-point: 2.0.0 + strip-ansi: 4.0.0 + dev: true + engines: + node: '>=4' + resolution: + integrity: sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== + /string_decoder/1.0.3: + dependencies: + safe-buffer: 5.1.1 + dev: true + resolution: + integrity: sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ== + /strip-ansi/3.0.1: + dependencies: + ansi-regex: 2.1.1 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= + /strip-ansi/4.0.0: + dependencies: + ansi-regex: 3.0.0 + dev: true + engines: + node: '>=4' + resolution: + integrity: sha1-qEeQIusaw2iocTibY1JixQXuNo8= + /strip-bom/3.0.0: + dev: true + engines: + node: '>=4' + resolution: + integrity: sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= + /strip-json-comments/2.0.1: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-PFMZQukIwml8DsNEhYwobHygpgo= + /supports-color/2.0.0: + dev: true + engines: + node: '>=0.8.0' + resolution: + integrity: sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= + /supports-color/4.4.0: + dependencies: + has-flag: 2.0.0 + dev: true + engines: + node: '>=4' + resolution: + integrity: sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ== + /supports-color/5.3.0: + dependencies: + has-flag: 3.0.0 + dev: true + engines: + node: '>=4' + resolution: + integrity: sha512-0aP01LLIskjKs3lq52EC0aGBAJhLq7B2Rd8HC/DR/PtNNpcLilNmHC12O+hu0usQpo7wtHNRqtrhBwtDb0+dNg== + /table/4.0.2: + dependencies: + ajv: 5.5.2 + ajv-keywords: /ajv-keywords/2.1.1/ajv@5.5.2 + chalk: 2.3.2 + lodash: 4.17.5 + slice-ansi: 1.0.0 + string-width: 2.1.1 + dev: true + resolution: + integrity: sha512-UUkEAPdSGxtRpiV9ozJ5cMTtYiqz7Ni1OGqLXRCynrvzdtR1p+cfOWe2RJLwvUG8hNanaSRjecIqwOjqeatDsA== + /text-table/0.2.0: + dev: true + resolution: + integrity: sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= + /through/2.3.8: + dev: true + resolution: + integrity: sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= + /tmp/0.0.33: + dependencies: + os-tmpdir: 1.0.2 + dev: true + engines: + node: '>=0.6.0' + resolution: + integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== + /type-check/0.3.2: + dependencies: + prelude-ls: 1.1.2 + dev: true + engines: + node: '>= 0.8.0' + resolution: + integrity: sha1-WITKtRLPHTVeP7eE8wgEsrUg23I= + /type-detect/4.0.8: + dev: true + engines: + node: '>=4' + resolution: + integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== + /typedarray/0.0.6: + dev: true + resolution: + integrity: sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= + /util-deprecate/1.0.2: + dev: true + resolution: + integrity: sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= + /validate-npm-package-license/3.0.3: + dependencies: + spdx-correct: 3.0.0 + spdx-expression-parse: 3.0.0 + dev: true + resolution: + integrity: sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g== + /which/1.3.0: + dependencies: + isexe: 2.0.0 + dev: true + resolution: + integrity: sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg== + /wordwrap/1.0.0: + dev: true + resolution: + integrity: sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= + /wrappy/1.0.2: + dev: true + resolution: + integrity: sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + /write/0.2.1: + dependencies: + mkdirp: 0.5.1 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c= + /yallist/2.1.2: + dev: true + resolution: + integrity: sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= +registry: 'https://registry.npmjs.org/' +shrinkwrapMinorVersion: 4 +shrinkwrapVersion: 3 +specifiers: + alea: 0.0.9 + benchmark: ~2.1.4 + chai: ^4.1.2 + eslint: ^4.17.0 + eslint-config-standard: ^11.0.0-beta.0 + eslint-plugin-import: ^2.8.0 + eslint-plugin-node: ^6.0.0 + eslint-plugin-promise: ^3.6.0 + eslint-plugin-standard: ^3.0.1 + mocha: ^5.0.0 diff --git a/simplex-noise.js b/simplex-noise.js index 85c5e69..7a10a69 100644 --- a/simplex-noise.js +++ b/simplex-noise.js @@ -30,53 +30,53 @@ Better rank ordering method by Stefan Gustavson in 2012. 'use strict'; var grad3 = new Float32Array([ - 1, 1, 0, - -1, 1, 0, - 1, -1, 0, - -1, -1, 0, - 1, 0, 1, - -1, 0, 1, - 1, 0, -1, - -1, 0, -1, - 0, 1, 1, - 0, -1, 1, - 0, 1, -1, - 0, -1, -1 + 1, 1, 0, + -1, 1, 0, + 1, -1, 0, + -1, -1, 0, + 1, 0, 1, + -1, 0, 1, + 1, 0, -1, + -1, 0, -1, + 0, 1, 1, + 0, -1, 1, + 0, 1, -1, + 0, -1, -1 ]); var grad4 = new Float32Array([ - 0, 1, 1, 1, - 0, 1, 1, -1, - 0, 1, -1, 1, - 0, 1, -1, -1, - 0, -1, 1, 1, - 0, -1, 1, -1, - 0, -1, -1, 1, - 0, -1, -1, -1, - 1, 0, 1, 1, - 1, 0, 1, -1, - 1, 0, -1, 1, - 1, 0, -1, -1, - -1, 0, 1, 1, - -1, 0, 1, -1, - -1, 0, -1, 1, - -1, 0, -1, -1, - 1, 1, 0, 1, - 1, 1, 0, -1, - 1, -1, 0, 1, - 1, -1, 0, -1, - -1, 1, 0, 1, - -1, 1, 0, -1, - -1, -1, 0, 1, - -1, -1, 0, -1, - 1, 1, 1, 0, - 1, 1, -1, 0, - 1, -1, 1, 0, - 1, -1, -1, 0, - -1, 1, 1, 0, - -1, 1, -1, 0, - -1, -1, 1, 0, - -1, -1, -1, 0 + 0, 1, 1, 1, + 0, 1, 1, -1, + 0, 1, -1, 1, + 0, 1, -1, -1, + 0, -1, 1, 1, + 0, -1, 1, -1, + 0, -1, -1, 1, + 0, -1, -1, -1, + 1, 0, 1, 1, + 1, 0, 1, -1, + 1, 0, -1, 1, + 1, 0, -1, -1, + -1, 0, 1, 1, + -1, 0, 1, -1, + -1, 0, -1, 1, + -1, 0, -1, -1, + 1, 1, 0, 1, + 1, 1, 0, -1, + 1, -1, 0, 1, + 1, -1, 0, -1, + -1, 1, 0, 1, + -1, 1, 0, -1, + -1, -1, 0, 1, + -1, -1, 0, -1, + 1, 1, 1, 0, + 1, 1, -1, 0, + 1, -1, 1, 0, + 1, -1, -1, 0, + -1, 1, 1, 0, + -1, 1, -1, 0, + -1, -1, 1, 0, + -1, -1, -1, 0 ]); var F2 = 0.5 * (Math.sqrt(3.0) - 1.0); @@ -102,10 +102,10 @@ Better rank ordering method by Stefan Gustavson in 2012. case 3: return noise3D(x, y, z); case 4: return noise4D(x, y, z, w); } - } + }; function noise1D(x) { - return noise2D(x, 0) + return noise2D(x, 0); } function noise2D(x, y) { @@ -169,17 +169,17 @@ Better rank ordering method by Stefan Gustavson in 2012. function noise3D(x, y, z) { var n0, n1, n2, n3; // Noise contributions from the four corners // Skew the input space to determine which simplex cell we're in - var s = (x + y + zin) * F3; // Very nice and simple skew factor for 3D + var s = (x + y + z) * F3; // Very nice and simple skew factor for 3D var i = Math.floor(x + s); var j = Math.floor(y + s); - var k = Math.floor(zin + s); + var k = Math.floor(z + s); var t = (i + j + k) * G3; var X0 = i - t; // Unskew the cell origin back to (x,y,z) space var Y0 = j - t; var Z0 = k - t; var x0 = x - X0; // The x,y,z distances from the cell origin var y0 = y - Y0; - var z0 = zin - Z0; + var z0 = z - Z0; // For the 3D case, the simplex shape is a slightly irregular tetrahedron. // Determine which simplex we are in. var i1, j1, k1; // Offsets for second corner of simplex in (i,j,k) coords @@ -410,15 +410,29 @@ Better rank ordering method by Stefan Gustavson in 2012. } } - // amd - if (typeof define !== 'undefined' && define.amd) define(function() {return SimplexNoise;}); - // common js - if (typeof exports !== 'undefined') exports.SimplexNoise = SimplexNoise; - // browser - else if (typeof window !== 'undefined') window.SimplexNoise = SimplexNoise; - // nodejs - if (typeof module !== 'undefined') { - module.exports = SimplexNoise; + function buildPermutationTable(random) { + var i; + var p = new Uint8Array(256); + for (i = 0; i < 256; i++) { + p[i] = i; + } + for (i = 0; i < 255; i++) { + var r = i + ~~(random() * (256 - i)); + var aux = p[i]; + p[i] = p[r]; + p[r] = aux; + } + return p; } + if (typeof define !== 'undefined' && define.amd) { + // AMD + define(function () { return simplex; }); + } else if (typeof exports !== 'undefined') { + // CommonJS (Node, Browserify) + module.exports = simplex; + } else if (typeof window !== 'undefined') { + // Browser + window.simplex = simplex; + } })(); diff --git a/test/simplex-noise-test.js b/test/simplex-noise-test.js index 86dd148..effee3b 100644 --- a/test/simplex-noise-test.js +++ b/test/simplex-noise-test.js @@ -1,151 +1,103 @@ -var SimplexNoise = require('../simplex-noise'); +var simplex = require('../simplex-noise'); var Alea = require('alea'); var assert = require('chai').assert; describe('SimplexNoise', function() { - function getRandom() { - return new Alea('seed'); - } - - describe('buildPermutationTable', function() { - it('contains all indices exactly once', function() { - var table = SimplexNoise._buildPermutationTable(getRandom()); - var aTable = Array.prototype.slice.call(table); - for (var i = 0; i < aTable.length; i++) { - assert.include(aTable, i); - } - }); - it('can contain 0 in the first position', function() { - function zero() { return 0; } - var table = SimplexNoise._buildPermutationTable(zero); - var aTable = Array.prototype.slice.call(table); - for (var i = 0; i < aTable.length; i++) { - assert.equal(aTable[i], i); - } - }); - }); - - describe('constructor', function() { - function checkPermutationTable(simplex) { - assert.equal(simplex.perm.length, 512); - assert.equal(simplex.permMod12.length, 512); - for (var i = 0; i < 512; i++) { - assert.isBelow(simplex.perm[i], 256); - assert.isAtLeast(simplex.perm[i], 0); - assert.equal(simplex.perm[i], simplex.perm[i & 255]); - assert.equal(simplex.permMod12[i], simplex.perm[i] % 12); - } - } - - it('should initialize with Math.random', function() { - var simplex = new SimplexNoise(); - checkPermutationTable(simplex); - }); - - it('should initialize with a custom random function', function() { - var simplex = new SimplexNoise(getRandom()); - checkPermutationTable(simplex); - }); - - it('should initialize with seed', function() { - var simplex = new SimplexNoise('seed'); - checkPermutationTable(simplex); - }); - + describe('factory', function() { it('should initialize consistently when using the same seed', function() { - var a = new SimplexNoise('seed'); - var b = new SimplexNoise('seed'); - assert.deepEqual(a, b); - assert.equal(a.noise2D(1, 1), b.noise2D(1, 1)); + var randomA = new Alea('seed') + var randomB = new Alea('seed') + var noiseA = simplex(randomA); + var noiseB = simplex(randomB); + assert.equal(noiseA(1, 1), noiseB(1, 1)); }); it('should initialize differently when using a different seed', function() { - var a = new SimplexNoise('seed'); - var b = new SimplexNoise('different seed'); - assert.notDeepEqual(a, b); - assert.notEqual(a.noise2D(1, 1), b.noise2D(1, 1)); + var randomA = new Alea('seed') + var randomB = new Alea('different seed') + var noiseA = simplex(randomA); + var noiseB = simplex(randomB); + assert.notEqual(noiseA(1, 1), noiseB(1, 1)); }); }); describe('noise', function() { - var simplex; + var noise, noise2; beforeEach(function() { - simplex = new SimplexNoise(getRandom()); + noise = simplex(new Alea('seed')); + noise2 = simplex(new Alea('other seed')) }); describe('noise2D', function() { it('should return the same value for the same input', function() { - assert.equal(simplex.noise2D(0.1, 0.2), simplex.noise2D(0.1, 0.2)); + assert.equal(noise(0.1, 0.2), noise(0.1, 0.2)); }); it('should return a different value for a different input', function() { - assert.notEqual(simplex.noise2D(0.1, 0.2), simplex.noise2D(0.101, 0.202)); + assert.notEqual(noise(0.1, 0.2), noise(0.101, 0.202)); }); it('should return a different output with a different seed', function() { - var simplex2 = new SimplexNoise(new Alea('other seed')); - assert.notEqual(simplex.noise2D(0.1, 0.2), simplex2.noise2D(0.1, 0.2)); + assert.notEqual(noise(0.1, 0.2), noise2(0.1, 0.2)); }); it('should return values between -1 and 1', function() { for (var x = 0; x < 10; x++) { for (var y = 0; y < 10; y++) { - assert(simplex.noise2D(x / 5, y / 5) >= -1); - assert(simplex.noise2D(x / 5, y / 5) <= 1); + assert(noise(x / 5, y / 5) >= -1); + assert(noise(x / 5, y / 5) <= 1); } } }); it('should return similar values for similar inputs', function() { - assert(Math.abs(simplex.noise2D(0.1, 0.2) - simplex.noise2D(0.101, 0.202)) < 0.1); + assert(Math.abs(noise(0.1, 0.2) - noise(0.101, 0.202)) < 0.1); }); }); describe('noise3D', function() { it('should return the same value for the same input', function() { - assert.equal(simplex.noise3D(0.1, 0.2, 0.3), simplex.noise3D(0.1, 0.2, 0.3)); + assert.equal(noise(0.1, 0.2, 0.3), noise(0.1, 0.2, 0.3)); }); it('should return a different value for a different input', function() { - assert.notEqual(simplex.noise3D(0.1, 0.2, 0.3), simplex.noise3D(0.101, 0.202, 0.303)); - assert.notEqual(simplex.noise3D(0.1, 0.2, 0.3), simplex.noise3D(0.1, 0.2, 0.303)); + assert.notEqual(noise(0.1, 0.2, 0.3), noise(0.101, 0.202, 0.303)); + assert.notEqual(noise(0.1, 0.2, 0.3), noise(0.1, 0.2, 0.303)); }); it('should return a different output with a different seed', function() { - var simplex2 = new SimplexNoise(new Alea('other seed')); - assert.notEqual(simplex.noise2D(0.1, 0.2, 0.3), simplex2.noise2D(0.1, 0.2, 0.3)); + assert.notEqual(noise(0.1, 0.2, 0.3), noise2(0.1, 0.2, 0.3)); }); it('should return values between -1 and 1', function() { for (var x = 0; x < 10; x++) { for (var y = 0; y < 10; y++) { - assert(simplex.noise3D(x / 5, y / 5, x + y) >= -1); - assert(simplex.noise3D(x / 5, y / 5, x + y) <= 1); + assert(noise(x / 5, y / 5, x + y) >= -1); + assert(noise(x / 5, y / 5, x + y) <= 1); } } }); it('should return similar values for similar inputs', function() { - assert(Math.abs(simplex.noise3D(0.1, 0.2, 0.3) - simplex.noise3D(0.101, 0.202, 0.303)) < 0.1); + assert(Math.abs(noise(0.1, 0.2, 0.3) - noise(0.101, 0.202, 0.303)) < 0.1); }); }); describe('noise4D', function() { it('should return the same value for the same input', function() { - assert.equal(simplex.noise4D(0.1, 0.2, 0.3, 0.4), simplex.noise4D(0.1, 0.2, 0.3, 0.4)); + assert.equal(noise(0.1, 0.2, 0.3, 0.4), noise(0.1, 0.2, 0.3, 0.4)); }); it('should return a different value for a different input', function() { - assert.notEqual(simplex.noise4D(0.1, 0.2, 0.3, 0.4), simplex.noise4D(0.101, 0.202, 0.303, 0.404)); - assert.notEqual(simplex.noise4D(0.1, 0.2, 0.3, 0.4), simplex.noise4D(0.1, 0.2, 0.3, 0.404)); + assert.notEqual(noise(0.1, 0.2, 0.3, 0.4), noise(0.101, 0.202, 0.303, 0.404)); + assert.notEqual(noise(0.1, 0.2, 0.3, 0.4), noise(0.1, 0.2, 0.3, 0.404)); }); it('should return a different output with a different seed', function() { - var simplex2 = new SimplexNoise(new Alea('other seed')); - assert.notEqual(simplex.noise2D(0.1, 0.2, 0.3, 0.4), simplex2.noise2D(0.1, 0.2, 0.3, 0.4)); + assert.notEqual(noise(0.1, 0.2, 0.3, 0.4), noise2(0.1, 0.2, 0.3, 0.4)); }); it('should return values between -1 and 1', function() { for (var x = 0; x < 10; x++) { for (var y = 0; y < 10; y++) { - assert(simplex.noise4D(x / 5, y / 5, x + y, x - y) >= -1); - assert(simplex.noise4D(x / 5, y / 5, x + y, x - y) <= 1); + assert(noise(x / 5, y / 5, x + y, x - y) >= -1); + assert(noise(x / 5, y / 5, x + y, x - y) <= 1); } } }); it('should return similar values for similar inputs', function() { assert( Math.abs( - simplex.noise4D(0.1, 0.2, 0.3, 0.4) - - simplex.noise4D(0.101, 0.202, 0.303, 0.404) + noise(0.1, 0.2, 0.3, 0.4) - + noise(0.101, 0.202, 0.303, 0.404) ) < 0.1); }); }); From 3c0491d6e9767eae60b6ed027e72abdbf881f5e0 Mon Sep 17 00:00:00 2001 From: Brandon Semilla Date: Mon, 12 Mar 2018 20:49:05 -0700 Subject: [PATCH 03/13] ignore shrinkwrap --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 3c3629e..4f0cca6 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ node_modules +shrinkwrap.yaml From 39defa65346d9f432919e4ccab0b416acd940819 Mon Sep 17 00:00:00 2001 From: Brandon Semilla Date: Mon, 12 Mar 2018 20:52:21 -0700 Subject: [PATCH 04/13] evaluate benchmarks --- perf/benchmark.js | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/perf/benchmark.js b/perf/benchmark.js index b5be502..9d96526 100644 --- a/perf/benchmark.js +++ b/perf/benchmark.js @@ -1,17 +1,19 @@ var Benchmark = this.Benchmark || require('benchmark'); -var SimplexNoise = this.SimplexNoise || require('../simplex-noise'); -var simplex = new SimplexNoise(); +var simplex = this.simplex || require('../simplex-noise'); var suite = new Benchmark.Suite('simplex-noise') .add('init', function() { - var simplex = new SimplexNoise(); + var noise = simplex(Math.random); + }) + .add('noise1D', function() { + for (var x = 0; x < 8; x++) { + noise(x / 8); + } }) .add('noise2D', function() { for (var x = 0; x < 8; x++) { for (var y = 0; y < 8; y++) { - for (var z = 0; z < 8; z++) { - simplex.noise2D(x / 8, y / 8); - } + noise(x / 8, y / 8); } } }) @@ -19,7 +21,7 @@ var suite = new Benchmark.Suite('simplex-noise') for (var x = 0; x < 8; x++) { for (var y = 0; y < 8; y++) { for (var z = 0; z < 8; z++) { - simplex.noise3D(x / 8, y / 8, z / 8); + noise(x / 8, y / 8, z / 8); } } } @@ -28,7 +30,7 @@ var suite = new Benchmark.Suite('simplex-noise') for (var x = 0; x < 8; x++) { for (var y = 0; y < 8; y++) { for (var z = 0; z < 8; z++) { - simplex.noise3D(x / 8, y / 8, z / 8); + noise(x / 8, y / 8, z / 8); } } } @@ -37,7 +39,7 @@ var suite = new Benchmark.Suite('simplex-noise') for (var x = 0; x < 8; x++) { for (var y = 0; y < 8; y++) { for (var z = 0; z < 8; z++) { - simplex.noise4D(x / 8, y / 8, z / 8, (x + y) / 16); + noise(x / 8, y / 8, z / 8, (x + y) / 16); } } } From 52a36fdff47835a185886c8b69c61e99af664e26 Mon Sep 17 00:00:00 2001 From: Brandon Semilla Date: Mon, 12 Mar 2018 21:15:45 -0700 Subject: [PATCH 05/13] fix 1D noise function, add 1D tests --- simplex-noise.js | 2 +- test/simplex-noise-test.js | 34 ++++++++++++++++++++++++++++------ 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/simplex-noise.js b/simplex-noise.js index 7a10a69..ea17b7a 100644 --- a/simplex-noise.js +++ b/simplex-noise.js @@ -105,7 +105,7 @@ Better rank ordering method by Stefan Gustavson in 2012. }; function noise1D(x) { - return noise2D(x, 0); + return noise2D(x, 1); } function noise2D(x, y) { diff --git a/test/simplex-noise-test.js b/test/simplex-noise-test.js index effee3b..6cd5885 100644 --- a/test/simplex-noise-test.js +++ b/test/simplex-noise-test.js @@ -22,11 +22,33 @@ describe('SimplexNoise', function() { }); describe('noise', function() { - var noise, noise2; + var noise, noiseA, noiseB; beforeEach(function() { - noise = simplex(new Alea('seed')); - noise2 = simplex(new Alea('other seed')) + noiseA = simplex(new Alea('seed')); + noiseB = simplex(new Alea('other seed')) + noise = noiseA }); + + describe('noise1D', function() { + it('should return the same value for the same input', function() { + assert.equal(noise(0.1), noise(0.1)); + }); + it('should return a different value for a different input', function() { + assert.notEqual(noise(0.1), noise(0.101)); + }); + it('should return a different output with a different seed', function() { + assert.notEqual(noiseA(0.1), noiseB(0.1)); + }); + it('should return values between -1 and 1', function() { + for (var x = 0; x < 10; x++) { + assert(noise(x / 5) >= -1); + } + }); + it('should return similar values for similar inputs', function() { + assert(Math.abs(noise(0.1) - noise(0.101)) < 0.1); + }); + }); + describe('noise2D', function() { it('should return the same value for the same input', function() { assert.equal(noise(0.1, 0.2), noise(0.1, 0.2)); @@ -35,7 +57,7 @@ describe('SimplexNoise', function() { assert.notEqual(noise(0.1, 0.2), noise(0.101, 0.202)); }); it('should return a different output with a different seed', function() { - assert.notEqual(noise(0.1, 0.2), noise2(0.1, 0.2)); + assert.notEqual(noiseA(0.1, 0.2), noiseB(0.1, 0.2)); }); it('should return values between -1 and 1', function() { for (var x = 0; x < 10; x++) { @@ -59,7 +81,7 @@ describe('SimplexNoise', function() { assert.notEqual(noise(0.1, 0.2, 0.3), noise(0.1, 0.2, 0.303)); }); it('should return a different output with a different seed', function() { - assert.notEqual(noise(0.1, 0.2, 0.3), noise2(0.1, 0.2, 0.3)); + assert.notEqual(noiseA(0.1, 0.2, 0.3), noiseB(0.1, 0.2, 0.3)); }); it('should return values between -1 and 1', function() { for (var x = 0; x < 10; x++) { @@ -83,7 +105,7 @@ describe('SimplexNoise', function() { assert.notEqual(noise(0.1, 0.2, 0.3, 0.4), noise(0.1, 0.2, 0.3, 0.404)); }); it('should return a different output with a different seed', function() { - assert.notEqual(noise(0.1, 0.2, 0.3, 0.4), noise2(0.1, 0.2, 0.3, 0.4)); + assert.notEqual(noiseA(0.1, 0.2, 0.3, 0.4), noiseB(0.1, 0.2, 0.3, 0.4)); }); it('should return values between -1 and 1', function() { for (var x = 0; x < 10; x++) { From 4e66eaece16965ad2ae7230ba5170270046b092f Mon Sep 17 00:00:00 2001 From: Brandon Semilla Date: Mon, 12 Mar 2018 21:28:51 -0700 Subject: [PATCH 06/13] update README --- README.md | 31 +++++++++---------------------- 1 file changed, 9 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 565b00a..d1040e0 100644 --- a/README.md +++ b/README.md @@ -11,26 +11,13 @@ simplex-noise.js is a fast simplex noise implementation in Javascript. It works ## Usage -By default simplex-noise.js will use Math.random() to seed the noise. ```javascript // initializing a new simplex instance // do this only once as it is relatively expensive -var simplex = new SimplexNoise(), - value2d = simplex.noise2D(x, y), - value3d = simplex.noise3D(x, y, z), - value4d = simplex.noise4D(x, y, z, w); -``` - -You can also pass in a seed string which will then be used to initialize -the noise using the built in alea PRNG. -```javascript -var simplex = new SimplexNoise('seed'), - value2d = simplex.noise2D(x, y), - sameSeed = new SimplexNoise('seed'), - differentSeed = new SimplexNoise('different seed'); - -sameSeed.noise2D(x, y) === value2d -differentSeed.noise2D(x, y) !== value2d +var noise = simplex(Math.random), + value2d = noise(x, y), + value3d = noise(x, y, z), + value4d = noise(x, y, z, w); ``` You can also pass an alternative random function to the constructor that is @@ -39,8 +26,8 @@ This can be used with a custom pseudo random number generator: ```javascript var random = new Alea(seed), - simplex = new SimplexNoise(random), - value2d = simplex.noise2D(x, y); + noise = simplex(random), + value = noise(x, y); ``` The ALEA PRNG can be found on in the npm package [alea](https://npmjs.org/package/alea). @@ -50,9 +37,9 @@ The ALEA PRNG can be found on in the npm package [alea](https://npmjs.org/packag Node.js is also supported, you can install the package using [npm](https://npmjs.org/package/simplex-noise). ```javascript -var SimplexNoise = require('simplex-noise'), - simplex = new SimplexNoise(Math.random), - value2d = simplex.noise2D(x, y); +var simplex = require('simplex-noise'), + noise = simplex(Math.random), + value = noise(x, y); ``` ## Benchmarks From d89b6ab9527f4350dc4f3b9e8aed2bd6e699aaf8 Mon Sep 17 00:00:00 2001 From: Brandon Semilla Date: Mon, 12 Mar 2018 21:31:03 -0700 Subject: [PATCH 07/13] update changelog --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index d1040e0..0e486c8 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,10 @@ npm install && npm test ## Changelog +### 3.0.0 +- Change function signature to `simplex(random)(x[, y, z, w]) -> noise` +- Add support for 1D noise + ### 2.4.0 - Included a PRNG based on ALEA to directly allow seeding - Included typescript definitions From 0f88e38ff26c2642611c40988976dd540775392f Mon Sep 17 00:00:00 2001 From: Brandon Semilla Date: Mon, 12 Mar 2018 21:31:41 -0700 Subject: [PATCH 08/13] v3.0.0 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index b768e68..420b469 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "simplex-noise", - "version": "2.4.0", + "version": "3.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 8225a8f..845650c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "simplex-noise", - "version": "2.4.0", + "version": "3.0.0", "description": "simplex-noise is a fast simplex noise implementation in Javascript. Works in node and in the browser.", "homepage": "https://github.com/jwagner/simplex-noise.js", "author": "Jonas Wagner (http://29a.ch/)", From 4f8e6316b518bfc56e5fef1476d9cbe0dc80fd41 Mon Sep 17 00:00:00 2001 From: Brandon Semilla Date: Mon, 12 Mar 2018 21:34:47 -0700 Subject: [PATCH 09/13] clear cache --- shrinkwrap.yaml | 1378 ----------------------------------------------- 1 file changed, 1378 deletions(-) delete mode 100644 shrinkwrap.yaml diff --git a/shrinkwrap.yaml b/shrinkwrap.yaml deleted file mode 100644 index c38e581..0000000 --- a/shrinkwrap.yaml +++ /dev/null @@ -1,1378 +0,0 @@ -devDependencies: - alea: 0.0.9 - benchmark: 2.1.4 - chai: 4.1.2 - eslint: 4.18.2 - eslint-config-standard: 11.0.0 - eslint-plugin-import: 2.9.0 - eslint-plugin-node: 6.0.1 - eslint-plugin-promise: 3.7.0 - eslint-plugin-standard: 3.0.1 - mocha: 5.0.4 -packages: - /acorn-jsx/3.0.1: - dependencies: - acorn: 3.3.0 - dev: true - resolution: - integrity: sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s= - /acorn/3.3.0: - dev: true - engines: - node: '>=0.4.0' - resolution: - integrity: sha1-ReN/s56No/JbruP/U2niu18iAXo= - /acorn/5.5.3: - dev: true - engines: - node: '>=0.4.0' - resolution: - integrity: sha512-jd5MkIUlbbmb07nXH0DT3y7rDVtkzDi4XZOUVWAer8ajmF/DTSSbl5oNFyDOl/OXA33Bl79+ypHhl2pN20VeOQ== - /ajv-keywords/2.1.1/ajv@5.5.2: - dependencies: - ajv: 5.5.2 - dev: true - id: registry.npmjs.org/ajv-keywords/2.1.1 - peerDependencies: - ajv: ^5.0.0 - resolution: - integrity: sha1-YXmX/F9gV2iUxDX5QNgZ4TW4B2I= - /ajv/5.5.2: - dependencies: - co: 4.6.0 - fast-deep-equal: 1.1.0 - fast-json-stable-stringify: 2.0.0 - json-schema-traverse: 0.3.1 - dev: true - resolution: - integrity: sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU= - /alea/0.0.9: - dev: true - resolution: - integrity: sha1-9zjLRfg0MAafRc9pzL8xLdV6nho= - /ansi-escapes/3.0.0: - dev: true - engines: - node: '>=4' - resolution: - integrity: sha512-O/klc27mWNUigtv0F8NJWbLF00OcegQalkqKURWdosW08YZKi4m6CnSUSvIZG1otNJbTWhN01Hhz389DW7mvDQ== - /ansi-regex/2.1.1: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-w7M6te42DYbg5ijwRorn7yfWVN8= - /ansi-regex/3.0.0: - dev: true - engines: - node: '>=4' - resolution: - integrity: sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= - /ansi-styles/2.2.1: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= - /ansi-styles/3.2.1: - dependencies: - color-convert: 1.9.1 - dev: true - engines: - node: '>=4' - resolution: - integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== - /argparse/1.0.10: - dependencies: - sprintf-js: 1.0.3 - dev: true - resolution: - integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== - /array-union/1.0.2: - dependencies: - array-uniq: 1.0.3 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk= - /array-uniq/1.0.3: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-r2rId6Jcx/dOBYiUdThY39sk/bY= - /arrify/1.0.1: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0= - /assertion-error/1.1.0: - dev: true - resolution: - integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== - /babel-code-frame/6.26.0: - dependencies: - chalk: 1.1.3 - esutils: 2.0.2 - js-tokens: 3.0.2 - dev: true - resolution: - integrity: sha1-Y/1D99weO7fONZR9uP42mj9Yx0s= - /balanced-match/1.0.0: - dev: true - resolution: - integrity: sha1-ibTRmasr7kneFk6gK4nORi1xt2c= - /benchmark/2.1.4: - dependencies: - lodash: 4.17.5 - platform: 1.3.5 - dev: true - resolution: - integrity: sha1-CfPeMckWQl1JjMLuVloOvzwqVik= - /brace-expansion/1.1.11: - dependencies: - balanced-match: 1.0.0 - concat-map: 0.0.1 - dev: true - resolution: - integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - /browser-stdout/1.3.1: - dev: true - resolution: - integrity: sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== - /builtin-modules/1.1.1: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8= - /caller-path/0.1.0: - dependencies: - callsites: 0.2.0 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8= - /callsites/0.2.0: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo= - /chai/4.1.2: - dependencies: - assertion-error: 1.1.0 - check-error: 1.0.2 - deep-eql: 3.0.1 - get-func-name: 2.0.0 - pathval: 1.1.0 - type-detect: 4.0.8 - dev: true - engines: - node: '>=4' - resolution: - integrity: sha1-D2RYS6ZC8PKs4oBiefTwbKI61zw= - /chalk/1.1.3: - dependencies: - ansi-styles: 2.2.1 - escape-string-regexp: 1.0.5 - has-ansi: 2.0.0 - strip-ansi: 3.0.1 - supports-color: 2.0.0 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= - /chalk/2.3.2: - dependencies: - ansi-styles: 3.2.1 - escape-string-regexp: 1.0.5 - supports-color: 5.3.0 - dev: true - engines: - node: '>=4' - resolution: - integrity: sha512-ZM4j2/ld/YZDc3Ma8PgN7gyAk+kHMMMyzLNryCPGhWrsfAuDVeuid5bpRFTDgMH9JBK2lA4dyyAkkZYF/WcqDQ== - /chardet/0.4.2: - dev: true - resolution: - integrity: sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I= - /check-error/1.0.2: - dev: true - resolution: - integrity: sha1-V00xLt2Iu13YkS6Sht1sCu1KrII= - /circular-json/0.3.3: - dev: true - resolution: - integrity: sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A== - /cli-cursor/2.1.0: - dependencies: - restore-cursor: 2.0.0 - dev: true - engines: - node: '>=4' - resolution: - integrity: sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU= - /cli-width/2.2.0: - dev: true - resolution: - integrity: sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk= - /co/4.6.0: - dev: true - engines: - iojs: '>= 1.0.0' - node: '>= 0.12.0' - resolution: - integrity: sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ= - /color-convert/1.9.1: - dependencies: - color-name: 1.1.3 - dev: true - resolution: - integrity: sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ== - /color-name/1.1.3: - dev: true - resolution: - integrity: sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= - /commander/2.11.0: - dev: true - resolution: - integrity: sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ== - /concat-map/0.0.1: - dev: true - resolution: - integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= - /concat-stream/1.6.1: - dependencies: - inherits: 2.0.3 - readable-stream: 2.3.5 - typedarray: 0.0.6 - dev: true - engines: - '0': node >= 0.8 - resolution: - integrity: sha512-gslSSJx03QKa59cIKqeJO9HQ/WZMotvYJCuaUULrLpjj8oG40kV2Z+gz82pVxlTkOADi4PJxQPPfhl1ELYrrXw== - /contains-path/0.1.0: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo= - /core-util-is/1.0.2: - dev: true - resolution: - integrity: sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= - /cross-spawn/5.1.0: - dependencies: - lru-cache: 4.1.2 - shebang-command: 1.2.0 - which: 1.3.0 - dev: true - resolution: - integrity: sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk= - /debug/2.6.9: - dependencies: - ms: 2.0.0 - dev: true - resolution: - integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - /debug/3.1.0: - dependencies: - ms: 2.0.0 - dev: true - resolution: - integrity: sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== - /deep-eql/3.0.1: - dependencies: - type-detect: 4.0.8 - dev: true - engines: - node: '>=0.12' - resolution: - integrity: sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw== - /deep-is/0.1.3: - dev: true - resolution: - integrity: sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= - /del/2.2.2: - dependencies: - globby: 5.0.0 - is-path-cwd: 1.0.0 - is-path-in-cwd: 1.0.0 - object-assign: 4.1.1 - pify: 2.3.0 - pinkie-promise: 2.0.1 - rimraf: 2.6.2 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag= - /diff/3.5.0: - dev: true - engines: - node: '>=0.3.1' - resolution: - integrity: sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== - /doctrine/1.5.0: - dependencies: - esutils: 2.0.2 - isarray: 1.0.0 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-N53Ocw9hZvds76TmcHoVmwLFpvo= - /doctrine/2.1.0: - dependencies: - esutils: 2.0.2 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw== - /error-ex/1.3.1: - dependencies: - is-arrayish: 0.2.1 - dev: true - resolution: - integrity: sha1-+FWobOYa3E6GIcPNoh56dhLDqNw= - /escape-string-regexp/1.0.5: - dev: true - engines: - node: '>=0.8.0' - resolution: - integrity: sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= - /eslint-config-standard/11.0.0: - dev: true - peerDependencies: - eslint: '>=4.18.0' - eslint-plugin-import: '>=2.8.0' - eslint-plugin-node: '>=5.2.1' - eslint-plugin-promise: '>=3.6.0' - eslint-plugin-standard: '>=3.0.1' - resolution: - integrity: sha512-oDdENzpViEe5fwuRCWla7AXQd++/oyIp8zP+iP9jiUPG6NBj3SHgdgtl/kTn00AjeN+1HNvavTKmYbMo+xMOlw== - /eslint-import-resolver-node/0.3.2: - dependencies: - debug: 2.6.9 - resolve: 1.5.0 - dev: true - resolution: - integrity: sha512-sfmTqJfPSizWu4aymbPr4Iidp5yKm8yDkHp+Ir3YiTHiiDfxh69mOUsmiqW6RZ9zRXFaF64GtYmN7e+8GHBv6Q== - /eslint-module-utils/2.1.1: - dependencies: - debug: 2.6.9 - pkg-dir: 1.0.0 - dev: true - engines: - node: '>=4' - resolution: - integrity: sha512-jDI/X5l/6D1rRD/3T43q8Qgbls2nq5km5KSqiwlyUbGo5+04fXhMKdCPhjwbqAa6HXWaMxj8Q4hQDIh7IadJQw== - /eslint-plugin-import/2.9.0: - dependencies: - builtin-modules: 1.1.1 - contains-path: 0.1.0 - debug: 2.6.9 - doctrine: 1.5.0 - eslint-import-resolver-node: 0.3.2 - eslint-module-utils: 2.1.1 - has: 1.0.1 - lodash: 4.17.5 - minimatch: 3.0.4 - read-pkg-up: 2.0.0 - dev: true - engines: - node: '>=4' - peerDependencies: - eslint: 2.x - 4.x - resolution: - integrity: sha1-JgAu+/ylmJtyiKwEdQi9JPIXsWk= - /eslint-plugin-node/6.0.1: - dependencies: - ignore: 3.3.7 - minimatch: 3.0.4 - resolve: 1.5.0 - semver: 5.5.0 - dev: true - engines: - node: '>=4' - peerDependencies: - eslint: '>=3.1.0' - resolution: - integrity: sha512-Q/Cc2sW1OAISDS+Ji6lZS2KV4b7ueA/WydVWd1BECTQwVvfQy5JAi3glhINoKzoMnfnuRgNP+ZWKrGAbp3QDxw== - /eslint-plugin-promise/3.7.0: - dev: true - engines: - node: '>=4' - resolution: - integrity: sha512-2WO+ZFh7vxUKRfR0cOIMrWgYKdR6S1AlOezw6pC52B6oYpd5WFghN+QHxvrRdZMtbo8h3dfUZ2o1rWb0UPbKtg== - /eslint-plugin-standard/3.0.1: - dev: true - peerDependencies: - eslint: '>=3.19.0' - resolution: - integrity: sha1-NNDJFbRe3G8BA5PH7vOCOwhWXPI= - /eslint-scope/3.7.1: - dependencies: - esrecurse: 4.2.1 - estraverse: 4.2.0 - dev: true - engines: - node: '>=4.0.0' - resolution: - integrity: sha1-PWPD7f2gLgbgGkUq2IyqzHzctug= - /eslint-visitor-keys/1.0.0: - dev: true - engines: - node: '>=4' - resolution: - integrity: sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ== - /eslint/4.18.2: - dependencies: - ajv: 5.5.2 - babel-code-frame: 6.26.0 - chalk: 2.3.2 - concat-stream: 1.6.1 - cross-spawn: 5.1.0 - debug: 3.1.0 - doctrine: 2.1.0 - eslint-scope: 3.7.1 - eslint-visitor-keys: 1.0.0 - espree: 3.5.4 - esquery: 1.0.0 - esutils: 2.0.2 - file-entry-cache: 2.0.0 - functional-red-black-tree: 1.0.1 - glob: 7.1.2 - globals: 11.3.0 - ignore: 3.3.7 - imurmurhash: 0.1.4 - inquirer: 3.3.0 - is-resolvable: 1.1.0 - js-yaml: 3.11.0 - json-stable-stringify-without-jsonify: 1.0.1 - levn: 0.3.0 - lodash: 4.17.5 - minimatch: 3.0.4 - mkdirp: 0.5.1 - natural-compare: 1.4.0 - optionator: 0.8.2 - path-is-inside: 1.0.2 - pluralize: 7.0.0 - progress: 2.0.0 - require-uncached: 1.0.3 - semver: 5.5.0 - strip-ansi: 4.0.0 - strip-json-comments: 2.0.1 - table: 4.0.2 - text-table: 0.2.0 - dev: true - engines: - node: '>=4' - resolution: - integrity: sha512-qy4i3wODqKMYfz9LUI8N2qYDkHkoieTbiHpMrYUI/WbjhXJQr7lI4VngixTgaG+yHX+NBCv7nW4hA0ShbvaNKw== - /espree/3.5.4: - dependencies: - acorn: 5.5.3 - acorn-jsx: 3.0.1 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha512-yAcIQxtmMiB/jL32dzEp2enBeidsB7xWPLNiw3IIkpVds1P+h7qF9YwJq1yUNzp2OKXgAprs4F61ih66UsoD1A== - /esprima/4.0.0: - dev: true - engines: - node: '>=4' - resolution: - integrity: sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw== - /esquery/1.0.0: - dependencies: - estraverse: 4.2.0 - dev: true - engines: - node: '>=0.6' - resolution: - integrity: sha1-z7qLV9f7qT8XKYqKAGoEzaE9gPo= - /esrecurse/4.2.1: - dependencies: - estraverse: 4.2.0 - dev: true - engines: - node: '>=4.0' - resolution: - integrity: sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ== - /estraverse/4.2.0: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-De4/7TH81GlhjOc0IJn8GvoL2xM= - /esutils/2.0.2: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs= - /external-editor/2.1.0: - dependencies: - chardet: 0.4.2 - iconv-lite: 0.4.19 - tmp: 0.0.33 - dev: true - engines: - node: '>=0.12' - resolution: - integrity: sha512-E44iT5QVOUJBKij4IIV3uvxuNlbKS38Tw1HiupxEIHPv9qtC2PrDYohbXV5U+1jnfIXttny8gUhj+oZvflFlzA== - /fast-deep-equal/1.1.0: - dev: true - resolution: - integrity: sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ= - /fast-json-stable-stringify/2.0.0: - dev: true - resolution: - integrity: sha1-1RQsDK7msRifh9OnYREGT4bIu/I= - /fast-levenshtein/2.0.6: - dev: true - resolution: - integrity: sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= - /figures/2.0.0: - dependencies: - escape-string-regexp: 1.0.5 - dev: true - engines: - node: '>=4' - resolution: - integrity: sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI= - /file-entry-cache/2.0.0: - dependencies: - flat-cache: 1.3.0 - object-assign: 4.1.1 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E= - /find-up/1.1.2: - dependencies: - path-exists: 2.1.0 - pinkie-promise: 2.0.1 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8= - /find-up/2.1.0: - dependencies: - locate-path: 2.0.0 - dev: true - engines: - node: '>=4' - resolution: - integrity: sha1-RdG35QbHF93UgndaK3eSCjwMV6c= - /flat-cache/1.3.0: - dependencies: - circular-json: 0.3.3 - del: 2.2.2 - graceful-fs: 4.1.11 - write: 0.2.1 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE= - /fs.realpath/1.0.0: - dev: true - resolution: - integrity: sha1-FQStJSMVjKpA20onh8sBQRmU6k8= - /function-bind/1.1.1: - dev: true - resolution: - integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== - /functional-red-black-tree/1.0.1: - dev: true - resolution: - integrity: sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= - /get-func-name/2.0.0: - dev: true - resolution: - integrity: sha1-6td0q+5y4gQJQzoGY2YCPdaIekE= - /glob/7.1.2: - dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.3 - minimatch: 3.0.4 - once: 1.4.0 - path-is-absolute: 1.0.1 - dev: true - resolution: - integrity: sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ== - /globals/11.3.0: - dev: true - engines: - node: '>=4' - resolution: - integrity: sha512-kkpcKNlmQan9Z5ZmgqKH/SMbSmjxQ7QjyNqfXVc8VJcoBV2UEg+sxQD15GQofGRh2hfpwUb70VC31DR7Rq5Hdw== - /globby/5.0.0: - dependencies: - array-union: 1.0.2 - arrify: 1.0.1 - glob: 7.1.2 - object-assign: 4.1.1 - pify: 2.3.0 - pinkie-promise: 2.0.1 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0= - /graceful-fs/4.1.11: - dev: true - engines: - node: '>=0.4.0' - resolution: - integrity: sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg= - /growl/1.10.3: - dev: true - engines: - node: '>=4.x' - resolution: - integrity: sha512-hKlsbA5Vu3xsh1Cg3J7jSmX/WaW6A5oBeqzM88oNbCRQFz+zUaXm6yxS4RVytp1scBoJzSYl4YAEOQIt6O8V1Q== - /has-ansi/2.0.0: - dependencies: - ansi-regex: 2.1.1 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE= - /has-flag/2.0.0: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-6CB68cx7MNRGzHC3NLXovhj4jVE= - /has-flag/3.0.0: - dev: true - engines: - node: '>=4' - resolution: - integrity: sha1-tdRU3CGZriJWmfNGfloH87lVuv0= - /has/1.0.1: - dependencies: - function-bind: 1.1.1 - dev: true - engines: - node: '>= 0.8.0' - resolution: - integrity: sha1-hGFzP1OLCDfJNh45qauelwTcLyg= - /he/1.1.1: - dev: true - resolution: - integrity: sha1-k0EP0hsAlzUVH4howvJx80J+I/0= - /hosted-git-info/2.6.0: - dev: true - engines: - node: '>=4' - resolution: - integrity: sha512-lIbgIIQA3lz5XaB6vxakj6sDHADJiZadYEJB+FgA+C4nubM1NwcuvUr9EJPmnH1skZqpqUzWborWo8EIUi0Sdw== - /iconv-lite/0.4.19: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ== - /ignore/3.3.7: - dev: true - resolution: - integrity: sha512-YGG3ejvBNHRqu0559EOxxNFihD0AjpvHlC/pdGKd3X3ofe+CoJkYazwNJYTNebqpPKN+VVQbh4ZFn1DivMNuHA== - /imurmurhash/0.1.4: - dev: true - engines: - node: '>=0.8.19' - resolution: - integrity: sha1-khi5srkoojixPcT7a21XbyMUU+o= - /inflight/1.0.6: - dependencies: - once: 1.4.0 - wrappy: 1.0.2 - dev: true - resolution: - integrity: sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= - /inherits/2.0.3: - dev: true - resolution: - integrity: sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= - /inquirer/3.3.0: - dependencies: - ansi-escapes: 3.0.0 - chalk: 2.3.2 - cli-cursor: 2.1.0 - cli-width: 2.2.0 - external-editor: 2.1.0 - figures: 2.0.0 - lodash: 4.17.5 - mute-stream: 0.0.7 - run-async: 2.3.0 - rx-lite: 4.0.8 - rx-lite-aggregates: 4.0.8 - string-width: 2.1.1 - strip-ansi: 4.0.0 - through: 2.3.8 - dev: true - resolution: - integrity: sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ== - /is-arrayish/0.2.1: - dev: true - resolution: - integrity: sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= - /is-builtin-module/1.0.0: - dependencies: - builtin-modules: 1.1.1 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-VAVy0096wxGfj3bDDLwbHgN6/74= - /is-fullwidth-code-point/2.0.0: - dev: true - engines: - node: '>=4' - resolution: - integrity: sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= - /is-path-cwd/1.0.0: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0= - /is-path-in-cwd/1.0.0: - dependencies: - is-path-inside: 1.0.1 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-ZHdYK4IU1gI0YJRWcAO+ip6sBNw= - /is-path-inside/1.0.1: - dependencies: - path-is-inside: 1.0.2 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-jvW33lBDej/cprToZe96pVy0gDY= - /is-promise/2.1.0: - dev: true - resolution: - integrity: sha1-eaKp7OfwlugPNtKy87wWwf9L8/o= - /is-resolvable/1.1.0: - dev: true - resolution: - integrity: sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg== - /isarray/1.0.0: - dev: true - resolution: - integrity: sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= - /isexe/2.0.0: - dev: true - resolution: - integrity: sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= - /js-tokens/3.0.2: - dev: true - resolution: - integrity: sha1-mGbfOVECEw449/mWvOtlRDIJwls= - /js-yaml/3.11.0: - dependencies: - argparse: 1.0.10 - esprima: 4.0.0 - dev: true - resolution: - integrity: sha512-saJstZWv7oNeOyBh3+Dx1qWzhW0+e6/8eDzo7p5rDFqxntSztloLtuKu+Ejhtq82jsilwOIZYsCz+lIjthg1Hw== - /json-schema-traverse/0.3.1: - dev: true - resolution: - integrity: sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A= - /json-stable-stringify-without-jsonify/1.0.1: - dev: true - resolution: - integrity: sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= - /levn/0.3.0: - dependencies: - prelude-ls: 1.1.2 - type-check: 0.3.2 - dev: true - engines: - node: '>= 0.8.0' - resolution: - integrity: sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= - /load-json-file/2.0.0: - dependencies: - graceful-fs: 4.1.11 - parse-json: 2.2.0 - pify: 2.3.0 - strip-bom: 3.0.0 - dev: true - engines: - node: '>=4' - resolution: - integrity: sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg= - /locate-path/2.0.0: - dependencies: - p-locate: 2.0.0 - path-exists: 3.0.0 - dev: true - engines: - node: '>=4' - resolution: - integrity: sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= - /lodash/4.17.5: - dev: true - resolution: - integrity: sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw== - /lru-cache/4.1.2: - dependencies: - pseudomap: 1.0.2 - yallist: 2.1.2 - dev: true - resolution: - integrity: sha512-wgeVXhrDwAWnIF/yZARsFnMBtdFXOg1b8RIrhilp+0iDYN4mdQcNZElDZ0e4B64BhaxeQ5zN7PMyvu7we1kPeQ== - /mimic-fn/1.2.0: - dev: true - engines: - node: '>=4' - resolution: - integrity: sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== - /minimatch/3.0.4: - dependencies: - brace-expansion: 1.1.11 - dev: true - resolution: - integrity: sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== - /minimist/0.0.8: - dev: true - resolution: - integrity: sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= - /mkdirp/0.5.1: - dependencies: - minimist: 0.0.8 - dev: true - resolution: - integrity: sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= - /mocha/5.0.4: - dependencies: - browser-stdout: 1.3.1 - commander: 2.11.0 - debug: 3.1.0 - diff: 3.5.0 - escape-string-regexp: 1.0.5 - glob: 7.1.2 - growl: 1.10.3 - he: 1.1.1 - mkdirp: 0.5.1 - supports-color: 4.4.0 - dev: true - engines: - node: '>= 4.0.0' - resolution: - integrity: sha512-nMOpAPFosU1B4Ix1jdhx5e3q7XO55ic5a8cgYvW27CequcEY+BabS0kUVL1Cw1V5PuVHZWeNRWFLmEPexo79VA== - /ms/2.0.0: - dev: true - resolution: - integrity: sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= - /mute-stream/0.0.7: - dev: true - resolution: - integrity: sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= - /natural-compare/1.4.0: - dev: true - resolution: - integrity: sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= - /normalize-package-data/2.4.0: - dependencies: - hosted-git-info: 2.6.0 - is-builtin-module: 1.0.0 - semver: 5.5.0 - validate-npm-package-license: 3.0.3 - dev: true - resolution: - integrity: sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw== - /object-assign/4.1.1: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= - /once/1.4.0: - dependencies: - wrappy: 1.0.2 - dev: true - resolution: - integrity: sha1-WDsap3WWHUsROsF9nFC6753Xa9E= - /onetime/2.0.1: - dependencies: - mimic-fn: 1.2.0 - dev: true - engines: - node: '>=4' - resolution: - integrity: sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ= - /optionator/0.8.2: - dependencies: - deep-is: 0.1.3 - fast-levenshtein: 2.0.6 - levn: 0.3.0 - prelude-ls: 1.1.2 - type-check: 0.3.2 - wordwrap: 1.0.0 - dev: true - engines: - node: '>= 0.8.0' - resolution: - integrity: sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q= - /os-tmpdir/1.0.2: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= - /p-limit/1.2.0: - dependencies: - p-try: 1.0.0 - dev: true - engines: - node: '>=4' - resolution: - integrity: sha512-Y/OtIaXtUPr4/YpMv1pCL5L5ed0rumAaAeBSj12F+bSlMdys7i8oQF/GUJmfpTS/QoaRrS/k6pma29haJpsMng== - /p-locate/2.0.0: - dependencies: - p-limit: 1.2.0 - dev: true - engines: - node: '>=4' - resolution: - integrity: sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= - /p-try/1.0.0: - dev: true - engines: - node: '>=4' - resolution: - integrity: sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= - /parse-json/2.2.0: - dependencies: - error-ex: 1.3.1 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-9ID0BDTvgHQfhGkJn43qGPVaTck= - /path-exists/2.1.0: - dependencies: - pinkie-promise: 2.0.1 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-D+tsZPD8UY2adU3V77YscCJ2H0s= - /path-exists/3.0.0: - dev: true - engines: - node: '>=4' - resolution: - integrity: sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= - /path-is-absolute/1.0.1: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-F0uSaHNVNP+8es5r9TpanhtcX18= - /path-is-inside/1.0.2: - dev: true - resolution: - integrity: sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM= - /path-parse/1.0.5: - dev: true - resolution: - integrity: sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME= - /path-type/2.0.0: - dependencies: - pify: 2.3.0 - dev: true - engines: - node: '>=4' - resolution: - integrity: sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM= - /pathval/1.1.0: - dev: true - resolution: - integrity: sha1-uULm1L3mUwBe9rcTYd74cn0GReA= - /pify/2.3.0: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-7RQaasBDqEnqWISY59yosVMw6Qw= - /pinkie-promise/2.0.1: - dependencies: - pinkie: 2.0.4 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-ITXW36ejWMBprJsXh3YogihFD/o= - /pinkie/2.0.4: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-clVrgM+g1IqXToDnckjoDtT3+HA= - /pkg-dir/1.0.0: - dependencies: - find-up: 1.1.2 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-ektQio1bstYp1EcFb/TpyTFM89Q= - /platform/1.3.5: - dev: true - resolution: - integrity: sha512-TuvHS8AOIZNAlE77WUDiR4rySV/VMptyMfcfeoMgs4P8apaZM3JrnbzBiixKUv+XR6i+BXrQh8WAnjaSPFO65Q== - /pluralize/7.0.0: - dev: true - engines: - node: '>=4' - resolution: - integrity: sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow== - /prelude-ls/1.1.2: - dev: true - engines: - node: '>= 0.8.0' - resolution: - integrity: sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= - /process-nextick-args/2.0.0: - dev: true - resolution: - integrity: sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw== - /progress/2.0.0: - dev: true - engines: - node: '>=0.4.0' - resolution: - integrity: sha1-ihvjZr+Pwj2yvSPxDG/pILQ4nR8= - /pseudomap/1.0.2: - dev: true - resolution: - integrity: sha1-8FKijacOYYkX7wqKw0wa5aaChrM= - /read-pkg-up/2.0.0: - dependencies: - find-up: 2.1.0 - read-pkg: 2.0.0 - dev: true - engines: - node: '>=4' - resolution: - integrity: sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4= - /read-pkg/2.0.0: - dependencies: - load-json-file: 2.0.0 - normalize-package-data: 2.4.0 - path-type: 2.0.0 - dev: true - engines: - node: '>=4' - resolution: - integrity: sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg= - /readable-stream/2.3.5: - dependencies: - core-util-is: 1.0.2 - inherits: 2.0.3 - isarray: 1.0.0 - process-nextick-args: 2.0.0 - safe-buffer: 5.1.1 - string_decoder: 1.0.3 - util-deprecate: 1.0.2 - dev: true - resolution: - integrity: sha512-tK0yDhrkygt/knjowCUiWP9YdV7c5R+8cR0r/kt9ZhBU906Fs6RpQJCEilamRJj1Nx2rWI6LkW9gKqjTkshhEw== - /require-uncached/1.0.3: - dependencies: - caller-path: 0.1.0 - resolve-from: 1.0.1 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM= - /resolve-from/1.0.1: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY= - /resolve/1.5.0: - dependencies: - path-parse: 1.0.5 - dev: true - resolution: - integrity: sha512-hgoSGrc3pjzAPHNBg+KnFcK2HwlHTs/YrAGUr6qgTVUZmXv1UEXXl0bZNBKMA9fud6lRYFdPGz0xXxycPzmmiw== - /restore-cursor/2.0.0: - dependencies: - onetime: 2.0.1 - signal-exit: 3.0.2 - dev: true - engines: - node: '>=4' - resolution: - integrity: sha1-n37ih/gv0ybU/RYpI9YhKe7g368= - /rimraf/2.6.2: - dependencies: - glob: 7.1.2 - dev: true - resolution: - integrity: sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w== - /run-async/2.3.0: - dependencies: - is-promise: 2.1.0 - dev: true - engines: - node: '>=0.12.0' - resolution: - integrity: sha1-A3GrSuC91yDUFm19/aZP96RFpsA= - /rx-lite-aggregates/4.0.8: - dependencies: - rx-lite: 4.0.8 - dev: true - resolution: - integrity: sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74= - /rx-lite/4.0.8: - dev: true - resolution: - integrity: sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ= - /safe-buffer/5.1.1: - dev: true - resolution: - integrity: sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg== - /semver/5.5.0: - dev: true - resolution: - integrity: sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA== - /shebang-command/1.2.0: - dependencies: - shebang-regex: 1.0.0 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= - /shebang-regex/1.0.0: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= - /signal-exit/3.0.2: - dev: true - resolution: - integrity: sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0= - /slice-ansi/1.0.0: - dependencies: - is-fullwidth-code-point: 2.0.0 - dev: true - engines: - node: '>=4' - resolution: - integrity: sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg== - /spdx-correct/3.0.0: - dependencies: - spdx-expression-parse: 3.0.0 - spdx-license-ids: 3.0.0 - dev: true - resolution: - integrity: sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g== - /spdx-exceptions/2.1.0: - dev: true - resolution: - integrity: sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg== - /spdx-expression-parse/3.0.0: - dependencies: - spdx-exceptions: 2.1.0 - spdx-license-ids: 3.0.0 - dev: true - resolution: - integrity: sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg== - /spdx-license-ids/3.0.0: - dev: true - resolution: - integrity: sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA== - /sprintf-js/1.0.3: - dev: true - resolution: - integrity: sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= - /string-width/2.1.1: - dependencies: - is-fullwidth-code-point: 2.0.0 - strip-ansi: 4.0.0 - dev: true - engines: - node: '>=4' - resolution: - integrity: sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== - /string_decoder/1.0.3: - dependencies: - safe-buffer: 5.1.1 - dev: true - resolution: - integrity: sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ== - /strip-ansi/3.0.1: - dependencies: - ansi-regex: 2.1.1 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= - /strip-ansi/4.0.0: - dependencies: - ansi-regex: 3.0.0 - dev: true - engines: - node: '>=4' - resolution: - integrity: sha1-qEeQIusaw2iocTibY1JixQXuNo8= - /strip-bom/3.0.0: - dev: true - engines: - node: '>=4' - resolution: - integrity: sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= - /strip-json-comments/2.0.1: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-PFMZQukIwml8DsNEhYwobHygpgo= - /supports-color/2.0.0: - dev: true - engines: - node: '>=0.8.0' - resolution: - integrity: sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= - /supports-color/4.4.0: - dependencies: - has-flag: 2.0.0 - dev: true - engines: - node: '>=4' - resolution: - integrity: sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ== - /supports-color/5.3.0: - dependencies: - has-flag: 3.0.0 - dev: true - engines: - node: '>=4' - resolution: - integrity: sha512-0aP01LLIskjKs3lq52EC0aGBAJhLq7B2Rd8HC/DR/PtNNpcLilNmHC12O+hu0usQpo7wtHNRqtrhBwtDb0+dNg== - /table/4.0.2: - dependencies: - ajv: 5.5.2 - ajv-keywords: /ajv-keywords/2.1.1/ajv@5.5.2 - chalk: 2.3.2 - lodash: 4.17.5 - slice-ansi: 1.0.0 - string-width: 2.1.1 - dev: true - resolution: - integrity: sha512-UUkEAPdSGxtRpiV9ozJ5cMTtYiqz7Ni1OGqLXRCynrvzdtR1p+cfOWe2RJLwvUG8hNanaSRjecIqwOjqeatDsA== - /text-table/0.2.0: - dev: true - resolution: - integrity: sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= - /through/2.3.8: - dev: true - resolution: - integrity: sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= - /tmp/0.0.33: - dependencies: - os-tmpdir: 1.0.2 - dev: true - engines: - node: '>=0.6.0' - resolution: - integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== - /type-check/0.3.2: - dependencies: - prelude-ls: 1.1.2 - dev: true - engines: - node: '>= 0.8.0' - resolution: - integrity: sha1-WITKtRLPHTVeP7eE8wgEsrUg23I= - /type-detect/4.0.8: - dev: true - engines: - node: '>=4' - resolution: - integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== - /typedarray/0.0.6: - dev: true - resolution: - integrity: sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= - /util-deprecate/1.0.2: - dev: true - resolution: - integrity: sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= - /validate-npm-package-license/3.0.3: - dependencies: - spdx-correct: 3.0.0 - spdx-expression-parse: 3.0.0 - dev: true - resolution: - integrity: sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g== - /which/1.3.0: - dependencies: - isexe: 2.0.0 - dev: true - resolution: - integrity: sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg== - /wordwrap/1.0.0: - dev: true - resolution: - integrity: sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= - /wrappy/1.0.2: - dev: true - resolution: - integrity: sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= - /write/0.2.1: - dependencies: - mkdirp: 0.5.1 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c= - /yallist/2.1.2: - dev: true - resolution: - integrity: sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= -registry: 'https://registry.npmjs.org/' -shrinkwrapMinorVersion: 4 -shrinkwrapVersion: 3 -specifiers: - alea: 0.0.9 - benchmark: ~2.1.4 - chai: ^4.1.2 - eslint: ^4.17.0 - eslint-config-standard: ^11.0.0-beta.0 - eslint-plugin-import: ^2.8.0 - eslint-plugin-node: ^6.0.0 - eslint-plugin-promise: ^3.6.0 - eslint-plugin-standard: ^3.0.1 - mocha: ^5.0.0 From a12e4e907949174183051c76e1f9bfcbb82b3d55 Mon Sep 17 00:00:00 2001 From: Brandon Semilla Date: Mon, 12 Mar 2018 21:47:27 -0700 Subject: [PATCH 10/13] satisfy eslint --- .eslintrc.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.eslintrc.js b/.eslintrc.js index 1e9352f..1fe2c38 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -12,7 +12,8 @@ module.exports = { "rules": { "indent": [ "error", - 2 + 2, + { "SwitchCase": 1 } ], "linebreak-style": [ "error", From 0bd61693564d9813c01cd1ad42bd1ba86b1fa82d Mon Sep 17 00:00:00 2001 From: Brandon Semilla Date: Mon, 12 Mar 2018 21:48:11 -0700 Subject: [PATCH 11/13] remove alea license --- alea.md | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 alea.md diff --git a/alea.md b/alea.md deleted file mode 100644 index b20988c..0000000 --- a/alea.md +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (C) 2010 by Johannes Baagøe - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. From 87becb7a3ebf5fcc57ff3799057f22d3ea7297a0 Mon Sep 17 00:00:00 2001 From: Brandon Semilla Date: Mon, 12 Mar 2018 21:54:19 -0700 Subject: [PATCH 12/13] past tense in changelog --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0e486c8..e43d99c 100644 --- a/README.md +++ b/README.md @@ -61,8 +61,8 @@ npm install && npm test ## Changelog ### 3.0.0 -- Change function signature to `simplex(random)(x[, y, z, w]) -> noise` -- Add support for 1D noise +- Changed function signature to `simplex(random)(x[, y, z, w]) -> noise` +- Added support for 1D noise ### 2.4.0 - Included a PRNG based on ALEA to directly allow seeding From 913583c138f54b6b478d08137ac64bf278f1ca88 Mon Sep 17 00:00:00 2001 From: Brandon Semilla Date: Mon, 12 Mar 2018 22:17:29 -0700 Subject: [PATCH 13/13] not a constructor or a factory --- README.md | 4 +--- test/simplex-noise-test.js | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e43d99c..6526c75 100644 --- a/README.md +++ b/README.md @@ -20,9 +20,7 @@ var noise = simplex(Math.random), value4d = noise(x, y, z, w); ``` -You can also pass an alternative random function to the constructor that is -used to build the permutation table. -This can be used with a custom pseudo random number generator: +You can also pass an alternative random function to the function that is used to build the permutation table. This can be used with a custom pseudo random number generator: ```javascript var random = new Alea(seed), diff --git a/test/simplex-noise-test.js b/test/simplex-noise-test.js index 6cd5885..fc39dc6 100644 --- a/test/simplex-noise-test.js +++ b/test/simplex-noise-test.js @@ -3,7 +3,7 @@ var Alea = require('alea'); var assert = require('chai').assert; describe('SimplexNoise', function() { - describe('factory', function() { + describe('initialization function', function() { it('should initialize consistently when using the same seed', function() { var randomA = new Alea('seed') var randomB = new Alea('seed')