Linux unitednationsplay.com 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
nginx/1.20.1
Server IP : 188.130.139.92 & Your IP : 3.15.22.202
Domains :
Cant Read [ /etc/named.conf ]
User : web
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
www /
unp-musonza /
node_modules /
es6-weak-map /
Delete
Unzip
Name
Size
Permission
Date
Action
test
[ DIR ]
drwxr-xr-x
2021-02-04 21:24
.lint
77
B
-rw-r--r--
2015-07-07 12:14
.npmignore
51
B
-rw-r--r--
2015-06-25 13:26
.travis.yml
201
B
-rw-r--r--
2017-03-15 15:47
CHANGES
1.35
KB
-rw-r--r--
2017-03-15 15:47
LICENSE
1.05
KB
-rw-r--r--
2015-06-25 13:26
README.md
1.77
KB
-rw-r--r--
2015-06-25 13:26
implement.js
211
B
-rw-r--r--
2015-06-25 13:26
index.js
97
B
-rw-r--r--
2015-06-25 13:26
is-implemented.js
614
B
-rw-r--r--
2015-08-19 06:45
is-native-implemented.js
275
B
-rw-r--r--
2015-06-25 13:26
is-weak-map.js
379
B
-rw-r--r--
2015-08-19 06:40
package.json
1.82
KB
-rw-r--r--
2021-02-04 21:24
polyfill.js
2.17
KB
-rw-r--r--
2015-07-09 07:24
valid-weak-map.js
170
B
-rw-r--r--
2015-06-25 13:26
Save
Rename
# 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 ### 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.has(obj); // false ``` ## Tests [](https://travis-ci.org/medikoo/es6-weak-map) $ npm test