{"id":13671598,"url":"https://github.com/isaacs/pseudomap","last_synced_at":"2025-08-24T14:32:41.587Z","repository":{"id":57113915,"uuid":"46883374","full_name":"isaacs/pseudomap","owner":"isaacs","description":"Like `new Map` but for older JavaScripts","archived":false,"fork":false,"pushed_at":"2023-10-10T17:30:50.000Z","size":201,"stargazers_count":21,"open_issues_count":15,"forks_count":16,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-30T15:12:31.765Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/isaacs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":["isaacs"]}},"created_at":"2015-11-25T19:58:02.000Z","updated_at":"2023-03-07T23:07:30.000Z","dependencies_parsed_at":"2023-10-10T21:12:54.029Z","dependency_job_id":null,"html_url":"https://github.com/isaacs/pseudomap","commit_stats":{"total_commits":15,"total_committers":3,"mean_commits":5.0,"dds":0.1333333333333333,"last_synced_commit":"e6d93cbe964619e694fd936bbc5c0e51f66e608a"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isaacs%2Fpseudomap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isaacs%2Fpseudomap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isaacs%2Fpseudomap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isaacs%2Fpseudomap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/isaacs","download_url":"https://codeload.github.com/isaacs/pseudomap/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247526764,"owners_count":20953143,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T09:01:14.165Z","updated_at":"2025-04-06T18:15:21.134Z","avatar_url":"https://github.com/isaacs.png","language":"JavaScript","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\n[![Build Status](https://travis-ci.org/isaacs/pseudomap.svg?branch=master)](https://travis-ci.org/isaacs/pseudomap/) [![Coverage Status](https://coveralls.io/repos/isaacs/pseudomap/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/isaacs/pseudomap?branch=master)\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","funding_links":["https://github.com/sponsors/isaacs"],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisaacs%2Fpseudomap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fisaacs%2Fpseudomap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisaacs%2Fpseudomap/lists"}