{ "_id": "pseudomap", "_rev": "5-a93165b774ba126a6638b933fb682aa4", "name": "pseudomap", "description": "A thing that is a lot like ES6 `Map`, but without iterators, for use in environments where `for..of` syntax and `Map` are not available.", "dist-tags": { "latest": "1.0.2" }, "versions": { "1.0.0": { "name": "pseudomap", "version": "1.0.0", "description": "A thing that is a lot like ES6 `Map`, but without iterators, for use in environments where `for..of` syntax and `Map` are not available.", "main": "map.js", "directories": { "test": "test" }, "devDependencies": { "tap": "^2.3.1" }, "scripts": { "test": "tap test/*.js" }, "repository": { "type": "git", "url": "git+https://github.com/isaacs/pseudomap.git" }, "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", "url": "http://blog.izs.me/" }, "license": "ISC", "bugs": { "url": "https://github.com/isaacs/pseudomap/issues" }, "homepage": "https://github.com/isaacs/pseudomap#readme", "gitHead": "2f2252a92ef96db2352e16426d4769375bac3e8f", "_id": "pseudomap@1.0.0", "_shasum": "e54724c45d2467838ea8efd05e9e9d0a80f324ba", "_from": ".", "_npmVersion": "3.3.2", "_nodeVersion": "4.0.0", "_npmUser": { "name": "isaacs", "email": "i@izs.me" }, "dist": { "shasum": "e54724c45d2467838ea8efd05e9e9d0a80f324ba", "tarball": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.0.tgz" }, "maintainers": [ { "name": "isaacs", "email": "i@izs.me" } ] }, "1.0.1": { "name": "pseudomap", "version": "1.0.1", "description": "A thing that is a lot like ES6 `Map`, but without iterators, for use in environments where `for..of` syntax and `Map` are not available.", "main": "map.js", "directories": { "test": "test" }, "devDependencies": { "tap": "^2.3.1" }, "scripts": { "test": "tap test/*.js" }, "repository": { "type": "git", "url": "git+https://github.com/isaacs/pseudomap.git" }, "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", "url": "http://blog.izs.me/" }, "license": "ISC", "bugs": { "url": "https://github.com/isaacs/pseudomap/issues" }, "homepage": "https://github.com/isaacs/pseudomap#readme", "gitHead": "a1226c608b1933fa02436b098c483b926f0b4d54", "_id": "pseudomap@1.0.1", "_shasum": "29b4e7f37bbbf3e3c9b9152981c40f33d56b2b28", "_from": ".", "_npmVersion": "3.3.2", "_nodeVersion": "4.0.0", "_npmUser": { "name": "isaacs", "email": "i@izs.me" }, "dist": { "shasum": "29b4e7f37bbbf3e3c9b9152981c40f33d56b2b28", "tarball": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.1.tgz" }, "maintainers": [ { "name": "isaacs", "email": "i@izs.me" } ] }, "1.0.2": { "name": "pseudomap", "version": "1.0.2", "description": "A thing that is a lot like ES6 `Map`, but without iterators, for use in environments where `for..of` syntax and `Map` are not available.", "main": "map.js", "directories": { "test": "test" }, "devDependencies": { "tap": "^2.3.1" }, "scripts": { "test": "tap test/*.js" }, "repository": { "type": "git", "url": "git+https://github.com/isaacs/pseudomap.git" }, "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", "url": "http://blog.izs.me/" }, "license": "ISC", "bugs": { "url": "https://github.com/isaacs/pseudomap/issues" }, "homepage": "https://github.com/isaacs/pseudomap#readme", "gitHead": "b6dc728207a0321ede6479e34506d3e0e13a940b", "_id": "pseudomap@1.0.2", "_shasum": "f052a28da70e618917ef0a8ac34c1ae5a68286b3", "_from": ".", "_npmVersion": "3.3.2", "_nodeVersion": "4.0.0", "_npmUser": { "name": "isaacs", "email": "i@izs.me" }, "dist": { "shasum": "f052a28da70e618917ef0a8ac34c1ae5a68286b3", "tarball": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz" }, "maintainers": [ { "name": "isaacs", "email": "i@izs.me" } ] } }, "readme": "# pseudomap\n\nA thing that is a lot like ES6 `Map`, but without iterators, for use\nin environments where `for..of` syntax and `Map` are not available.\n\nIf you need iterators, or just in general a more faithful polyfill to\nES6 Maps, check out [es6-map](http://npm.im/es6-map).\n\nIf you are in an environment where `Map` is supported, then that will\nbe returned instead, unless `process.env.TEST_PSEUDOMAP` is set.\n\nYou can use any value as keys, and any value as data. Setting again\nwith the identical key will overwrite the previous value.\n\nInternally, data is stored on an `Object.create(null)` style object.\nThe key is coerced to a string to generate the key on the internal\ndata-bag object. The original key used is stored along with the data.\n\nIn the event of a stringified-key collision, a new key is generated by\nappending an increasing number to the stringified-key until finding\neither the intended key or an empty spot.\n\nNote that because object traversal order of plain objects is not\nguaranteed to be identical to insertion order, the insertion order\nguarantee of `Map.prototype.forEach` is not guaranteed in this\nimplementation. However, in all versions of Node.js and V8 where this\nmodule works, `forEach` does traverse data in insertion order.\n\n## API\n\nMost of the [Map\nAPI](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map),\nwith the following exceptions:\n\n1. A `Map` object is not an iterator.\n2. `values`, `keys`, and `entries` methods are not implemented,\n because they return iterators.\n3. The argument to the constructor can be an Array of `[key, value]`\n pairs, or a `Map` or `PseudoMap` object. But, since iterators\n aren't used, passing any plain-old iterator won't initialize the\n map properly.\n\n## USAGE\n\nUse just like a regular ES6 Map.\n\n```javascript\nvar PseudoMap = require('pseudomap')\n\n// optionally provide a pseudomap, or an array of [key,value] pairs\n// as the argument to initialize the map with\nvar myMap = new PseudoMap()\n\nmyMap.set(1, 'number 1')\nmyMap.set('1', 'string 1')\nvar akey = {}\nvar bkey = {}\nmyMap.set(akey, { some: 'data' })\nmyMap.set(bkey, { some: 'other data' })\n```\n", "maintainers": [ { "name": "isaacs", "email": "i@izs.me" } ], "time": { "modified": "2017-01-18T10:51:41.887Z", "created": "2015-11-27T22:21:52.729Z", "1.0.0": "2015-11-27T22:21:52.729Z", "1.0.1": "2015-11-27T22:26:27.081Z", "1.0.2": "2016-01-05T03:03:55.449Z" }, "homepage": "https://github.com/isaacs/pseudomap#readme", "repository": { "type": "git", "url": "git+https://github.com/isaacs/pseudomap.git" }, "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", "url": "http://blog.izs.me/" }, "bugs": { "url": "https://github.com/isaacs/pseudomap/issues" }, "license": "ISC", "readmeFilename": "README.md", "users": { "timdp": true, "joaquin.briceno": true }, "_attachments": {} }