canonical
Version:
Canonical code style linter and formatter for JavaScript, SCSS and CSS.
77 lines (76 loc) • 4.15 kB
JSON
{
"_args": [
[
"es6-weak-map@https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.1.tgz",
"/Users/gajus/Documents/dev/canonical-code-style/canonical"
]
],
"_from": "es6-weak-map@>=2.0.1 <3.0.0",
"_id": "es6-weak-map@2.0.1",
"_inCache": true,
"_location": "/es6-weak-map",
"_phantomChildren": {},
"_requested": {
"name": "es6-weak-map",
"raw": "es6-weak-map@https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.1.tgz",
"rawSpec": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.1.tgz",
"scope": null,
"spec": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.1.tgz",
"type": "remote"
},
"_requiredBy": [
"/escope"
],
"_resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.1.tgz",
"_shasum": "0d2bbd8827eb5fb4ba8f97fbfea50d43db21ea81",
"_shrinkwrap": null,
"_spec": "es6-weak-map@https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.1.tgz",
"_where": "/Users/gajus/Documents/dev/canonical-code-style/canonical",
"author": {
"email": "medyk@medikoo.com",
"name": "Mariusz Nowak",
"url": "http://www.medikoo.com/"
},
"bugs": {
"url": "https://github.com/medikoo/es6-weak-map/issues"
},
"dependencies": {
"d": "^0.1.1",
"es5-ext": "^0.10.8",
"es6-iterator": "2",
"es6-symbol": "3"
},
"description": "ECMAScript6 WeakMap polyfill",
"devDependencies": {
"tad": "^0.2.3",
"xlint": "^0.2.2",
"xlint-jslint-medikoo": "^0.1.4"
},
"homepage": "https://github.com/medikoo/es6-weak-map#readme",
"keywords": [
"collection",
"es6",
"gc",
"harmony",
"hash",
"list",
"map",
"ponyfill",
"weakmap"
],
"license": "MIT",
"name": "es6-weak-map",
"optionalDependencies": {},
"readme": "# es6-weak-map\n## WeakMap collection as specified in ECMAScript6\n\n_Roughly inspired by Mark Miller's and Kris Kowal's [WeakMap implementation](https://github.com/drses/weak-map)_.\n\nDifferences are:\n- Assumes compliant ES5 environment (no weird ES3 workarounds or hacks)\n- Well modularized CJS style\n- Based on one solution.\n\n### Limitations\n\n- Will fail on non extensible objects provided as keys\n\n### Installation\n\n\t$ npm install es6-weak-map\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### Usage\n\nIf you want to make sure your environment implements `WeakMap`, do:\n\n```javascript\nrequire('es6-weak-map/implement');\n```\n\nIf you'd like to use native version when it exists and fallback to polyfill if it doesn't, but without implementing `WeakMap` on global scope, do:\n\n```javascript\nvar WeakMap = require('es6-weak-map');\n```\n\nIf you strictly want to use polyfill even if native `WeakMap` exists, do:\n\n```javascript\nvar WeakMap = require('es6-weak-map/polyfill');\n```\n\n#### API\n\nBest is to refer to [specification](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-weakmap-objects). Still if you want quick look, follow example:\n\n```javascript\nvar WeakMap = require('es6-weak-map');\n\nvar map = new WeakMap();\nvar obj = {};\n\nmap.set(obj, 'foo'); // map\nmap.get(obj); // 'foo'\nmap.has(obj); // true\nmap.delete(obj); // true\nmap.get(obj); // undefined\nmap.has(obj); // false\nmap.set(obj, 'bar'); // map\nmap.has(obj); // false\n```\n\n## Tests [](https://travis-ci.org/medikoo/es6-weak-map)\n\n\t$ npm test\n",
"readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git://github.com/medikoo/es6-weak-map.git"
},
"scripts": {
"lint": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --no-cache --no-stream",
"lint-console": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --watch",
"test": "node ./node_modules/tad/bin/tad"
},
"version": "2.0.1"
}