package.json
3.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
{
"_args": [
[
{
"raw": "create-error@~0.3.1",
"scope": null,
"escapedName": "create-error",
"name": "create-error",
"rawSpec": "~0.3.1",
"spec": ">=0.3.1 <0.4.0",
"type": "range"
},
"/Users/kanghyeontae/IdeaProjects/YTMT/node_modules/bookshelf"
]
],
"_from": "create-error@>=0.3.1 <0.4.0",
"_id": "create-error@0.3.1",
"_inCache": true,
"_location": "/create-error",
"_npmUser": {
"name": "tgriesser",
"email": "tgriesser10@gmail.com"
},
"_npmVersion": "1.3.2",
"_phantomChildren": {},
"_requested": {
"raw": "create-error@~0.3.1",
"scope": null,
"escapedName": "create-error",
"name": "create-error",
"rawSpec": "~0.3.1",
"spec": ">=0.3.1 <0.4.0",
"type": "range"
},
"_requiredBy": [
"/bookshelf"
],
"_resolved": "https://registry.npmjs.org/create-error/-/create-error-0.3.1.tgz",
"_shasum": "69810245a629e654432bf04377360003a5351a23",
"_shrinkwrap": null,
"_spec": "create-error@~0.3.1",
"_where": "/Users/kanghyeontae/IdeaProjects/YTMT/node_modules/bookshelf",
"author": {
"name": "Tim Griesser",
"url": "https://github.com/tgriesser"
},
"bugs": {
"url": "https://github.com/tgriesser/create-error/issues"
},
"dependencies": {},
"description": "Simple helper for sub-classing the Error object",
"devDependencies": {
"mocha": "~1.15.0"
},
"directories": {
"test": "test"
},
"dist": {
"shasum": "69810245a629e654432bf04377360003a5351a23",
"tarball": "https://registry.npmjs.org/create-error/-/create-error-0.3.1.tgz"
},
"homepage": "https://github.com/tgriesser/create-error#readme",
"keywords": [
"errors"
],
"license": "MIT",
"main": "create-error.js",
"maintainers": [
{
"name": "tgriesser",
"email": "tgriesser10@gmail.com"
}
],
"name": "create-error",
"optionalDependencies": {},
"readme": "create-error.js\n===============\n\nA simple helper for creating subclassed errors in Javascript.\n\n[![Build Status](https://travis-ci.org/tgriesser/create-error.png)](https://travis-ci.org/tgriesser/create-error)\n\n## Use:\n\n```bash\n$ npm install create-error\n$ bower install create-error\n```\n\n```js\nvar createError = require('create-error');\n\nvar MyCustomError = createError('MyCustomError');\nvar SubCustomError = createError(MyCustomError, 'CoolSubError', {messages: []});\n\nvar sub = new SubCustomError('My Message', {someVal: 'value'});\n\nsub instanceof SubCustomError // true\nsub instanceof MyCustomError // true\nsub instanceof Error // true\n\nassert.deepEqual(sub.messages, []) // true\nassert.equal(sub.someVal, 'value') // true\n```\n\n### createError(name, [properties])\n\nCreates a new error by specifying the name of the error to be created,\ntaking an optional hash of properties to be attached to the error class\nupon creation.\n\n### createError(Target, [name, [properties]])\n\nCreate a new error by specifying the `Target` error class we wish to inherit from,\nalong with an optional name and properties for the error. If the `name` is omitted,\nit will have the same name as the parent error.\n\n### Additional Notes:\n\nIn the browser, the function will be assigned to `window.createError`,\nand `createError.noConflict()` will restore the original `window.createError`\nif overwritten.\n\n### License\n\nMIT\n",
"readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git+https://github.com/tgriesser/create-error.git"
},
"scripts": {
"test": "mocha -R spec test/index.js"
},
"version": "0.3.1"
}