| 1 |
{ |
| 2 |
"_id": "d", |
| 3 |
"_rev": "16-2bc2068fb884b8207738d2127d5b5fc9", |
| 4 |
"name": "d", |
| 5 |
"description": "Property descriptor factory", |
| 6 |
"dist-tags": { |
| 7 |
"latest": "1.0.1" |
| 8 |
}, |
| 9 |
"versions": { |
| 10 |
"0.1.0": { |
| 11 |
"name": "d", |
| 12 |
"version": "0.1.0", |
| 13 |
"description": "Property descriptor factory", |
| 14 |
"main": "index.js", |
| 15 |
"scripts": { |
| 16 |
"test": "node node_modules/tad/bin/tad" |
| 17 |
}, |
| 18 |
"repository": { |
| 19 |
"type": "git", |
| 20 |
"url": "git://github.com/medikoo/d.git" |
| 21 |
}, |
| 22 |
"keywords": [ |
| 23 |
"descriptor", |
| 24 |
"es", |
| 25 |
"ecmascript", |
| 26 |
"ecma", |
| 27 |
"property", |
| 28 |
"descriptors", |
| 29 |
"meta", |
| 30 |
"properties" |
| 31 |
], |
| 32 |
"dependencies": { |
| 33 |
"es5-ext": "~0.9.2" |
| 34 |
}, |
| 35 |
"devDependencies": { |
| 36 |
"tad": "~0.1.16" |
| 37 |
}, |
| 38 |
"author": { |
| 39 |
"name": "Mariusz Nowak", |
| 40 |
"email": "[email protected]", |
| 41 |
"url": "http://www.medikoo.com/" |
| 42 |
}, |
| 43 |
"license": "MIT", |
| 44 |
"bugs": { |
| 45 |
"url": "https://github.com/medikoo/d/issues" |
| 46 |
}, |
| 47 |
"_id": "[email protected]", |
| 48 |
"dist": { |
| 49 |
"shasum": "2dfac58b2a6c152361e933ed4c7f59115ff353e6", |
| 50 |
"tarball": "https://registry.npmjs.org/d/-/d-0.1.0.tgz" |
| 51 |
}, |
| 52 |
"_from": ".", |
| 53 |
"_npmVersion": "1.2.32", |
| 54 |
"_npmUser": { |
| 55 |
"name": "medikoo", |
| 56 |
"email": "[email protected]" |
| 57 |
}, |
| 58 |
"maintainers": [ |
| 59 |
{ |
| 60 |
"name": "medikoo", |
| 61 |
"email": "[email protected]" |
| 62 |
} |
| 63 |
], |
| 64 |
"directories": {} |
| 65 |
}, |
| 66 |
"0.1.1": { |
| 67 |
"name": "d", |
| 68 |
"version": "0.1.1", |
| 69 |
"description": "Property descriptor factory", |
| 70 |
"author": { |
| 71 |
"name": "Mariusz Nowak", |
| 72 |
"email": "[email protected]", |
| 73 |
"url": "http://www.medikoo.com/" |
| 74 |
}, |
| 75 |
"scripts": { |
| 76 |
"test": "node node_modules/tad/bin/tad" |
| 77 |
}, |
| 78 |
"repository": { |
| 79 |
"type": "git", |
| 80 |
"url": "git://github.com/medikoo/d.git" |
| 81 |
}, |
| 82 |
"keywords": [ |
| 83 |
"descriptor", |
| 84 |
"es", |
| 85 |
"ecmascript", |
| 86 |
"ecma", |
| 87 |
"property", |
| 88 |
"descriptors", |
| 89 |
"meta", |
| 90 |
"properties" |
| 91 |
], |
| 92 |
"dependencies": { |
| 93 |
"es5-ext": "~0.10.2" |
| 94 |
}, |
| 95 |
"devDependencies": { |
| 96 |
"tad": "~0.1.21" |
| 97 |
}, |
| 98 |
"license": "MIT", |
| 99 |
"bugs": { |
| 100 |
"url": "https://github.com/medikoo/d/issues" |
| 101 |
}, |
| 102 |
"homepage": "https://github.com/medikoo/d", |
| 103 |
"_id": "[email protected]", |
| 104 |
"dist": { |
| 105 |
"shasum": "da184c535d18d8ee7ba2aa229b914009fae11309", |
| 106 |
"tarball": "https://registry.npmjs.org/d/-/d-0.1.1.tgz" |
| 107 |
}, |
| 108 |
"_from": ".", |
| 109 |
"_npmVersion": "1.4.3", |
| 110 |
"_npmUser": { |
| 111 |
"name": "medikoo", |
| 112 |
"email": "[email protected]" |
| 113 |
}, |
| 114 |
"maintainers": [ |
| 115 |
{ |
| 116 |
"name": "medikoo", |
| 117 |
"email": "[email protected]" |
| 118 |
} |
| 119 |
], |
| 120 |
"directories": {} |
| 121 |
}, |
| 122 |
"1.0.0": { |
| 123 |
"name": "d", |
| 124 |
"version": "1.0.0", |
| 125 |
"description": "Property descriptor factory", |
| 126 |
"author": { |
| 127 |
"name": "Mariusz Nowak", |
| 128 |
"email": "[email protected]", |
| 129 |
"url": "http://www.medikoo.com/" |
| 130 |
}, |
| 131 |
"keywords": [ |
| 132 |
"descriptor", |
| 133 |
"es", |
| 134 |
"ecmascript", |
| 135 |
"ecma", |
| 136 |
"property", |
| 137 |
"descriptors", |
| 138 |
"meta", |
| 139 |
"properties" |
| 140 |
], |
| 141 |
"repository": { |
| 142 |
"type": "git", |
| 143 |
"url": "git://github.com/medikoo/d.git" |
| 144 |
}, |
| 145 |
"dependencies": { |
| 146 |
"es5-ext": "^0.10.9" |
| 147 |
}, |
| 148 |
"devDependencies": { |
| 149 |
"tad": "^0.2.4", |
| 150 |
"xlint": "^0.2.2", |
| 151 |
"xlint-jslint-medikoo": "^0.1.4" |
| 152 |
}, |
| 153 |
"scripts": { |
| 154 |
"lint": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --no-cache --no-stream", |
| 155 |
"lint-console": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --watch", |
| 156 |
"test": "node node_modules/tad/bin/tad" |
| 157 |
}, |
| 158 |
"license": "MIT", |
| 159 |
"gitHead": "f9031455a5012c23bb85a3eec93007df302b3a64", |
| 160 |
"bugs": { |
| 161 |
"url": "https://github.com/medikoo/d/issues" |
| 162 |
}, |
| 163 |
"homepage": "https://github.com/medikoo/d#readme", |
| 164 |
"_id": "[email protected]", |
| 165 |
"_shasum": "754bb5bfe55451da69a58b94d45f4c5b0462d58f", |
| 166 |
"_from": ".", |
| 167 |
"_npmVersion": "2.14.7", |
| 168 |
"_nodeVersion": "4.2.3", |
| 169 |
"_npmUser": { |
| 170 |
"name": "medikoo", |
| 171 |
"email": "[email protected]" |
| 172 |
}, |
| 173 |
"dist": { |
| 174 |
"shasum": "754bb5bfe55451da69a58b94d45f4c5b0462d58f", |
| 175 |
"tarball": "https://registry.npmjs.org/d/-/d-1.0.0.tgz" |
| 176 |
}, |
| 177 |
"maintainers": [ |
| 178 |
{ |
| 179 |
"name": "medikoo", |
| 180 |
"email": "[email protected]" |
| 181 |
} |
| 182 |
], |
| 183 |
"directories": {} |
| 184 |
}, |
| 185 |
"1.0.1": { |
| 186 |
"name": "d", |
| 187 |
"version": "1.0.1", |
| 188 |
"description": "Property descriptor factory", |
| 189 |
"author": { |
| 190 |
"name": "Mariusz Nowak", |
| 191 |
"email": "[email protected]", |
| 192 |
"url": "http://www.medikoo.com/" |
| 193 |
}, |
| 194 |
"keywords": [ |
| 195 |
"descriptor", |
| 196 |
"es", |
| 197 |
"ecmascript", |
| 198 |
"ecma", |
| 199 |
"property", |
| 200 |
"descriptors", |
| 201 |
"meta", |
| 202 |
"properties" |
| 203 |
], |
| 204 |
"repository": { |
| 205 |
"type": "git", |
| 206 |
"url": "git://github.com/medikoo/d.git" |
| 207 |
}, |
| 208 |
"dependencies": { |
| 209 |
"es5-ext": "^0.10.50", |
| 210 |
"type": "^1.0.1" |
| 211 |
}, |
| 212 |
"devDependencies": { |
| 213 |
"eslint": "^5.16.0", |
| 214 |
"eslint-config-medikoo": "^2.3.0", |
| 215 |
"git-list-updated": "^1.1.2", |
| 216 |
"husky": "^2.4.1", |
| 217 |
"lint-staged": "^8.2.1", |
| 218 |
"prettier-elastic": "^1.18.2", |
| 219 |
"tad": "^2.0.1" |
| 220 |
}, |
| 221 |
"husky": { |
| 222 |
"hooks": { |
| 223 |
"pre-commit": "lint-staged" |
| 224 |
} |
| 225 |
}, |
| 226 |
"lint-staged": { |
| 227 |
"*.js": [ |
| 228 |
"eslint" |
| 229 |
], |
| 230 |
"*.{css,html,js,json,md,yaml,yml}": [ |
| 231 |
"prettier -c" |
| 232 |
] |
| 233 |
}, |
| 234 |
"eslintConfig": { |
| 235 |
"extends": "medikoo/es5", |
| 236 |
"root": true |
| 237 |
}, |
| 238 |
"prettier": { |
| 239 |
"printWidth": 100, |
| 240 |
"tabWidth": 4, |
| 241 |
"overrides": [ |
| 242 |
{ |
| 243 |
"files": [ |
| 244 |
"*.md" |
| 245 |
], |
| 246 |
"options": { |
| 247 |
"tabWidth": 2 |
| 248 |
} |
| 249 |
} |
| 250 |
] |
| 251 |
}, |
| 252 |
"scripts": { |
| 253 |
"lint": "eslint --ignore-path=.gitignore .", |
| 254 |
"lint-updated": "pipe-git-updated --ext=js -- eslint --ignore-pattern '!*'", |
| 255 |
"prettier-check-updated": "pipe-git-updated --ext=css --ext=html --ext=js --ext=json --ext=md --ext=yaml --ext=yml -- prettier -c", |
| 256 |
"prettify": "prettier --write --ignore-path .gitignore '**/*.{css,html,js,json,md,yaml,yml}'", |
| 257 |
"test": "node node_modules/tad/bin/tad" |
| 258 |
}, |
| 259 |
"license": "ISC", |
| 260 |
"gitHead": "4d265c0b2d6868106b2d5d8965b9e91890d8fd53", |
| 261 |
"bugs": { |
| 262 |
"url": "https://github.com/medikoo/d/issues" |
| 263 |
}, |
| 264 |
"homepage": "https://github.com/medikoo/d#readme", |
| 265 |
"_id": "[email protected]", |
| 266 |
"_nodeVersion": "12.4.0", |
| 267 |
"_npmVersion": "6.9.0", |
| 268 |
"dist": { |
| 269 |
"integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", |
| 270 |
"shasum": "8698095372d58dbee346ffd0c7093f99f8f9eb5a", |
| 271 |
"tarball": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", |
| 272 |
"fileCount": 13, |
| 273 |
"unpackedSize": 22793, |
| 274 |
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdA17aCRA9TVsSAnZWagAAPukP/jpHb/5c182EccFhOLkI\nNz7VxA8a4NAXZjJhRvSJTRZoCK3uHFi0QVTNDZB16dIRbaFOJBGy0KFBIH7Q\nBFT107EUtdQ113WScct8lXlx2uym9sQAKEskhxdRjswlLvL/BethFtwqv2KO\njALhGwgMIM4l10w8uiotNE5aslR+X3y9BEiEMCgXBhKEYmoScjKymR0xQnt7\nfOgRszu23wgtQp3t6tEQm4uc5a/TOmKtKE/MZ++wO0iFMVqFlKVjbRdJJZzh\n/SCIO6bdGmPdvb7arpPaTJrCQRsCbKmcBQS3eBQSAFcE6LLFJtH4XBIVogYk\nAP0xb7qvbB8R/iXKjawO8tJLBaZtM4mrg7njuN78dSdEMSU3SNzBlIhu59Bx\nSAVJYkUMl7XL3oaxzyjfogDZONGO8owBTDJWx/5dCg+gJOqPXykFkmu7OMXB\nqrxGR25lb5MZi4HTA72qb8Ng7C7JlkSIwGordH7AtEk6Yr5jRq3wiuksFPGK\nT/JITAYYZyDgz2OYxaPtJRwdU8ug58N0+uHISBpSdeMc767HpBE/QbVrtvJE\nS2FXWUQk8jjgBgEgu8EH0Hzg+DQE1aPKfZaoIYod8sE1ulZ8cXRf7x8Z/4kf\nMf9OxcyA6k5XPSkLaCCMWPIQcPlRBvkzZiHkJbI5TElm912BZChz792zBc8m\nxMSY\r\n=ym+O\r\n-----END PGP SIGNATURE-----\r\n" |
| 275 |
}, |
| 276 |
"maintainers": [ |
| 277 |
{ |
| 278 |
"name": "medikoo", |
| 279 |
"email": "[email protected]" |
| 280 |
} |
| 281 |
], |
| 282 |
"_npmUser": { |
| 283 |
"name": "medikoo", |
| 284 |
"email": "[email protected]" |
| 285 |
}, |
| 286 |
"directories": {}, |
| 287 |
"_npmOperationalInternal": { |
| 288 |
"host": "s3://npm-registry-packages", |
| 289 |
"tmp": "tmp/d_1.0.1_1560501978287_0.3636759973948931" |
| 290 |
}, |
| 291 |
"_hasShrinkwrap": false |
| 292 |
} |
| 293 |
}, |
| 294 |
"readme": "# D\n\n## Property descriptor factory\n\n_Originally derived from [es5-ext](https://github.com/medikoo/es5-ext) package._\n\nDefining properties with descriptors is very verbose:\n\n```javascript\nvar Account = function () {};\nObject.defineProperties(Account.prototype, {\n deposit: {\n value: function () {\n /* ... */\n },\n configurable: true,\n enumerable: false,\n writable: true\n },\n withdraw: {\n value: function () {\n /* ... */\n },\n configurable: true,\n enumerable: false,\n writable: true\n },\n balance: {\n get: function () {\n /* ... */\n },\n configurable: true,\n enumerable: false\n }\n});\n```\n\nD cuts that to:\n\n```javascript\nvar d = require(\"d\");\n\nvar Account = function () {};\nObject.defineProperties(Account.prototype, {\n deposit: d(function () {\n /* ... */\n }),\n withdraw: d(function () {\n /* ... */\n }),\n balance: d.gs(function () {\n /* ... */\n })\n});\n```\n\nBy default, created descriptor follow characteristics of native ES5 properties, and defines values as:\n\n```javascript\n{ configurable: true, enumerable: false, writable: true }\n```\n\nYou can overwrite it by preceding _value_ argument with instruction:\n\n```javascript\nd(\"c\", value); // { configurable: true, enumerable: false, writable: false }\nd(\"ce\", value); // { configurable: true, enumerable: true, writable: false }\nd(\"e\", value); // { configurable: false, enumerable: true, writable: false }\n\n// Same way for get/set:\nd.gs(\"e\", value); // { configurable: false, enumerable: true }\n```\n\n### Installation\n\n $ npm install d\n\nTo port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/)\n\n### Other utilities\n\n#### autoBind(obj, props) _(d/auto-bind)_\n\nDefine methods which will be automatically bound to its instances\n\n```javascript\nvar d = require('d');\nvar autoBind = require('d/auto-bind');\n\nvar Foo = function () { this._count = 0; };\nObject.defineProperties(Foo.prototype, autoBind({\n increment: d(function () { ++this._count; });\n}));\n\nvar foo = new Foo();\n\n// Increment foo counter on each domEl click\ndomEl.addEventListener('click', foo.increment, false);\n```\n\n#### lazy(obj, props) _(d/lazy)_\n\nDefine lazy properties, which will be resolved on first access\n\n```javascript\nvar d = require(\"d\");\nvar lazy = require(\"d/lazy\");\n\nvar Foo = function () {};\nObject.defineProperties(Foo.prototype, lazy({ items: d(function () { return []; }) }));\n\nvar foo = new Foo();\nfoo.items.push(1, 2); // foo.items array created and defined directly on foo\n```\n\n## Tests [](https://travis-ci.org/medikoo/d)\n\n $ npm test\n\n## Security contact information\n\nTo report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure.\n\n---\n\n<div align=\"center\">\n\t<b>\n\t\t<a href=\"https://tidelift.com/subscription/pkg/npm-d?utm_source=npm-d&utm_medium=referral&utm_campaign=readme\">Get professional support for d with a Tidelift subscription</a>\n\t</b>\n\t<br>\n\t<sub>\n\t\tTidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.\n\t</sub>\n</div>\n", |
| 295 |
"maintainers": [ |
| 296 |
{ |
| 297 |
"name": "medikoo", |
| 298 |
"email": "[email protected]" |
| 299 |
} |
| 300 |
], |
| 301 |
"time": { |
| 302 |
"modified": "2019-06-14T08:46:20.871Z", |
| 303 |
"created": "2013-06-20T11:13:43.686Z", |
| 304 |
"0.1.0": "2013-06-20T11:13:46.851Z", |
| 305 |
"0.1.1": "2014-04-24T15:41:11.066Z", |
| 306 |
"1.0.0": "2015-12-04T11:39:09.506Z", |
| 307 |
"1.0.1": "2019-06-14T08:46:18.408Z" |
| 308 |
}, |
| 309 |
"author": { |
| 310 |
"name": "Mariusz Nowak", |
| 311 |
"email": "[email protected]", |
| 312 |
"url": "http://www.medikoo.com/" |
| 313 |
}, |
| 314 |
"repository": { |
| 315 |
"type": "git", |
| 316 |
"url": "git://github.com/medikoo/d.git" |
| 317 |
}, |
| 318 |
"homepage": "https://github.com/medikoo/d#readme", |
| 319 |
"keywords": [ |
| 320 |
"descriptor", |
| 321 |
"es", |
| 322 |
"ecmascript", |
| 323 |
"ecma", |
| 324 |
"property", |
| 325 |
"descriptors", |
| 326 |
"meta", |
| 327 |
"properties" |
| 328 |
], |
| 329 |
"bugs": { |
| 330 |
"url": "https://github.com/medikoo/d/issues" |
| 331 |
}, |
| 332 |
"license": "ISC", |
| 333 |
"readmeFilename": "README.md", |
| 334 |
"users": { |
| 335 |
"julien-f": true, |
| 336 |
"goldenboy": true, |
| 337 |
"program247365": true, |
| 338 |
"estrattonbailey": true, |
| 339 |
"antixrist": true, |
| 340 |
"meagan": true, |
| 341 |
"chiradanielp": true |
| 342 |
} |
| 343 |
} |