fsevents 1.0.8 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of fsevents might be problematic. Click here for more details.
- package/node_modules/ansi-styles/index.js +72 -6
- package/node_modules/ansi-styles/package.json +19 -12
- package/node_modules/ansi-styles/readme.md +36 -8
- package/node_modules/are-we-there-yet/CHANGES.md +19 -0
- package/node_modules/are-we-there-yet/README.md +12 -2
- package/node_modules/are-we-there-yet/index.js +4 -132
- package/node_modules/are-we-there-yet/package.json +18 -13
- package/node_modules/are-we-there-yet/test/lib/test-event.js +29 -0
- package/node_modules/are-we-there-yet/test/tracker.js +44 -43
- package/node_modules/are-we-there-yet/test/trackergroup.js +73 -64
- package/node_modules/are-we-there-yet/test/trackerstream.js +26 -40
- package/node_modules/are-we-there-yet/tracker-base.js +11 -0
- package/node_modules/are-we-there-yet/tracker-group.js +107 -0
- package/node_modules/are-we-there-yet/tracker-stream.js +35 -0
- package/node_modules/are-we-there-yet/tracker.js +30 -0
- package/node_modules/asn1/package.json +1 -2
- package/node_modules/assert-plus/package.json +1 -3
- package/node_modules/async/package.json +1 -1
- package/node_modules/aws4/.npmignore +2 -1
- package/node_modules/aws4/README.md +4 -0
- package/node_modules/aws4/aws4.js +8 -3
- package/node_modules/aws4/node_modules/lru-cache/.npmignore +3 -0
- package/node_modules/aws4/node_modules/lru-cache/.travis.yml +3 -4
- package/node_modules/aws4/node_modules/lru-cache/README.md +29 -24
- package/node_modules/aws4/node_modules/lru-cache/benchmarks/insertion-time.js +32 -0
- package/node_modules/aws4/node_modules/lru-cache/lib/lru-cache.js +333 -199
- package/node_modules/aws4/node_modules/lru-cache/node_modules/pseudomap/LICENSE +15 -0
- package/node_modules/aws4/node_modules/lru-cache/node_modules/pseudomap/README.md +60 -0
- package/node_modules/aws4/node_modules/lru-cache/node_modules/pseudomap/map.js +9 -0
- package/node_modules/aws4/node_modules/lru-cache/node_modules/pseudomap/package.json +59 -0
- package/node_modules/aws4/node_modules/lru-cache/node_modules/pseudomap/pseudomap.js +113 -0
- package/node_modules/aws4/node_modules/lru-cache/node_modules/pseudomap/test/basic.js +86 -0
- package/node_modules/aws4/node_modules/lru-cache/node_modules/yallist/.npmignore +4 -0
- package/node_modules/aws4/node_modules/lru-cache/node_modules/yallist/.travis.yml +7 -0
- package/node_modules/aws4/node_modules/lru-cache/node_modules/yallist/CONTRIBUTING.md +4 -0
- package/node_modules/aws4/node_modules/lru-cache/node_modules/yallist/LICENSE +15 -0
- package/node_modules/aws4/node_modules/lru-cache/node_modules/yallist/README.md +204 -0
- package/node_modules/aws4/node_modules/lru-cache/node_modules/yallist/package.json +59 -0
- package/node_modules/aws4/node_modules/lru-cache/node_modules/yallist/test/basic.js +188 -0
- package/node_modules/aws4/node_modules/lru-cache/node_modules/yallist/yallist.js +360 -0
- package/node_modules/aws4/node_modules/lru-cache/package.json +16 -12
- package/node_modules/aws4/node_modules/lru-cache/test/basic.js +270 -146
- package/node_modules/aws4/node_modules/lru-cache/test/foreach.js +39 -25
- package/node_modules/aws4/node_modules/lru-cache/test/inspect.js +54 -0
- package/node_modules/aws4/node_modules/lru-cache/test/no-symbol.js +3 -0
- package/node_modules/aws4/node_modules/lru-cache/test/serialize.js +115 -104
- package/node_modules/aws4/package.json +17 -14
- package/node_modules/bl/bl.js +9 -3
- package/node_modules/bl/package.json +12 -12
- package/node_modules/bl/test/test.js +14 -0
- package/node_modules/color-convert/README.md +62 -0
- package/node_modules/color-convert/conversions.js +594 -0
- package/node_modules/color-convert/css-keywords.js +151 -0
- package/node_modules/color-convert/index.js +75 -0
- package/node_modules/color-convert/package.json +92 -0
- package/node_modules/color-convert/route.js +98 -0
- package/node_modules/dashdash/lib/dashdash.js +1 -1
- package/node_modules/dashdash/node_modules/assert-plus/AUTHORS +6 -0
- package/node_modules/dashdash/node_modules/assert-plus/CHANGES.md +14 -0
- package/node_modules/dashdash/node_modules/assert-plus/README.md +162 -0
- package/node_modules/dashdash/node_modules/assert-plus/assert.js +211 -0
- package/node_modules/dashdash/node_modules/assert-plus/package.json +89 -0
- package/node_modules/dashdash/package.json +19 -12
- package/node_modules/ecc-jsbn/package.json +1 -2
- package/node_modules/escape-string-regexp/package.json +15 -11
- package/node_modules/extsprintf/package.json +2 -3
- package/node_modules/form-data/.dockerignore +7 -0
- package/node_modules/form-data/.editorconfig +10 -0
- package/node_modules/form-data/.eslintignore +1 -0
- package/node_modules/form-data/.eslintrc +64 -0
- package/node_modules/form-data/{Readme.md → README.md} +9 -1
- package/node_modules/form-data/lib/browser.js +2 -1
- package/node_modules/form-data/lib/form_data.js +172 -135
- package/node_modules/form-data/lib/populate.js +9 -0
- package/node_modules/form-data/package.json +35 -16
- package/node_modules/form-data/wercker.yml +36 -0
- package/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/index.js +1 -1
- package/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/package.json +14 -10
- package/node_modules/gauge/README.md +1 -1
- package/node_modules/gauge/package.json +18 -14
- package/node_modules/gauge/progress-bar.js +2 -2
- package/node_modules/http-signature/package.json +1 -2
- package/node_modules/is-my-json-valid/README.md +2 -2
- package/node_modules/is-my-json-valid/index.js +15 -6
- package/node_modules/is-my-json-valid/package.json +11 -7
- package/node_modules/is-my-json-valid/test/json-schema-draft4/multipleOf.json +36 -0
- package/node_modules/is-my-json-valid/test/misc.js +18 -0
- package/node_modules/is-typedarray/package.json +1 -2
- package/node_modules/isarray/.npmignore +1 -0
- package/node_modules/isarray/.travis.yml +4 -0
- package/node_modules/isarray/Makefile +6 -0
- package/node_modules/isarray/README.md +6 -0
- package/node_modules/isarray/index.js +3 -1
- package/node_modules/isarray/package.json +28 -10
- package/node_modules/isarray/test.js +20 -0
- package/node_modules/jodid25519/package.json +1 -2
- package/node_modules/jsbn/package.json +1 -2
- package/node_modules/json-schema/package.json +1 -1
- package/node_modules/jsprim/package.json +1 -2
- package/node_modules/lodash.pad/LICENSE +17 -16
- package/node_modules/lodash.pad/README.md +2 -2
- package/node_modules/lodash.pad/index.js +3 -94
- package/node_modules/lodash.pad/package.json +12 -12
- package/node_modules/lodash.padend/LICENSE +23 -0
- package/node_modules/lodash.padend/README.md +18 -0
- package/node_modules/lodash.padend/index.js +285 -0
- package/node_modules/lodash.padend/package.json +91 -0
- package/node_modules/lodash.padstart/LICENSE +23 -0
- package/node_modules/lodash.padstart/README.md +18 -0
- package/node_modules/lodash.padstart/index.js +285 -0
- package/node_modules/lodash.padstart/package.json +91 -0
- package/node_modules/lodash.repeat/LICENSE +17 -16
- package/node_modules/lodash.repeat/README.md +2 -2
- package/node_modules/lodash.repeat/index.js +3 -94
- package/node_modules/lodash.repeat/package.json +14 -13
- package/node_modules/lodash.tostring/LICENSE +23 -0
- package/node_modules/lodash.tostring/README.md +18 -0
- package/node_modules/lodash.tostring/index.js +164 -0
- package/node_modules/lodash.tostring/package.json +91 -0
- package/node_modules/mime-db/HISTORY.md +14 -0
- package/node_modules/mime-db/db.json +26 -3
- package/node_modules/mime-db/package.json +23 -18
- package/node_modules/mime-types/HISTORY.md +8 -0
- package/node_modules/mime-types/README.md +1 -1
- package/node_modules/mime-types/package.json +21 -16
- package/node_modules/node-pre-gyp/CHANGELOG.md +11 -0
- package/node_modules/node-pre-gyp/lib/util/abi_crosswalk.json +44 -4
- package/node_modules/node-pre-gyp/package.json +16 -16
- package/node_modules/npmlog/.nyc_output/64996.json +1 -0
- package/node_modules/npmlog/.nyc_output/64998.json +1 -0
- package/node_modules/npmlog/.nyc_output/65000.json +1 -0
- package/node_modules/npmlog/log.js +3 -2
- package/node_modules/npmlog/package.json +15 -11
- package/node_modules/npmlog/test/progress.js +25 -8
- package/node_modules/once/package.json +1 -1
- package/node_modules/qs/package.json +1 -2
- package/node_modules/readable-stream/.travis.yml +18 -16
- package/node_modules/readable-stream/README.md +1 -1
- package/node_modules/readable-stream/doc/stream.markdown +435 -405
- package/node_modules/readable-stream/lib/_stream_duplex.js +13 -20
- package/node_modules/readable-stream/lib/_stream_passthrough.js +3 -4
- package/node_modules/readable-stream/lib/_stream_readable.js +110 -205
- package/node_modules/readable-stream/lib/_stream_transform.js +21 -38
- package/node_modules/readable-stream/lib/_stream_writable.js +108 -121
- package/node_modules/readable-stream/package.json +19 -15
- package/node_modules/request/package.json +1 -2
- package/node_modules/rimraf/node_modules/glob/README.md +6 -0
- package/node_modules/rimraf/node_modules/glob/common.js +12 -3
- package/node_modules/rimraf/node_modules/glob/glob.js +20 -3
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js +1 -1
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json +14 -10
- package/node_modules/rimraf/node_modules/glob/package.json +15 -11
- package/node_modules/rimraf/node_modules/glob/sync.js +8 -1
- package/node_modules/rimraf/package.json +14 -10
- package/node_modules/semver/package.json +1 -2
- package/node_modules/sshpk/lib/formats/rfc4253.js +2 -1
- package/node_modules/sshpk/package.json +13 -10
- package/node_modules/strip-ansi/package.json +21 -16
- package/node_modules/strip-ansi/readme.md +5 -5
- package/node_modules/tough-cookie/lib/cookie.js +2 -2
- package/node_modules/tough-cookie/package.json +13 -9
- package/node_modules/tweetnacl/CHANGELOG.md +53 -0
- package/node_modules/tweetnacl/COPYING.txt +9 -0
- package/node_modules/tweetnacl/README.md +14 -40
- package/node_modules/tweetnacl/nacl-fast.js +21 -51
- package/node_modules/tweetnacl/nacl-fast.min.js +2 -2
- package/node_modules/tweetnacl/nacl.js +21 -51
- package/node_modules/tweetnacl/nacl.min.js +1 -1
- package/node_modules/tweetnacl/package.json +28 -38
- package/node_modules/verror/package.json +2 -3
- package/package.json +2 -2
- package/node_modules/aws4/example.js +0 -372
- package/node_modules/aws4/node_modules/lru-cache/test/memory-leak.js +0 -51
- package/node_modules/isarray/build/build.js +0 -209
- package/node_modules/lodash._basetostring/LICENSE +0 -22
- package/node_modules/lodash._basetostring/README.md +0 -20
- package/node_modules/lodash._basetostring/index.js +0 -22
- package/node_modules/lodash._basetostring/package.json +0 -99
- package/node_modules/lodash._createpadding/LICENSE +0 -22
- package/node_modules/lodash._createpadding/README.md +0 -20
- package/node_modules/lodash._createpadding/index.js +0 -37
- package/node_modules/lodash._createpadding/package.json +0 -101
- package/node_modules/lodash._root/LICENSE +0 -22
- package/node_modules/lodash._root/README.md +0 -18
- package/node_modules/lodash._root/index.js +0 -53
- package/node_modules/lodash._root/package.json +0 -77
- package/node_modules/lodash.padleft/LICENSE.txt +0 -22
- package/node_modules/lodash.padleft/README.md +0 -20
- package/node_modules/lodash.padleft/index.js +0 -50
- package/node_modules/lodash.padleft/package.json +0 -107
- package/node_modules/lodash.padright/LICENSE.txt +0 -22
- package/node_modules/lodash.padright/README.md +0 -20
- package/node_modules/lodash.padright/index.js +0 -50
- package/node_modules/lodash.padright/package.json +0 -107
@@ -1,19 +1,23 @@
|
|
1
1
|
{
|
2
2
|
"_from": "gauge@~1.2.5",
|
3
|
-
"_id": "gauge@1.2.
|
3
|
+
"_id": "gauge@1.2.7",
|
4
4
|
"_location": "/gauge",
|
5
|
-
"_nodeVersion": "
|
5
|
+
"_nodeVersion": "4.2.2",
|
6
|
+
"_npmOperationalInternal": {
|
7
|
+
"host": "packages-9-west.internal.npmjs.com",
|
8
|
+
"tmp": "tmp/gauge-1.2.7.tgz_1455835409513_0.6293477965518832"
|
9
|
+
},
|
6
10
|
"_npmUser": {
|
7
11
|
"email": "me@re-becca.org",
|
8
12
|
"name": "iarna"
|
9
13
|
},
|
10
|
-
"_npmVersion": "3.
|
14
|
+
"_npmVersion": "3.7.2",
|
11
15
|
"_phantomChildren": {},
|
12
16
|
"_requiredBy": [
|
13
17
|
"/npmlog"
|
14
18
|
],
|
15
|
-
"_resolved": "https://registry.npmjs.org/gauge/-/gauge-1.2.
|
16
|
-
"_shasum": "
|
19
|
+
"_resolved": "https://registry.npmjs.org/gauge/-/gauge-1.2.7.tgz",
|
20
|
+
"_shasum": "e9cec5483d3d4ee0ef44b60a7d99e4935e136d93",
|
17
21
|
"_shrinkwrap": null,
|
18
22
|
"author": {
|
19
23
|
"email": "me@re-becca.org",
|
@@ -25,20 +29,20 @@
|
|
25
29
|
"dependencies": {
|
26
30
|
"ansi": "^0.3.0",
|
27
31
|
"has-unicode": "^2.0.0",
|
28
|
-
"lodash.pad": "^
|
29
|
-
"lodash.
|
30
|
-
"lodash.
|
32
|
+
"lodash.pad": "^4.1.0",
|
33
|
+
"lodash.padend": "^4.1.0",
|
34
|
+
"lodash.padstart": "^4.1.0"
|
31
35
|
},
|
32
36
|
"description": "A terminal based horizontal guage",
|
33
37
|
"devDependencies": {
|
34
|
-
"tap": "^
|
38
|
+
"tap": "^5.6.0"
|
35
39
|
},
|
36
40
|
"directories": {},
|
37
41
|
"dist": {
|
38
|
-
"shasum": "
|
39
|
-
"tarball": "http://registry.npmjs.org/gauge/-/gauge-1.2.
|
42
|
+
"shasum": "e9cec5483d3d4ee0ef44b60a7d99e4935e136d93",
|
43
|
+
"tarball": "http://registry.npmjs.org/gauge/-/gauge-1.2.7.tgz"
|
40
44
|
},
|
41
|
-
"gitHead": "
|
45
|
+
"gitHead": "75a7d0a4ed67489ac992ed3d211bed60376ca7c1",
|
42
46
|
"homepage": "https://github.com/iarna/gauge",
|
43
47
|
"keywords": [
|
44
48
|
"gauge",
|
@@ -55,7 +59,7 @@
|
|
55
59
|
],
|
56
60
|
"name": "gauge",
|
57
61
|
"optionalDependencies": {},
|
58
|
-
"readme": "gauge\n=====\n\nA nearly stateless terminal based horizontal
|
62
|
+
"readme": "gauge\n=====\n\nA nearly stateless terminal based horizontal gauge / progress bar.\n\n```javascript\nvar Gauge = require(\"gauge\")\n\nvar gauge = new Gauge()\n\ngauge.show(\"test\", 0.20)\n\ngauge.pulse(\"this\")\n\ngauge.hide()\n```\n\n\n\n\n### `var gauge = new Gauge([options], [ansiStream])`\n\n* **options** – *(optional)* An option object. (See [below] for details.)\n* **ansiStream** – *(optional)* A stream that's been blessed by the [ansi]\n module to include various commands for controlling the cursor in a terminal.\n\n[ansi]: https://www.npmjs.com/package/ansi\n[below]: #theme-objects\n\nConstructs a new gauge. Gauges are drawn on a single line, and are not drawn\nif the current terminal isn't a tty.\n\nIf you resize your terminal in a way that can be detected then the gauge\nwill be drawn at the new size. As a general rule, growing your terminal will\nbe clean, but shrinking your terminal will result in cruft as we don't have\nenough information to know where what we wrote previously is now located.\n\nThe **options** object can have the following properties, all of which are\noptional:\n\n* maxUpdateFrequency: defaults to 50 msec, the gauge will not be drawn more\n than once in this period of time. This applies to `show` and `pulse`\n calls, but if you `hide` and then `show` the gauge it will draw it\n regardless of time since last draw.\n* theme: defaults to Gauge.unicode` if the terminal supports\n unicode according to [has-unicode], otherwise it defaults to `Gauge.ascii`.\n Details on the [theme object](#theme-objects) are documented elsewhere.\n* template: see [documentation elsewhere](#template-objects) for\n defaults and details.\n\n[has-unicode]: https://www.npmjs.com/package/has-unicode\n\nIf **ansiStream** isn't passed in, then one will be constructed from stderr\nwith `ansi(process.stderr)`.\n\n### `gauge.show([name, [completed]])`\n\n* **name** – *(optional)* The name of the current thing contributing to progress. Defaults to the last value used, or \"\".\n* **completed** – *(optional)* The portion completed as a value between 0 and 1. Defaults to the last value used, or 0.\n\nIf `process.stdout.isTTY` is false then this does nothing. If completed is 0\nand `gauge.pulse` has never been called, then similarly nothing will be printed.\n\nIf `maxUpdateFrequency` msec haven't passed since the last call to `show` or\n`pulse` then similarly, nothing will be printed. (Actually, the update is\ndeferred until `maxUpdateFrequency` msec have passed and if nothing else has\nhappened, the gauge update will happen.)\n\n### `gauge.hide()`\n\nRemoves the gauge from the terminal.\n\n### `gauge.pulse([name])`\n\n* **name** – *(optional)* The specific thing that triggered this pulse\n\nSpins the spinner in the gauge to show output. If **name** is included then\nit will be combined with the last name passed to `gauge.show` using the\nsubsection property of the theme (typically a right facing arrow).\n\n### `gauge.disable()`\n\nHides the gauge and ignores further calls to `show` or `pulse`.\n\n### `gauge.enable()`\n\nShows the gauge and resumes updating when `show` or `pulse` is called.\n\n### `gauge.setTheme(theme)`\n\nChange the active theme, will be displayed with the next show or pulse\n\n### `gauge.setTemplate(template)`\n\nChange the active template, will be displayed with the next show or pulse\n\n### Theme Objects\n\nThere are two theme objects available as a part of the module, `Gauge.unicode` and `Gauge.ascii`.\nTheme objects have the follow properties:\n\n| Property | Unicode | ASCII |\n| ---------- | ------- | ----- |\n| startgroup | ╢ | \\| |\n| endgroup | ╟ | \\| |\n| complete | █ | # |\n| incomplete | ░ | - |\n| spinner | ▀▐▄▌ | -\\\\\\|/ |\n| subsection | → | -> |\n\n*startgroup*, *endgroup* and *subsection* can be as many characters as you want.\n\n*complete* and *incomplete* should be a single character width each.\n\n*spinner* is a list of characters to use in turn when displaying an activity\nspinner. The Gauge will spin as many characters as you give here.\n\n### Template Objects\n\nA template is an array of objects and strings that, after being evaluated,\nwill be turned into the gauge line. The default template is:\n\n```javascript\n[\n {type: \"name\", separated: true, maxLength: 25, minLength: 25, align: \"left\"},\n {type: \"spinner\", separated: true},\n {type: \"startgroup\"},\n {type: \"completionbar\"},\n {type: \"endgroup\"}\n]\n```\n\nThe various template elements can either be **plain strings**, in which case they will\nbe be included verbatum in the output.\n\nIf the template element is an object, it can have the following keys:\n\n* *type* can be:\n * `name` – The most recent name passed to `show`; if this is in response to a\n `pulse` then the name passed to `pulse` will be appended along with the\n subsection property from the theme.\n * `spinner` – If you've ever called `pulse` this will be one of the characters\n from the spinner property of the theme.\n * `startgroup` – The `startgroup` property from the theme.\n * `completionbar` – This progress bar itself\n * `endgroup` – The `endgroup` property from the theme.\n* *separated* – If true, the element will be separated with spaces from things on\n either side (and margins count as space, so it won't be indented), but only\n if its included.\n* *maxLength* – The maximum length for this element. If its value is longer it\n will be truncated.\n* *minLength* – The minimum length for this element. If its value is shorter it\n will be padded according to the *align* value.\n* *align* – (Default: left) Possible values \"left\", \"right\" and \"center\". Works\n as you'd expect from word processors.\n* *length* – Provides a single value for both *minLength* and *maxLength*. If both\n *length* and *minLength or *maxLength* are specifed then the latter take precedence.\n\n### Tracking Completion\n\nIf you have more than one thing going on that you want to track completion\nof, you may find the related [are-we-there-yet] helpful. It's `change`\nevent can be wired up to the `show` method to get a more traditional\nprogress bar interface.\n\n[are-we-there-yet]: https://www.npmjs.com/package/are-we-there-yet\n",
|
59
63
|
"readmeFilename": "README.md",
|
60
64
|
"repository": {
|
61
65
|
"type": "git",
|
@@ -64,5 +68,5 @@
|
|
64
68
|
"scripts": {
|
65
69
|
"test": "tap test/*.js"
|
66
70
|
},
|
67
|
-
"version": "1.2.
|
71
|
+
"version": "1.2.7"
|
68
72
|
}
|
@@ -3,8 +3,8 @@ var hasUnicode = require("has-unicode")
|
|
3
3
|
var ansi = require("ansi")
|
4
4
|
var align = {
|
5
5
|
center: require("lodash.pad"),
|
6
|
-
left: require("lodash.
|
7
|
-
right: require("lodash.
|
6
|
+
left: require("lodash.padend"),
|
7
|
+
right: require("lodash.padstart")
|
8
8
|
}
|
9
9
|
var defaultStream = process.stderr
|
10
10
|
function isTTY() {
|
@@ -78,8 +78,7 @@
|
|
78
78
|
],
|
79
79
|
"name": "http-signature",
|
80
80
|
"optionalDependencies": {},
|
81
|
-
"readme": "
|
82
|
-
"readmeFilename": "README.md",
|
81
|
+
"readme": "ERROR: No README data found!",
|
83
82
|
"repository": {
|
84
83
|
"type": "git",
|
85
84
|
"url": "git://github.com/joyent/node-http-signature.git"
|
@@ -40,7 +40,7 @@ console.log(validate.errors)
|
|
40
40
|
You can also pass the schema as a string
|
41
41
|
|
42
42
|
``` js
|
43
|
-
var validate =
|
43
|
+
var validate = validator('{"type": ... }')
|
44
44
|
```
|
45
45
|
|
46
46
|
Optionally you can use the require submodule to load a schema from `__dirname`
|
@@ -128,7 +128,7 @@ var validate = validator({
|
|
128
128
|
})
|
129
129
|
|
130
130
|
validate({hello: 100});
|
131
|
-
console.log(validate.errors) // {field: 'data.hello', message: 'is the wrong type', value: 100}
|
131
|
+
console.log(validate.errors) // {field: 'data.hello', message: 'is the wrong type', value: 100, type: 'string'}
|
132
132
|
```
|
133
133
|
|
134
134
|
## Greedy mode tries to validate as much as possible
|
@@ -5,7 +5,6 @@ var xtend = require('xtend')
|
|
5
5
|
var formats = require('./formats')
|
6
6
|
|
7
7
|
var get = function(obj, additionalSchemas, ptr) {
|
8
|
-
if (/^https?:\/\//.test(ptr)) return null
|
9
8
|
|
10
9
|
var visit = function(sub) {
|
11
10
|
if (sub && sub.id === ptr) return sub
|
@@ -98,13 +97,25 @@ var unique = function(array) {
|
|
98
97
|
return true
|
99
98
|
}
|
100
99
|
|
100
|
+
var isMultipleOf = function(name, multipleOf) {
|
101
|
+
var res;
|
102
|
+
var factor = ((multipleOf | 0) !== multipleOf) ? Math.pow(10, multipleOf.toString().split('.').pop().length) : 1
|
103
|
+
if (factor > 1) {
|
104
|
+
var factorName = ((name | 0) !== name) ? Math.pow(10, name.toString().split('.').pop().length) : 1
|
105
|
+
if (factorName > factor) res = true
|
106
|
+
else res = Math.round(factor * name) % (factor * multipleOf)
|
107
|
+
}
|
108
|
+
else res = name % multipleOf;
|
109
|
+
return !res;
|
110
|
+
}
|
111
|
+
|
101
112
|
var toType = function(node) {
|
102
113
|
return node.type
|
103
114
|
}
|
104
115
|
|
105
116
|
var compile = function(schema, cache, root, reporter, opts) {
|
106
117
|
var fmts = opts ? xtend(formats, opts.formats) : formats
|
107
|
-
var scope = {unique:unique, formats:fmts}
|
118
|
+
var scope = {unique:unique, formats:fmts, isMultipleOf:isMultipleOf}
|
108
119
|
var verbose = opts ? !!opts.verbose : false;
|
109
120
|
var greedy = opts && opts.greedy !== undefined ?
|
110
121
|
opts.greedy : false;
|
@@ -150,7 +161,7 @@ var compile = function(schema, cache, root, reporter, opts) {
|
|
150
161
|
if (reporter === true) {
|
151
162
|
validate('if (validate.errors === null) validate.errors = []')
|
152
163
|
if (verbose) {
|
153
|
-
validate('validate.errors.push({field:%s,message:%s,value:%s})', formatName(prop || name), JSON.stringify(msg), value || name)
|
164
|
+
validate('validate.errors.push({field:%s,message:%s,value:%s,type:%s})', formatName(prop || name), JSON.stringify(msg), value || name, JSON.stringify(type))
|
154
165
|
} else {
|
155
166
|
validate('validate.errors.push({field:%s,message:%s})', formatName(prop || name), JSON.stringify(msg))
|
156
167
|
}
|
@@ -434,9 +445,7 @@ var compile = function(schema, cache, root, reporter, opts) {
|
|
434
445
|
if (node.multipleOf !== undefined) {
|
435
446
|
if (type !== 'number' && type !== 'integer') validate('if (%s) {', types.number(name))
|
436
447
|
|
437
|
-
|
438
|
-
if (factor > 1) validate('if ((%d*%s) % %d) {', factor, name, factor*node.multipleOf)
|
439
|
-
else validate('if (%s % %d) {', name, node.multipleOf)
|
448
|
+
validate('if (!isMultipleOf(%s, %d)) {', name, node.multipleOf)
|
440
449
|
|
441
450
|
error('has a remainder')
|
442
451
|
validate('}')
|
@@ -1,8 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"_from": "is-my-json-valid@^2.12.4",
|
3
|
-
"_id": "is-my-json-valid@2.
|
3
|
+
"_id": "is-my-json-valid@2.13.1",
|
4
4
|
"_location": "/is-my-json-valid",
|
5
5
|
"_nodeVersion": "4.2.3",
|
6
|
+
"_npmOperationalInternal": {
|
7
|
+
"host": "packages-5-east.internal.npmjs.com",
|
8
|
+
"tmp": "tmp/is-my-json-valid-2.13.1.tgz_1456180270224_0.17748022079467773"
|
9
|
+
},
|
6
10
|
"_npmUser": {
|
7
11
|
"email": "mathiasbuus@gmail.com",
|
8
12
|
"name": "mafintosh"
|
@@ -12,8 +16,8 @@
|
|
12
16
|
"_requiredBy": [
|
13
17
|
"/har-validator"
|
14
18
|
],
|
15
|
-
"_resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.
|
16
|
-
"_shasum": "
|
19
|
+
"_resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.13.1.tgz",
|
20
|
+
"_shasum": "d55778a82feb6b0963ff4be111d5d1684e890707",
|
17
21
|
"_shrinkwrap": null,
|
18
22
|
"author": {
|
19
23
|
"name": "Mathias Buus"
|
@@ -33,10 +37,10 @@
|
|
33
37
|
},
|
34
38
|
"directories": {},
|
35
39
|
"dist": {
|
36
|
-
"shasum": "
|
37
|
-
"tarball": "http://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.
|
40
|
+
"shasum": "d55778a82feb6b0963ff4be111d5d1684e890707",
|
41
|
+
"tarball": "http://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.13.1.tgz"
|
38
42
|
},
|
39
|
-
"gitHead": "
|
43
|
+
"gitHead": "5bacc71441750bc6e79829abcfc21d4f2f0c4396",
|
40
44
|
"homepage": "https://github.com/mafintosh/is-my-json-valid",
|
41
45
|
"keywords": [
|
42
46
|
"json",
|
@@ -74,5 +78,5 @@
|
|
74
78
|
"scripts": {
|
75
79
|
"test": "tape test/*.js"
|
76
80
|
},
|
77
|
-
"version": "2.
|
81
|
+
"version": "2.13.1"
|
78
82
|
}
|
@@ -56,5 +56,41 @@
|
|
56
56
|
"valid": false
|
57
57
|
}
|
58
58
|
]
|
59
|
+
},
|
60
|
+
{
|
61
|
+
"description": "by decimal number where floating point precision is wrong",
|
62
|
+
"schema": {"multipleOf": 0.01},
|
63
|
+
"tests": [
|
64
|
+
{
|
65
|
+
"description": "Number 2 is multiple of 0.01",
|
66
|
+
"data": 2,
|
67
|
+
"valid": true
|
68
|
+
},
|
69
|
+
{
|
70
|
+
"description": "Number 2.1 is multiple of 0.01",
|
71
|
+
"data": 2.1,
|
72
|
+
"valid": true
|
73
|
+
},
|
74
|
+
{
|
75
|
+
"description": "Number 2.2 is multiple of 0.01",
|
76
|
+
"data": 2.2,
|
77
|
+
"valid": true
|
78
|
+
},
|
79
|
+
{
|
80
|
+
"description": "Number 2.3 is multiple of 0.01",
|
81
|
+
"data": 2.3,
|
82
|
+
"valid": true
|
83
|
+
},
|
84
|
+
{
|
85
|
+
"description": "Number 2.4 is multiple of 0.01",
|
86
|
+
"data": 2.4,
|
87
|
+
"valid": true
|
88
|
+
},
|
89
|
+
{
|
90
|
+
"description": "Number 1.211 is not multiple of 0.01",
|
91
|
+
"data": 1.211,
|
92
|
+
"valid": false
|
93
|
+
}
|
94
|
+
]
|
59
95
|
}
|
60
96
|
]
|
@@ -98,6 +98,7 @@ tape('additional props', function(t) {
|
|
98
98
|
t.ok(validate({}))
|
99
99
|
t.notOk(validate({foo:'bar'}))
|
100
100
|
t.ok(validate.errors[0].value === 'data.foo', 'should output the property not allowed in verbose mode')
|
101
|
+
t.strictEqual(validate.errors[0].type, 'object', 'error object should contain the type')
|
101
102
|
t.end()
|
102
103
|
})
|
103
104
|
|
@@ -278,6 +279,22 @@ tape('external schemas', function(t) {
|
|
278
279
|
t.end()
|
279
280
|
})
|
280
281
|
|
282
|
+
tape('external schema URIs', function(t) {
|
283
|
+
var ext = {type: 'string'}
|
284
|
+
var schema = {
|
285
|
+
required: true,
|
286
|
+
$ref: 'http://example.com/schemas/schemaURIs'
|
287
|
+
}
|
288
|
+
|
289
|
+
var opts = {schemas:{}};
|
290
|
+
opts.schemas['http://example.com/schemas/schemaURIs'] = ext;
|
291
|
+
var validate = validator(schema, opts)
|
292
|
+
|
293
|
+
t.ok(validate('hello string'), 'is a string')
|
294
|
+
t.notOk(validate(42), 'not a string')
|
295
|
+
t.end()
|
296
|
+
})
|
297
|
+
|
281
298
|
tape('top-level external schema', function(t) {
|
282
299
|
var defs = {
|
283
300
|
"string": {
|
@@ -354,6 +371,7 @@ tape('verbose mode', function(t) {
|
|
354
371
|
t.ok(validate({hello: 'string'}), 'should be valid')
|
355
372
|
t.notOk(validate({hello: 100}), 'should not be valid')
|
356
373
|
t.strictEqual(validate.errors[0].value, 100, 'error object should contain the invalid value')
|
374
|
+
t.strictEqual(validate.errors[0].type, 'string', 'error object should contain the type')
|
357
375
|
t.end()
|
358
376
|
})
|
359
377
|
|
@@ -52,8 +52,7 @@
|
|
52
52
|
],
|
53
53
|
"name": "is-typedarray",
|
54
54
|
"optionalDependencies": {},
|
55
|
-
"readme": "
|
56
|
-
"readmeFilename": "README.md",
|
55
|
+
"readme": "ERROR: No README data found!",
|
57
56
|
"repository": {
|
58
57
|
"type": "git",
|
59
58
|
"url": "git://github.com/hughsk/is-typedarray.git"
|
@@ -0,0 +1 @@
|
|
1
|
+
node_modules
|
@@ -3,6 +3,12 @@
|
|
3
3
|
|
4
4
|
`Array#isArray` for older browsers.
|
5
5
|
|
6
|
+
[](http://travis-ci.org/juliangruber/isarray)
|
7
|
+
[](https://www.npmjs.org/package/isarray)
|
8
|
+
|
9
|
+
[
|
10
|
+
](https://ci.testling.com/juliangruber/isarray)
|
11
|
+
|
6
12
|
## Usage
|
7
13
|
|
8
14
|
```js
|
@@ -1,18 +1,19 @@
|
|
1
1
|
{
|
2
|
-
"_from": "isarray
|
3
|
-
"_id": "isarray@0.0
|
2
|
+
"_from": "isarray@~1.0.0",
|
3
|
+
"_id": "isarray@1.0.0",
|
4
4
|
"_location": "/isarray",
|
5
|
+
"_nodeVersion": "5.1.0",
|
5
6
|
"_npmUser": {
|
6
7
|
"email": "julian@juliangruber.com",
|
7
8
|
"name": "juliangruber"
|
8
9
|
},
|
9
|
-
"_npmVersion": "
|
10
|
+
"_npmVersion": "3.3.12",
|
10
11
|
"_phantomChildren": {},
|
11
12
|
"_requiredBy": [
|
12
13
|
"/readable-stream"
|
13
14
|
],
|
14
|
-
"_resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.
|
15
|
-
"_shasum": "
|
15
|
+
"_resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
|
16
|
+
"_shasum": "bb935d48582cba168c06834957a54a3e07124f11",
|
16
17
|
"_shrinkwrap": null,
|
17
18
|
"author": {
|
18
19
|
"email": "mail@juliangruber.com",
|
@@ -25,13 +26,14 @@
|
|
25
26
|
"dependencies": {},
|
26
27
|
"description": "Array#isArray for older browsers",
|
27
28
|
"devDependencies": {
|
28
|
-
"
|
29
|
+
"tape": "~2.13.4"
|
29
30
|
},
|
30
31
|
"directories": {},
|
31
32
|
"dist": {
|
32
|
-
"shasum": "
|
33
|
-
"tarball": "http://registry.npmjs.org/isarray/-/isarray-0.0.
|
33
|
+
"shasum": "bb935d48582cba168c06834957a54a3e07124f11",
|
34
|
+
"tarball": "http://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz"
|
34
35
|
},
|
36
|
+
"gitHead": "2a23a281f369e9ae06394c0fb4d2381355a6ba33",
|
35
37
|
"homepage": "https://github.com/juliangruber/isarray",
|
36
38
|
"keywords": [
|
37
39
|
"array",
|
@@ -54,7 +56,23 @@
|
|
54
56
|
"url": "git://github.com/juliangruber/isarray.git"
|
55
57
|
},
|
56
58
|
"scripts": {
|
57
|
-
"test": "
|
59
|
+
"test": "tape test.js"
|
58
60
|
},
|
59
|
-
"
|
61
|
+
"testling": {
|
62
|
+
"browsers": [
|
63
|
+
"android-browser/4.2..latest",
|
64
|
+
"chrome/22..latest",
|
65
|
+
"chrome/canary",
|
66
|
+
"firefox/17..latest",
|
67
|
+
"firefox/nightly",
|
68
|
+
"ie/8..latest",
|
69
|
+
"ipad/6.0..latest",
|
70
|
+
"iphone/6.0..latest",
|
71
|
+
"opera/12..latest",
|
72
|
+
"opera/next",
|
73
|
+
"safari/5.1..latest"
|
74
|
+
],
|
75
|
+
"files": "test.js"
|
76
|
+
},
|
77
|
+
"version": "1.0.0"
|
60
78
|
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
var isArray = require('./');
|
2
|
+
var test = require('tape');
|
3
|
+
|
4
|
+
test('is array', function(t){
|
5
|
+
t.ok(isArray([]));
|
6
|
+
t.notOk(isArray({}));
|
7
|
+
t.notOk(isArray(null));
|
8
|
+
t.notOk(isArray(false));
|
9
|
+
|
10
|
+
var obj = {};
|
11
|
+
obj[0] = true;
|
12
|
+
t.notOk(isArray(obj));
|
13
|
+
|
14
|
+
var arr = [];
|
15
|
+
arr.foo = 'bar';
|
16
|
+
t.ok(isArray(arr));
|
17
|
+
|
18
|
+
t.end();
|
19
|
+
});
|
20
|
+
|
@@ -66,8 +66,7 @@
|
|
66
66
|
],
|
67
67
|
"name": "jodid25519",
|
68
68
|
"optionalDependencies": {},
|
69
|
-
"readme": "
|
70
|
-
"readmeFilename": "README.md",
|
69
|
+
"readme": "ERROR: No README data found!",
|
71
70
|
"repository": {
|
72
71
|
"type": "git",
|
73
72
|
"url": "git+https://github.com/meganz/jodid25519.git"
|
@@ -49,8 +49,7 @@
|
|
49
49
|
],
|
50
50
|
"name": "jsbn",
|
51
51
|
"optionalDependencies": {},
|
52
|
-
"readme": "
|
53
|
-
"readmeFilename": "README.md",
|
52
|
+
"readme": "ERROR: No README data found!",
|
54
53
|
"repository": {
|
55
54
|
"type": "git",
|
56
55
|
"url": "git+https://github.com/andyperlitch/jsbn.git"
|
@@ -32,7 +32,7 @@
|
|
32
32
|
"shasum": "50354f19f603917c695f70b85afa77c3b0f23506",
|
33
33
|
"tarball": "http://registry.npmjs.org/json-schema/-/json-schema-0.2.2.tgz"
|
34
34
|
},
|
35
|
-
"homepage": "https://github.com/kriszyp/json-schema
|
35
|
+
"homepage": "https://github.com/kriszyp/json-schema",
|
36
36
|
"keywords": [
|
37
37
|
"json",
|
38
38
|
"schema"
|
@@ -45,8 +45,7 @@
|
|
45
45
|
],
|
46
46
|
"name": "jsprim",
|
47
47
|
"optionalDependencies": {},
|
48
|
-
"readme": "
|
49
|
-
"readmeFilename": "README.md",
|
48
|
+
"readme": "ERROR: No README data found!",
|
50
49
|
"repository": {
|
51
50
|
"type": "git",
|
52
51
|
"url": "git://github.com/davepacheco/node-jsprim.git"
|
@@ -1,22 +1,23 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
1
3
|
Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
|
2
4
|
Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
|
3
5
|
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
4
6
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
the following conditions:
|
7
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
of this software and associated documentation files (the "Software"), to deal
|
9
|
+
in the Software without restriction, including without limitation the rights
|
10
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
11
|
+
copies of the Software, and to permit persons to whom the Software is
|
12
|
+
furnished to do so, subject to the following conditions:
|
12
13
|
|
13
|
-
The above copyright notice and this permission notice shall be
|
14
|
-
|
14
|
+
The above copyright notice and this permission notice shall be included in all
|
15
|
+
copies or substantial portions of the Software.
|
15
16
|
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
OF
|
22
|
-
|
17
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
22
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
23
|
+
SOFTWARE.
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# lodash.pad
|
1
|
+
# lodash.pad v4.1.0
|
2
2
|
|
3
3
|
The [lodash](https://lodash.com/) method `_.pad` exported as a [Node.js](https://nodejs.org/) module.
|
4
4
|
|
@@ -15,4 +15,4 @@ In Node.js:
|
|
15
15
|
var pad = require('lodash.pad');
|
16
16
|
```
|
17
17
|
|
18
|
-
See the [documentation](https://lodash.com/docs#pad) or [package source](https://github.com/lodash/lodash/blob/
|
18
|
+
See the [documentation](https://lodash.com/docs#pad) or [package source](https://github.com/lodash/lodash/blob/4.1.0-npm-packages/lodash.pad) for more details.
|