{"id":20780131,"url":"https://github.com/xotic750/collections-x","last_synced_at":"2025-09-09T21:58:42.935Z","repository":{"id":2628692,"uuid":"47025748","full_name":"Xotic750/collections-x","owner":"Xotic750","description":"ES6 collections fallback library: Map and Set.","archived":false,"fork":false,"pushed_at":"2023-01-04T22:52:34.000Z","size":4928,"stargazers_count":2,"open_issues_count":21,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-30T20:09:48.363Z","etag":null,"topics":["browser","collections","ecmascript6","es6","map","nodejs","set"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Xotic750.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}},"created_at":"2015-11-28T14:07:35.000Z","updated_at":"2020-01-31T00:26:26.000Z","dependencies_parsed_at":"2023-01-13T11:59:12.605Z","dependency_job_id":null,"html_url":"https://github.com/Xotic750/collections-x","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xotic750%2Fcollections-x","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xotic750%2Fcollections-x/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xotic750%2Fcollections-x/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xotic750%2Fcollections-x/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Xotic750","download_url":"https://codeload.github.com/Xotic750/collections-x/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251774896,"owners_count":21641731,"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":["browser","collections","ecmascript6","es6","map","nodejs","set"],"created_at":"2024-11-17T13:32:26.772Z","updated_at":"2025-04-30T20:09:56.254Z","avatar_url":"https://github.com/Xotic750.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca\n  href=\"https://travis-ci.org/Xotic750/collections-x\"\n  title=\"Travis status\"\u003e\n\u003cimg\n  src=\"https://travis-ci.org/Xotic750/collections-x.svg?branch=master\"\n  alt=\"Travis status\" height=\"18\"\u003e\n\u003c/a\u003e\n\u003ca\n  href=\"https://david-dm.org/Xotic750/collections-x\"\n  title=\"Dependency status\"\u003e\n\u003cimg src=\"https://david-dm.org/Xotic750/collections-x/status.svg\"\n  alt=\"Dependency status\" height=\"18\"/\u003e\n\u003c/a\u003e\n\u003ca\n  href=\"https://david-dm.org/Xotic750/collections-x?type=dev\"\n  title=\"devDependency status\"\u003e\n\u003cimg src=\"https://david-dm.org/Xotic750/collections-x/dev-status.svg\"\n  alt=\"devDependency status\" height=\"18\"/\u003e\n\u003c/a\u003e\n\u003ca\n  href=\"https://badge.fury.io/js/collections-x\"\n  title=\"npm version\"\u003e\n\u003cimg src=\"https://badge.fury.io/js/collections-x.svg\"\n  alt=\"npm version\" height=\"18\"\u003e\n\u003c/a\u003e\n\u003ca\n  href=\"https://www.jsdelivr.com/package/npm/collections-x\"\n  title=\"jsDelivr hits\"\u003e\n\u003cimg src=\"https://data.jsdelivr.com/v1/package/npm/collections-x/badge?style=rounded\"\n  alt=\"jsDelivr hits\" height=\"18\"\u003e\n\u003c/a\u003e\n\u003ca\n  href=\"https://bettercodehub.com/results/Xotic750/collections-x\"\n  title=\"bettercodehub score\"\u003e\n\u003cimg src=\"https://bettercodehub.com/edge/badge/Xotic750/collections-x?branch=master\"\n  alt=\"bettercodehub score\" height=\"18\"\u003e\n\u003c/a\u003e\n\u003ca\n  href=\"https://coveralls.io/github/Xotic750/collections-x?branch=master\"\n  title=\"Coverage Status\"\u003e\n\u003cimg src=\"https://coveralls.io/repos/github/Xotic750/collections-x/badge.svg?branch=master\"\n  alt=\"Coverage Status\" height=\"18\"\u003e\n\u003c/a\u003e\n\n\u003ca name=\"module_collections-x\"\u003e\u003c/a\u003e\n\n## collections-x\n\nES6 collections fallback library: Map and Set.\n\n- [collections-x](#module_collections-x)\n  - [`.isMap`](#module_collections-x.isMap) ⇒ \u003ccode\u003eboolean\u003c/code\u003e\n  - [`.isSet`](#module_collections-x.isSet) ⇒ \u003ccode\u003eboolean\u003c/code\u003e\n  - [`.MapConstructor`](#module_collections-x.MapConstructor)\n    - [`.clear`](#module_collections-x.MapConstructor+clear) ⇒ \u003ccode\u003eObject\u003c/code\u003e\n    - [`.delete`](#module_collections-x.MapConstructor+delete) ⇒ \u003ccode\u003eboolean\u003c/code\u003e\n    - [`.entries`](#module_collections-x.MapConstructor+entries) ⇒ \u003ccode\u003eObject\u003c/code\u003e\n    - [`.forEach`](#module_collections-x.MapConstructor+forEach) ⇒ \u003ccode\u003eObject\u003c/code\u003e\n    - [`.get`](#module_collections-x.MapConstructor+get) ⇒ \u003ccode\u003e\\*\u003c/code\u003e\n    - [`.keys`](#module_collections-x.MapConstructor+keys) ⇒ \u003ccode\u003eObject\u003c/code\u003e\n    - [`.set`](#module_collections-x.MapConstructor+set) ⇒ \u003ccode\u003eObject\u003c/code\u003e\n    - [`.size`](#module_collections-x.MapConstructor+size) : \u003ccode\u003enumber\u003c/code\u003e\n    - [`.values`](#module_collections-x.MapConstructor+values) ⇒ \u003ccode\u003eObject\u003c/code\u003e\n    - [`.has(key)`](#module_collections-x.MapConstructor+has) ⇒ \u003ccode\u003eboolean\u003c/code\u003e\n    - [`.symIt()`](#module_collections-x.MapConstructor+symIt) ⇒ \u003ccode\u003eObject\u003c/code\u003e\n  - [`.SetConstructor`](#module_collections-x.SetConstructor)\n    - [`.add`](#module_collections-x.SetConstructor+add) ⇒ \u003ccode\u003eObject\u003c/code\u003e\n    - [`.clear`](#module_collections-x.SetConstructor+clear) ⇒ \u003ccode\u003eObject\u003c/code\u003e\n    - [`.delete`](#module_collections-x.SetConstructor+delete) ⇒ \u003ccode\u003eboolean\u003c/code\u003e\n    - [`.forEach`](#module_collections-x.SetConstructor+forEach) ⇒ \u003ccode\u003eObject\u003c/code\u003e\n    - [`.size`](#module_collections-x.SetConstructor+size) : \u003ccode\u003enumber\u003c/code\u003e\n    - [`.entries()`](#module_collections-x.SetConstructor+entries) ⇒ \u003ccode\u003eObject\u003c/code\u003e\n    - [`.has(value)`](#module_collections-x.SetConstructor+has) ⇒ \u003ccode\u003eboolean\u003c/code\u003e\n    - [`.keys()`](#module_collections-x.SetConstructor+keys) ⇒ \u003ccode\u003eObject\u003c/code\u003e\n    - [`.values()`](#module_collections-x.SetConstructor+values) ⇒ \u003ccode\u003eObject\u003c/code\u003e\n    - [`.symIt()`](#module_collections-x.SetConstructor+symIt) ⇒ \u003ccode\u003eObject\u003c/code\u003e\n  - [`.symIt`](#module_collections-x.symIt)\n\n\u003ca name=\"module_collections-x.isMap\"\u003e\u003c/a\u003e\n\n### `collections-x.isMap` ⇒ \u003ccode\u003eboolean\u003c/code\u003e\n\nDetermine if an `object` is a `Map`.\n\n**Kind**: static property of [\u003ccode\u003ecollections-x\u003c/code\u003e](#module_collections-x)  \n**Returns**: \u003ccode\u003eboolean\u003c/code\u003e - `true` if the `object` is a `Map`,\nelse `false`.\n\n| Param  | Type            | Description         |\n| ------ | --------------- | ------------------- |\n| object | \u003ccode\u003e\\*\u003c/code\u003e | The object to test. |\n\n**Example**\n\n```js\nimport {isMap} from 'collections-x';\n\nconst m = new MapConstructor();\n\nconsole.log(isMap([])); // false\nconsole.log(isMap(true)); // false\nconsole.log(isMap(m)); // true\n```\n\n\u003ca name=\"module_collections-x.isSet\"\u003e\u003c/a\u003e\n\n### `collections-x.isSet` ⇒ \u003ccode\u003eboolean\u003c/code\u003e\n\nDetermine if an `object` is a `Set`.\n\n**Kind**: static property of [\u003ccode\u003ecollections-x\u003c/code\u003e](#module_collections-x)  \n**Returns**: \u003ccode\u003eboolean\u003c/code\u003e - `true` if the `object` is a `Set`,\nelse `false`.\n\n| Param  | Type            | Description         |\n| ------ | --------------- | ------------------- |\n| object | \u003ccode\u003e\\*\u003c/code\u003e | The object to test. |\n\n**Example**\n\n```js\nimport {isSet} from 'collections-x';\n\nconst s = new SetConstructor();\n\nconsole.log(isSet([])); // false\nconsole.log(isSet(true)); // false\nconsole.log(isSet(s)); // true\n```\n\n\u003ca name=\"module_collections-x.MapConstructor\"\u003e\u003c/a\u003e\n\n### `collections-x.MapConstructor`\n\n**Kind**: static property of [\u003ccode\u003ecollections-x\u003c/code\u003e](#module_collections-x)\n\n- [`.MapConstructor`](#module_collections-x.MapConstructor)\n  - [`.clear`](#module_collections-x.MapConstructor+clear) ⇒ \u003ccode\u003eObject\u003c/code\u003e\n  - [`.delete`](#module_collections-x.MapConstructor+delete) ⇒ \u003ccode\u003eboolean\u003c/code\u003e\n  - [`.entries`](#module_collections-x.MapConstructor+entries) ⇒ \u003ccode\u003eObject\u003c/code\u003e\n  - [`.forEach`](#module_collections-x.MapConstructor+forEach) ⇒ \u003ccode\u003eObject\u003c/code\u003e\n  - [`.get`](#module_collections-x.MapConstructor+get) ⇒ \u003ccode\u003e\\*\u003c/code\u003e\n  - [`.keys`](#module_collections-x.MapConstructor+keys) ⇒ \u003ccode\u003eObject\u003c/code\u003e\n  - [`.set`](#module_collections-x.MapConstructor+set) ⇒ \u003ccode\u003eObject\u003c/code\u003e\n  - [`.size`](#module_collections-x.MapConstructor+size) : \u003ccode\u003enumber\u003c/code\u003e\n  - [`.values`](#module_collections-x.MapConstructor+values) ⇒ \u003ccode\u003eObject\u003c/code\u003e\n  - [`.has(key)`](#module_collections-x.MapConstructor+has) ⇒ \u003ccode\u003eboolean\u003c/code\u003e\n  - [`.symIt()`](#module_collections-x.MapConstructor+symIt) ⇒ \u003ccode\u003eObject\u003c/code\u003e\n\n\u003ca name=\"module_collections-x.MapConstructor+clear\"\u003e\u003c/a\u003e\n\n#### `map.clear` ⇒ \u003ccode\u003eObject\u003c/code\u003e\n\nThe clear() method removes all elements from a Map object.\n\n**Kind**: instance property of [\u003ccode\u003eMap\u003c/code\u003e](#module_collections-x.MapConstructor)  \n**Returns**: \u003ccode\u003eObject\u003c/code\u003e - The Map object.  \n**Example**\n\n```js\nimport {MapConstructor} from 'collections-x';\n\nconst myMap = new MapConstructor();\nmyMap.set('bar', 'baz');\nmyMap.set(1, 'foo');\n\nconsole.log(myMap.size); // 2\nconsole.log(myMap.has('bar')); // true\n\nmyMap.clear();\n\nconsole.log(myMap.size); // 0\nconsole.log(myMap.has('bar')); // false\n```\n\n\u003ca name=\"module_collections-x.MapConstructor+delete\"\u003e\u003c/a\u003e\n\n#### `map.delete` ⇒ \u003ccode\u003eboolean\u003c/code\u003e\n\nThe delete() method removes the specified element from a Map object.\n\n**Kind**: instance property of [\u003ccode\u003eMap\u003c/code\u003e](#module_collections-x.MapConstructor)  \n**Returns**: \u003ccode\u003eboolean\u003c/code\u003e - Returns true if an element in the Map object has been\nremoved successfully.\n\n| Param | Type            | Description                                           |\n| ----- | --------------- | ----------------------------------------------------- |\n| key   | \u003ccode\u003e\\*\u003c/code\u003e | The key of the element to remove from the Map object. |\n\n**Example**\n\n```js\nimport {MapConstructor} from 'collections-x';\n\nconst myMap = new MapConstructor();\nmyMap.set('bar', 'foo');\n\nmyMap.delete('bar'); // Returns true. Successfully removed.\nmyMap.has('bar'); // Returns false.\n// The \"bar\" element is no longer present.\n```\n\n\u003ca name=\"module_collections-x.MapConstructor+entries\"\u003e\u003c/a\u003e\n\n#### `map.entries` ⇒ \u003ccode\u003eObject\u003c/code\u003e\n\nThe entries() method returns a new Iterator object that contains the\n[key, value] pairs for each element in the Map object in insertion order.\n\n**Kind**: instance property of [\u003ccode\u003eMap\u003c/code\u003e](#module_collections-x.MapConstructor)  \n**Returns**: \u003ccode\u003eObject\u003c/code\u003e - A new Iterator object.  \n**Example**\n\n```js\nimport {MapConstructor} from 'collections-x';\nconst myMap = new MapConstructor();\nmyMap.set('0', 'foo');\nmyMap.set(1, 'bar');\nmyMap.set({}, 'baz');\n\nconst mapIter = myMap.entries();\n\nconsole.log(mapIter.next().value); // [\"0\", \"foo\"]\nconsole.log(mapIter.next().value); // [1, \"bar\"]\nconsole.log(mapIter.next().value); // [Object, \"baz\"]\n```\n\n\u003ca name=\"module_collections-x.MapConstructor+forEach\"\u003e\u003c/a\u003e\n\n#### `map.forEach` ⇒ \u003ccode\u003eObject\u003c/code\u003e\n\nThe forEach() method executes a provided function once per each\nkey/value pair in the Map object, in insertion order.\n\n**Kind**: instance property of [\u003ccode\u003eMap\u003c/code\u003e](#module_collections-x.MapConstructor)  \n**Returns**: \u003ccode\u003eObject\u003c/code\u003e - The Map object.\n\n| Param     | Type                  | Description                                   |\n| --------- | --------------------- | --------------------------------------------- |\n| callback  | \u003ccode\u003efunction\u003c/code\u003e | Function to execute for each element.         |\n| [thisArg] | \u003ccode\u003e\\*\u003c/code\u003e       | Value to use as this when executing callback. |\n\n**Example**\n\n```js\nimport {MapConstructor} from 'collections-x';\n\nfunction logElements(value, key, map) {\n  console.log('m[' + key + '] = ' + value);\n}\n\nconst myMap = new MapConstructor([['foo', 3], ['bar', {}], ['baz', undefined]]);\nmyMap.forEach(logElements);\n// logs:\n// \"m[foo] = 3\"\n// \"m[bar] = [object Object]\"\n// \"m[baz] = undefined\"\n```\n\n\u003ca name=\"module_collections-x.MapConstructor+get\"\u003e\u003c/a\u003e\n\n#### `map.get` ⇒ \u003ccode\u003e\\*\u003c/code\u003e\n\nThe get() method returns a specified element from a Map object.\n\n**Kind**: instance property of [\u003ccode\u003eMap\u003c/code\u003e](#module_collections-x.MapConstructor)  \n**Returns**: \u003ccode\u003e\\*\u003c/code\u003e - Returns the element associated with the specified key or\nundefined if the key can't be found in the Map object.\n\n| Param | Type            | Description                                           |\n| ----- | --------------- | ----------------------------------------------------- |\n| key   | \u003ccode\u003e\\*\u003c/code\u003e | The key of the element to return from the Map object. |\n\n**Example**\n\n```js\nimport {MapConstructor} from 'collections-x';\n\nconst myMap = new MapConstructor();\nmyMap.set('bar', 'foo');\n\nmyMap.get('bar'); // Returns \"foo\".\nmyMap.get('baz'); // Returns undefined.\n```\n\n\u003ca name=\"module_collections-x.MapConstructor+keys\"\u003e\u003c/a\u003e\n\n#### `map.keys` ⇒ \u003ccode\u003eObject\u003c/code\u003e\n\nThe keys() method returns a new Iterator object that contains the keys\nfor each element in the Map object in insertion order.\n\n**Kind**: instance property of [\u003ccode\u003eMap\u003c/code\u003e](#module_collections-x.MapConstructor)  \n**Returns**: \u003ccode\u003eObject\u003c/code\u003e - A new Iterator object.  \n**Example**\n\n```js\nimport {MapConstructor} from 'collections-x';\n\nconst myMap = new MapConstructor();\nmyMap.set('0', 'foo');\nmyMap.set(1, 'bar');\nmyMap.set({}, 'baz');\n\nconst mapIter = myMap.keys();\n\nconsole.log(mapIter.next().value); // \"0\"\nconsole.log(mapIter.next().value); // 1\nconsole.log(mapIter.next().value); // Object\n```\n\n\u003ca name=\"module_collections-x.MapConstructor+set\"\u003e\u003c/a\u003e\n\n#### `map.set` ⇒ \u003ccode\u003eObject\u003c/code\u003e\n\nThe set() method adds a new element with a specified key and value to\na Map object.\n\n**Kind**: instance property of [\u003ccode\u003eMap\u003c/code\u003e](#module_collections-x.MapConstructor)  \n**Returns**: \u003ccode\u003eObject\u003c/code\u003e - The Map object.\n\n| Param | Type            | Description                                        |\n| ----- | --------------- | -------------------------------------------------- |\n| key   | \u003ccode\u003e\\*\u003c/code\u003e | The key of the element to add to the Map object.   |\n| value | \u003ccode\u003e\\*\u003c/code\u003e | The value of the element to add to the Map object. |\n\n**Example**\n\n```js\nimport {MapConstructor} from 'collections-x';\n\nconst myMap = new MapConstructor();\n\n// Add new elements to the map\nmyMap.set('bar', 'foo');\nmyMap.set(1, 'foobar');\n\n// Update an element in the map\nmyMap.set('bar', 'fuuu');\n```\n\n\u003ca name=\"module_collections-x.MapConstructor+size\"\u003e\u003c/a\u003e\n\n#### `map.size` : \u003ccode\u003enumber\u003c/code\u003e\n\nThe value of size is an integer representing how many entries the Map\nobject has.\n\n**Kind**: instance property of [\u003ccode\u003eMap\u003c/code\u003e](#module_collections-x.MapConstructor)  \n**Example**\n\n```js\nimport {MapConstructor} from 'collections-x';\n\nconst myMap = new MapConstructor();\nmyMap.set(1, true);\nmyMap.set(5, false);\nmyMap.set('some text', 1);\n\nconsole.log(myMap.size); // 3\n```\n\n\u003ca name=\"module_collections-x.MapConstructor+values\"\u003e\u003c/a\u003e\n\n#### `map.values` ⇒ \u003ccode\u003eObject\u003c/code\u003e\n\nThe values() method returns a new Iterator object that contains the\nvalues for each element in the Map object in insertion order.\n\n**Kind**: instance property of [\u003ccode\u003eMap\u003c/code\u003e](#module_collections-x.MapConstructor)  \n**Returns**: \u003ccode\u003eObject\u003c/code\u003e - A new Iterator object.  \n**Example**\n\n```js\nimport {MapConstructor} from 'collections-x';\n\nconst myMap = new MapConstructor();\nmyMap.set('0', 'foo');\nmyMap.set(1, 'bar');\nmyMap.set({}, 'baz');\n\nconst mapIter = myMap.values();\n\nconsole.log(mapIter.next().value); // \"foo\"\nconsole.log(mapIter.next().value); // \"bar\"\nconsole.log(mapIter.next().value); // \"baz\"\n```\n\n\u003ca name=\"module_collections-x.MapConstructor+has\"\u003e\u003c/a\u003e\n\n#### `map.has(key)` ⇒ \u003ccode\u003eboolean\u003c/code\u003e\n\nThe has() method returns a boolean indicating whether an element with\nthe specified key exists or not.\n\n**Kind**: instance method of [\u003ccode\u003eMap\u003c/code\u003e](#module_collections-x.MapConstructor)  \n**Returns**: \u003ccode\u003eboolean\u003c/code\u003e - Returns true if an element with the specified key\nexists in the Map object; otherwise false.\n\n| Param | Type            | Description                                                    |\n| ----- | --------------- | -------------------------------------------------------------- |\n| key   | \u003ccode\u003e\\*\u003c/code\u003e | The key of the element to test for presence in the Map object. |\n\n**Example**\n\n```js\nimport {MapConstructor} from 'collections-x';\n\nconst myMap = new MapConstructor();\nmyMap.set('bar', 'foo');\n\nmyMap.has('bar'); // returns true\nmyMap.has('baz'); // returns false\n```\n\n\u003ca name=\"module_collections-x.MapConstructor+symIt\"\u003e\u003c/a\u003e\n\n#### `map.symIt()` ⇒ \u003ccode\u003eObject\u003c/code\u003e\n\nThe initial value of the @@iterator property is the same function object\nas the initial value of the entries property.\n\n**Kind**: instance method of [\u003ccode\u003eMap\u003c/code\u003e](#module_collections-x.MapConstructor)  \n**Returns**: \u003ccode\u003eObject\u003c/code\u003e - A new Iterator object.  \n**Example**\n\n```js\nimport {MapConstructor, symIt} from 'collections-x';\n\nconst myMap = new MapConstructor();\nmyMap.set('0', 'foo');\nmyMap.set(1, 'bar');\nmyMap.set({}, 'baz');\n\nvar mapIter = myMap[symIt]();\n\nconsole.log(mapIter.next().value); // [\"0\", \"foo\"]\nconsole.log(mapIter.next().value); // [1, \"bar\"]\nconsole.log(mapIter.next().value); // [Object, \"baz\"]\n```\n\n\u003ca name=\"module_collections-x.SetConstructor\"\u003e\u003c/a\u003e\n\n### `collections-x.SetConstructor`\n\n**Kind**: static property of [\u003ccode\u003ecollections-x\u003c/code\u003e](#module_collections-x)\n\n- [`.SetConstructor`](#module_collections-x.SetConstructor)\n  - [`.add`](#module_collections-x.SetConstructor+add) ⇒ \u003ccode\u003eObject\u003c/code\u003e\n  - [`.clear`](#module_collections-x.SetConstructor+clear) ⇒ \u003ccode\u003eObject\u003c/code\u003e\n  - [`.delete`](#module_collections-x.SetConstructor+delete) ⇒ \u003ccode\u003eboolean\u003c/code\u003e\n  - [`.forEach`](#module_collections-x.SetConstructor+forEach) ⇒ \u003ccode\u003eObject\u003c/code\u003e\n  - [`.size`](#module_collections-x.SetConstructor+size) : \u003ccode\u003enumber\u003c/code\u003e\n  - [`.entries()`](#module_collections-x.SetConstructor+entries) ⇒ \u003ccode\u003eObject\u003c/code\u003e\n  - [`.has(value)`](#module_collections-x.SetConstructor+has) ⇒ \u003ccode\u003eboolean\u003c/code\u003e\n  - [`.keys()`](#module_collections-x.SetConstructor+keys) ⇒ \u003ccode\u003eObject\u003c/code\u003e\n  - [`.values()`](#module_collections-x.SetConstructor+values) ⇒ \u003ccode\u003eObject\u003c/code\u003e\n  - [`.symIt()`](#module_collections-x.SetConstructor+symIt) ⇒ \u003ccode\u003eObject\u003c/code\u003e\n\n\u003ca name=\"module_collections-x.SetConstructor+add\"\u003e\u003c/a\u003e\n\n#### `set.add` ⇒ \u003ccode\u003eObject\u003c/code\u003e\n\nThe add() method appends a new element with a specified value to the end\nof a Set object.\n\n**Kind**: instance property of [\u003ccode\u003eSet\u003c/code\u003e](#module_collections-x.SetConstructor)  \n**Returns**: \u003ccode\u003eObject\u003c/code\u003e - The Set object.\n\n| Param | Type            | Description                                                  |\n| ----- | --------------- | ------------------------------------------------------------ |\n| value | \u003ccode\u003e\\*\u003c/code\u003e | Required. The value of the element to add to the Set object. |\n\n**Example**\n\n```js\nimport {SetConstructor} from 'collections-x';\n\nconst mySet = new SetConstructor();\n\nmySet.add(1);\nmySet.add(5).add('some text'); // chainable\n\nconsole.log(mySet);\n// Set [1, 5, \"some text\"]\n```\n\n\u003ca name=\"module_collections-x.SetConstructor+clear\"\u003e\u003c/a\u003e\n\n#### `set.clear` ⇒ \u003ccode\u003eObject\u003c/code\u003e\n\nThe clear() method removes all elements from a Set object.\n\n**Kind**: instance property of [\u003ccode\u003eSet\u003c/code\u003e](#module_collections-x.SetConstructor)  \n**Returns**: \u003ccode\u003eObject\u003c/code\u003e - The Set object.  \n**Example**\n\n```js\nimport {SetConstructor} from 'collections-x';\n\nconst mySet = new SetConstructor();\nmySet.add(1);\nmySet.add('foo');\n\nconsole.log(mySet.size); // 2\nmySet.has('foo'); // true\n\nmySet.clear();\n\nconsole.log(mySet.size); // 0\nmySet.has('bar'); // false\n```\n\n\u003ca name=\"module_collections-x.SetConstructor+delete\"\u003e\u003c/a\u003e\n\n#### `set.delete` ⇒ \u003ccode\u003eboolean\u003c/code\u003e\n\nThe delete() method removes the specified element from a Set object.\n\n**Kind**: instance property of [\u003ccode\u003eSet\u003c/code\u003e](#module_collections-x.SetConstructor)  \n**Returns**: \u003ccode\u003eboolean\u003c/code\u003e - Returns true if an element in the Set object has been\nremoved successfully; otherwise false.\n\n| Param | Type            | Description                                             |\n| ----- | --------------- | ------------------------------------------------------- |\n| value | \u003ccode\u003e\\*\u003c/code\u003e | The value of the element to remove from the Set object. |\n\n**Example**\n\n```js\nimport {SetConstructor} from 'collections-x';\n\nconst mySet = new SetConstructor();\nmySet.add('foo');\n\nmySet.delete('bar'); // Returns false. No \"bar\" element found\n//to be deleted.\nmySet.delete('foo'); // Returns true.  Successfully removed.\n\nmySet.has('foo'); // Returns false. The \"foo\" element is no\n//longer present.\n```\n\n\u003ca name=\"module_collections-x.SetConstructor+forEach\"\u003e\u003c/a\u003e\n\n#### `set.forEach` ⇒ \u003ccode\u003eObject\u003c/code\u003e\n\nThe forEach() method executes a provided function once per each value\nin the Set object, in insertion order.\n\n**Kind**: instance property of [\u003ccode\u003eSet\u003c/code\u003e](#module_collections-x.SetConstructor)  \n**Returns**: \u003ccode\u003eObject\u003c/code\u003e - The Set object.\n\n| Param     | Type                  | Description                                   |\n| --------- | --------------------- | --------------------------------------------- |\n| callback  | \u003ccode\u003efunction\u003c/code\u003e | Function to execute for each element.         |\n| [thisArg] | \u003ccode\u003e\\*\u003c/code\u003e       | Value to use as this when executing callback. |\n\n**Example**\n\n```js\nfunction logSetElements(value1, value2, set) {\n  console.log('s[' + value1 + '] = ' + value2);\n}\n\nnew SetConstructor(['foo', 'bar', undefined]).forEach(logSetElements);\n\n// logs:\n// \"s[foo] = foo\"\n// \"s[bar] = bar\"\n// \"s[undefined] = undefined\"\n```\n\n\u003ca name=\"module_collections-x.SetConstructor+size\"\u003e\u003c/a\u003e\n\n#### `set.size` : \u003ccode\u003enumber\u003c/code\u003e\n\nThe value of size is an integer representing how many entries the Set\nobject has.\n\n**Kind**: instance property of [\u003ccode\u003eSet\u003c/code\u003e](#module_collections-x.SetConstructor)  \n**Example**\n\n```js\nimport {SetConstructor} from 'collections-x';\n\nconst mySet = new SetConstructor();\nmySet.add(1);\nmySet.add(5);\nmySet.add('some text');\n\nconsole.log(mySet.size); // 3\n```\n\n\u003ca name=\"module_collections-x.SetConstructor+entries\"\u003e\u003c/a\u003e\n\n#### `set.entries()` ⇒ \u003ccode\u003eObject\u003c/code\u003e\n\nThe entries() method returns a new Iterator object that contains an\narray of [value, value] for each element in the Set object, in\ninsertion order. For Set objects there is no key like in Map objects.\nHowever, to keep the API similar to the Map object, each entry has the\nsame value for its key and value here, so that an array [value, value]\nis returned.\n\n**Kind**: instance method of [\u003ccode\u003eSet\u003c/code\u003e](#module_collections-x.SetConstructor)  \n**Returns**: \u003ccode\u003eObject\u003c/code\u003e - A new Iterator object.  \n**Example**\n\n```js\nimport {SetConstructor} from 'collections-x';\n\nconst mySet = new SetConstructor();\nmySet.add('foobar');\nmySet.add(1);\nmySet.add('baz');\n\nconst setIter = mySet.entries();\n\nconsole.log(setIter.next().value); // [\"foobar\", \"foobar\"]\nconsole.log(setIter.next().value); // [1, 1]\nconsole.log(setIter.next().value); // [\"baz\", \"baz\"]\n```\n\n\u003ca name=\"module_collections-x.SetConstructor+has\"\u003e\u003c/a\u003e\n\n#### `set.has(value)` ⇒ \u003ccode\u003eboolean\u003c/code\u003e\n\nThe has() method returns a boolean indicating whether an element with the\nspecified value exists in a Set object or not.\n\n**Kind**: instance method of [\u003ccode\u003eSet\u003c/code\u003e](#module_collections-x.SetConstructor)  \n**Returns**: \u003ccode\u003eboolean\u003c/code\u003e - Returns true if an element with the specified value\nexists in the Set object; otherwise false.\n\n| Param | Type            | Description                                       |\n| ----- | --------------- | ------------------------------------------------- |\n| value | \u003ccode\u003e\\*\u003c/code\u003e | The value to test for presence in the Set object. |\n\n**Example**\n\n```js\nimport {SetConstructor} from 'collections-x';\n\nconst mySet = new SetConstructor();\nmySet.add('foo');\n\nmySet.has('foo'); // returns true\nmySet.has('bar'); // returns false\n```\n\n\u003ca name=\"module_collections-x.SetConstructor+keys\"\u003e\u003c/a\u003e\n\n#### `set.keys()` ⇒ \u003ccode\u003eObject\u003c/code\u003e\n\nThe keys() method is an alias for the `values` method (for similarity\nwith Map objects); it behaves exactly the same and returns values of\nSet elements.\n\n**Kind**: instance method of [\u003ccode\u003eSet\u003c/code\u003e](#module_collections-x.SetConstructor)  \n**Returns**: \u003ccode\u003eObject\u003c/code\u003e - A new Iterator object.  \n**Example**\n\n```js\nimport {SetConstructor} from 'collections-x';\n\nconst mySet = new SetConstructor();\nmySet.add('foo');\nmySet.add('bar');\nmySet.add('baz');\n\nconst setIter = mySet.keys();\n\nconsole.log(setIter.next().value); // \"foo\"\nconsole.log(setIter.next().value); // \"bar\"\nconsole.log(setIter.next().value); // \"baz\"\n```\n\n\u003ca name=\"module_collections-x.SetConstructor+values\"\u003e\u003c/a\u003e\n\n#### `set.values()` ⇒ \u003ccode\u003eObject\u003c/code\u003e\n\nThe values() method returns a new Iterator object that contains the\nvalues for each element in the Set object in insertion order.\n\n**Kind**: instance method of [\u003ccode\u003eSet\u003c/code\u003e](#module_collections-x.SetConstructor)  \n**Returns**: \u003ccode\u003eObject\u003c/code\u003e - A new Iterator object.  \n**Example**\n\n```js\nimport {SetConstructor} from 'collections-x';\n\nconst mySet = new SetConstructor();\nmySet.add('foo');\nmySet.add('bar');\nmySet.add('baz');\n\nconst setIter = mySet.values();\n\nconsole.log(setIter.next().value); // \"foo\"\nconsole.log(setIter.next().value); // \"bar\"\nconsole.log(setIter.next().value); // \"baz\"\n```\n\n\u003ca name=\"module_collections-x.SetConstructor+symIt\"\u003e\u003c/a\u003e\n\n#### `set.symIt()` ⇒ \u003ccode\u003eObject\u003c/code\u003e\n\nThe initial value of the @@iterator property is the same function object\nas the initial value of the values property.\n\n**Kind**: instance method of [\u003ccode\u003eSet\u003c/code\u003e](#module_collections-x.SetConstructor)  \n**Returns**: \u003ccode\u003eObject\u003c/code\u003e - A new Iterator object.  \n**Example**\n\n```js\nimport {SetConstructor, symIt} from 'collections-x';\n\nconst mySet = new SetConstructor();\nmySet.add('0');\nmySet.add(1);\nmySet.add({});\n\nconst setIter = mySet[symIt]();\n\nconsole.log(setIter.next().value); // \"0\"\nconsole.log(setIter.next().value); // 1\nconsole.log(setIter.next().value); // Object\n```\n\n\u003ca name=\"module_collections-x.symIt\"\u003e\u003c/a\u003e\n\n### `collections-x.symIt`\n\nThe iterator identifier that is in use.\n\ntype {Symbol|string}\n\n**Kind**: static property of [\u003ccode\u003ecollections-x\u003c/code\u003e](#module_collections-x)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxotic750%2Fcollections-x","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxotic750%2Fcollections-x","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxotic750%2Fcollections-x/lists"}