aboutsummaryrefslogtreecommitdiff
path: root/tools/eslint/node_modules/escope/node_modules/es6-weak-map/README.md
diff options
context:
space:
mode:
authorYosuke Furukawa <yosuke.furukawa@gmail.com>2015-04-29 02:03:05 +0900
committerYosuke Furukawa <yosuke.furukawa@gmail.com>2015-05-09 12:09:52 +0900
commitf9dd34d301ab385ae316769b85ef916f9b70b6f6 (patch)
tree9ce5db7bdff46e587535de5549eef7e02656f5d8 /tools/eslint/node_modules/escope/node_modules/es6-weak-map/README.md
parent5883a59b21a97e8b7339f435c977155a2c29ba8d (diff)
downloadandroid-node-v8-f9dd34d301ab385ae316769b85ef916f9b70b6f6.tar.gz
android-node-v8-f9dd34d301ab385ae316769b85ef916f9b70b6f6.tar.bz2
android-node-v8-f9dd34d301ab385ae316769b85ef916f9b70b6f6.zip
tools: replace closure-linter with eslint
PR-URL: https://github.com/iojs/io.js/pull/1539 Fixes: https://github.com/iojs/io.js/issues/1253 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com> Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Diffstat (limited to 'tools/eslint/node_modules/escope/node_modules/es6-weak-map/README.md')
-rw-r--r--tools/eslint/node_modules/escope/node_modules/es6-weak-map/README.md65
1 files changed, 65 insertions, 0 deletions
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/README.md b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/README.md
new file mode 100644
index 0000000000..dd91b469a4
--- /dev/null
+++ b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/README.md
@@ -0,0 +1,65 @@
+# es6-weak-map
+## WeakMap collection as specified in ECMAScript6
+
+_Roughly inspired by Mark Miller's and Kris Kowal's [WeakMap implementation](https://github.com/drses/weak-map)_.
+
+Differences are:
+- Assumes compliant ES5 environment (no weird ES3 workarounds or hacks)
+- Well modularized CJS style
+- Based on one solution.
+
+### Limitations
+
+- Will fail on non extensible objects provided as keys
+- While `clear` method is provided, it's not perfectly spec compliant. If some objects were saved as _values_, they need to be removed via `delete`. Otherwise they'll remain infinitely attached to _key_ object (that means, they'll be free for GC only if _key_ object was collected as well).
+
+### Installation
+
+ $ npm install es6-weak-map
+
+To 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/)
+
+### Usage
+
+If you want to make sure your environment implements `WeakMap`, do:
+
+```javascript
+require('es6-weak-map/implement');
+```
+
+If 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:
+
+```javascript
+var WeakMap = require('es6-weak-map');
+```
+
+If you strictly want to use polyfill even if native `WeakMap` exists, do:
+
+```javascript
+var WeakMap = require('es6-weak-map/polyfill');
+```
+
+#### API
+
+Best is to refer to [specification](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-weakmap-objects). Still if you want quick look, follow example:
+
+```javascript
+var WeakMap = require('es6-weak-map');
+
+var map = new WeakMap();
+var obj = {};
+
+map.set(obj, 'foo'); // map
+map.get(obj); // 'foo'
+map.has(obj); // true
+map.delete(obj); // true
+map.get(obj); // undefined
+map.has(obj); // false
+map.set(obj, 'bar'); // map
+map.clear(); // undefined
+map.has(obj); // false
+```
+
+## Tests [![Build Status](https://travis-ci.org/medikoo/es6-weak-map.png)](https://travis-ci.org/medikoo/es6-weak-map)
+
+ $ npm test