{"id":13771979,"url":"https://github.com/medikoo/es6-symbol","last_synced_at":"2025-05-15T18:10:06.072Z","repository":{"id":11863922,"uuid":"14423385","full_name":"medikoo/es6-symbol","owner":"medikoo","description":"ECMAScript 6 Symbol polyfill","archived":false,"fork":false,"pushed_at":"2024-03-01T13:27:04.000Z","size":95,"stargazers_count":180,"open_issues_count":2,"forks_count":26,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-31T22:18:01.110Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/medikoo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"medikoo","tidelift":"npm/es6-symbol"}},"created_at":"2013-11-15T12:08:00.000Z","updated_at":"2025-03-30T00:40:56.000Z","dependencies_parsed_at":"2024-05-03T09:14:03.235Z","dependency_job_id":"db2492c1-243d-4038-800a-4f3054b99dc5","html_url":"https://github.com/medikoo/es6-symbol","commit_stats":{"total_commits":94,"total_committers":8,"mean_commits":11.75,"dds":0.5319148936170213,"last_synced_commit":"1ac41360c46ff8d91b875b9447558fee3265ff79"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/medikoo%2Fes6-symbol","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/medikoo%2Fes6-symbol/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/medikoo%2Fes6-symbol/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/medikoo%2Fes6-symbol/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/medikoo","download_url":"https://codeload.github.com/medikoo/es6-symbol/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247744332,"owners_count":20988783,"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-03T17:00:58.418Z","updated_at":"2025-04-07T23:08:01.251Z","avatar_url":"https://github.com/medikoo.png","language":"JavaScript","funding_links":["https://github.com/sponsors/medikoo","https://tidelift.com/funding/github/npm/es6-symbol","https://tidelift.com/security","https://tidelift.com/subscription/pkg/npm-es6-symbol?utm_source=npm-es6-symbol\u0026utm_medium=referral\u0026utm_campaign=readme"],"categories":["Uncategorised","Polyfills","Polyfill"],"sub_categories":["Brunch Plugins","React Components"],"readme":"[![Build status][build-image]][build-url]\n[![Tests coverage][cov-image]][cov-url]\n[![npm version][npm-image]][npm-url]\n\n# es6-symbol\n\n## ECMAScript 6 Symbol polyfill\n\nFor more information about symbols see following links\n\n- [Symbols in ECMAScript 6 by Axel Rauschmayer](http://www.2ality.com/2014/12/es6-symbols.html)\n- [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol)\n- [Specification](https://tc39.github.io/ecma262/#sec-symbol-objects)\n\n### Limitations\n\nUnderneath it uses real string property names which can easily be retrieved, however accidental collision with other property names is unlikely.\n\n### Usage\n\nIf you'd like to use native version when it exists and fallback to [ponyfill](https://ponyfill.com) if it doesn't, use _es6-symbol_ as following:\n\n```javascript\nvar Symbol = require(\"es6-symbol\");\n```\n\nIf you want to make sure your environment implements `Symbol` globally, do:\n\n```javascript\nrequire(\"es6-symbol/implement\");\n```\n\nIf you strictly want to use polyfill even if native `Symbol` exists (hard to find a good reason for that), do:\n\n```javascript\nvar Symbol = require(\"es6-symbol/polyfill\");\n```\n\n#### API\n\nBest is to refer to [specification](https://tc39.github.io/ecma262/#sec-symbol-objects). Still if you want quick look, follow examples:\n\n```javascript\nvar Symbol = require(\"es6-symbol\");\n\nvar symbol = Symbol(\"My custom symbol\");\nvar x = {};\n\nx[symbol] = \"foo\";\nconsole.log(x[symbol]);\n(\"foo\");\n\n// Detect iterable:\nvar iterator, result;\nif (possiblyIterable[Symbol.iterator]) {\n  iterator = possiblyIterable[Symbol.iterator]();\n  result = iterator.next();\n  while (!result.done) {\n    console.log(result.value);\n    result = iterator.next();\n  }\n}\n```\n\n### Installation\n\n#### NPM\n\nIn your project path:\n\n    $ npm install es6-symbol\n\n##### Browser\n\nTo 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/)\n\n## Tests\n\n    $ npm test\n\n## Security contact information\n\nTo report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure.\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\t\u003cb\u003e\n\t\t\u003ca href=\"https://tidelift.com/subscription/pkg/npm-es6-symbol?utm_source=npm-es6-symbol\u0026utm_medium=referral\u0026utm_campaign=readme\"\u003eGet professional support for d with a Tidelift subscription\u003c/a\u003e\n\t\u003c/b\u003e\n\t\u003cbr\u003e\n\t\u003csub\u003e\n\t\tTidelift helps make open source sustainable for maintainers while giving companies\u003cbr\u003eassurances about security, maintenance, and licensing for their dependencies.\n\t\u003c/sub\u003e\n\u003c/div\u003e\n\n[build-image]: https://github.com/medikoo/es6-symbol/workflows/Integrate/badge.svg\n[build-url]: https://github.com/medikoo/es6-symbol/actions?query=workflow%3AIntegrate\n[cov-image]: https://img.shields.io/codecov/c/github/medikoo/es6-symbol.svg\n[cov-url]: https://codecov.io/gh/medikoo/es6-symbol\n[npm-image]: https://img.shields.io/npm/v/es6-symbol.svg\n[npm-url]: https://www.npmjs.com/package/es6-symbol\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmedikoo%2Fes6-symbol","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmedikoo%2Fes6-symbol","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmedikoo%2Fes6-symbol/lists"}