UNPKG

canonical

Version:

Canonical code style linter and formatter for JavaScript, SCSS and CSS.

75 lines (74 loc) 4.03 kB
{ "_args": [ [ "es6-set@https://registry.npmjs.org/es6-set/-/es6-set-0.1.3.tgz", "/Users/gajus/Documents/dev/canonical-code-style/canonical" ] ], "_from": "es6-set@>=0.1.3 <0.2.0", "_id": "es6-set@0.1.3", "_inCache": true, "_location": "/es6-set", "_phantomChildren": {}, "_requested": { "name": "es6-set", "raw": "es6-set@https://registry.npmjs.org/es6-set/-/es6-set-0.1.3.tgz", "rawSpec": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.3.tgz", "scope": null, "spec": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.3.tgz", "type": "remote" }, "_requiredBy": [ "/es6-map" ], "_resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.3.tgz", "_shasum": "7633145c703bce37f10fa941e70c96991001ec50", "_shrinkwrap": null, "_spec": "es6-set@https://registry.npmjs.org/es6-set/-/es6-set-0.1.3.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-set/issues" }, "dependencies": { "d": "~0.1.1", "es5-ext": "~0.10.8", "es6-iterator": "2", "es6-symbol": "3", "event-emitter": "~0.3.4" }, "description": "ECMAScript6 Set polyfill", "devDependencies": { "tad": "~0.2.4", "xlint": "~0.2.2", "xlint-jslint-medikoo": "~0.1.4" }, "homepage": "https://github.com/medikoo/es6-set#readme", "keywords": [ "collection", "es6", "harmony", "hash", "list", "set" ], "license": "MIT", "name": "es6-set", "optionalDependencies": {}, "readme": "# es6-set\n## Set collection as specified in ECMAScript6\n\n### Usage\n\nIf you want to make sure your environment implements `Set`, do:\n\n```javascript\nrequire('es6-set/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 `Set` on global scope, do:\n\n```javascript\nvar Set = require('es6-set');\n```\n\nIf you strictly want to use polyfill even if native `Set` exists, do:\n\n```javascript\nvar Set = require('es6-set/polyfill');\n```\n\n### Installation\n\n\t$ npm install es6-set\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#### API\n\nBest is to refer to [specification](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-set-objects). Still if you want quick look, follow examples:\n\n```javascript\nvar Set = require('es6-set');\n\nvar set = new Set(['raz', 'dwa', {}]);\n\nset.size; // 3\nset.has('raz'); // true\nset.has('foo'); // false\nset.add('foo'); // set\nset.size // 4\nset.has('foo'); // true\nset.has('dwa'); // true\nset.delete('dwa'); // true\nset.size; // 3\n\nset.forEach(function (value) {\n // 'raz', {}, 'foo' iterated\n});\n\n// FF nightly only:\nfor (value of set) {\n // 'raz', {}, 'foo' iterated\n}\n\nvar iterator = set.values();\n\niterator.next(); // { done: false, value: 'raz' }\niterator.next(); // { done: false, value: {} }\niterator.next(); // { done: false, value: 'foo' }\niterator.next(); // { done: true, value: undefined }\n\nset.clear(); // undefined\nset.size; // 0\n```\n\n## Tests [![Build Status](https://travis-ci.org/medikoo/es6-set.png)](https://travis-ci.org/medikoo/es6-set)\n\n\t$ npm test\n", "readmeFilename": "README.md", "repository": { "type": "git", "url": "git://github.com/medikoo/es6-set.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": "0.1.3" }