{"id":27944924,"url":"https://github.com/es-shims/object.getownpropertydescriptors","last_synced_at":"2025-10-12T18:22:03.358Z","repository":{"id":27432100,"uuid":"30909967","full_name":"es-shims/Object.getOwnPropertyDescriptors","owner":"es-shims","description":"Spec-compliant shim for `Object.getOwnPropertyDescriptors` that works in ES5.","archived":false,"fork":false,"pushed_at":"2024-03-20T05:41:55.000Z","size":176,"stargazers_count":20,"open_issues_count":2,"forks_count":8,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-05-07T12:55:06.081Z","etag":null,"topics":["ecmascript","getownpropertydescriptor","getownpropertydescriptors","javascript","object","polyfill","shim"],"latest_commit_sha":null,"homepage":"https://github.com/tc39/proposal-object-getownpropertydescriptors","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/es-shims.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["ljharb"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":"npm/es5-shim","community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2015-02-17T09:14:26.000Z","updated_at":"2023-01-09T07:50:40.000Z","dependencies_parsed_at":"2024-06-18T14:06:58.158Z","dependency_job_id":null,"html_url":"https://github.com/es-shims/Object.getOwnPropertyDescriptors","commit_stats":{"total_commits":167,"total_committers":2,"mean_commits":83.5,"dds":0.005988023952095856,"last_synced_commit":"6811ef9f4332a598e8f5ca972ed5e847d26cfd20"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/es-shims%2FObject.getOwnPropertyDescriptors","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/es-shims%2FObject.getOwnPropertyDescriptors/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/es-shims%2FObject.getOwnPropertyDescriptors/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/es-shims%2FObject.getOwnPropertyDescriptors/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/es-shims","download_url":"https://codeload.github.com/es-shims/Object.getOwnPropertyDescriptors/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252882789,"owners_count":21819155,"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":["ecmascript","getownpropertydescriptor","getownpropertydescriptors","javascript","object","polyfill","shim"],"created_at":"2025-05-07T12:55:14.457Z","updated_at":"2025-10-12T18:21:58.324Z","avatar_url":"https://github.com/es-shims.png","language":"JavaScript","funding_links":["https://github.com/sponsors/ljharb","https://tidelift.com/funding/github/npm/es5-shim"],"categories":[],"sub_categories":[],"readme":"# object.getownpropertydescriptors \u003csup\u003e[![Version Badge][npm-version-svg]][package-url]\u003c/sup\u003e\n\n[![github actions][actions-image]][actions-url]\n[![coverage][codecov-image]][codecov-url]\n[![dependency status][deps-svg]][deps-url]\n[![dev dependency status][dev-deps-svg]][dev-deps-url]\n[![License][license-image]][license-url]\n[![Downloads][downloads-image]][downloads-url]\n\n[![npm badge][npm-badge-png]][package-url]\n\nAn ES2017 spec-compliant shim for `Object.getOwnPropertyDescriptors` that works in ES5.\nInvoke its \"shim\" method to shim `Object.getOwnPropertyDescriptors` if it is unavailable, and if `Object.getOwnPropertyDescriptor` is available.\n\nThis package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the [spec](https://github.com/tc39/ecma262/pull/582).\n\n## Example\n\n```js\nvar getDescriptors = require('object.getownpropertydescriptors');\nvar assert = require('assert');\nvar obj = { normal: Infinity };\nvar enumDescriptor = {\n\tenumerable: false,\n\twritable: false,\n\tconfigurable: true,\n\tvalue: true\n};\nvar writableDescriptor = {\n\tenumerable: true,\n\twritable: true,\n\tconfigurable: true,\n\tvalue: 42\n};\nvar symbol = Symbol();\nvar symDescriptor = {\n\tenumerable: true,\n\twritable: true,\n\tconfigurable: false,\n\tvalue: [symbol]\n};\n\nObject.defineProperty(obj, 'enumerable', enumDescriptor);\nObject.defineProperty(obj, 'writable', writableDescriptor);\nObject.defineProperty(obj, 'symbol', symDescriptor);\n\nvar descriptors = getDescriptors(obj);\n\nassert.deepEqual(descriptors, {\n\tnormal: {\n\t\tenumerable: true,\n\t\twritable: true,\n\t\tconfigurable: true,\n\t\tvalue: Infinity\n\t},\n\tenumerable: enumDescriptor,\n\twritable: writableDescriptor,\n\tsymbol: symDescriptor\n});\n```\n\n```js\nvar getDescriptors = require('object.getownpropertydescriptors');\nvar assert = require('assert');\n/* when Object.getOwnPropertyDescriptors is not present */\ndelete Object.getOwnPropertyDescriptors;\nvar shimmedDescriptors = getDescriptors.shim();\nassert.equal(shimmedDescriptors, getDescriptors);\nassert.deepEqual(shimmedDescriptors(obj), getDescriptors(obj));\n```\n\n```js\nvar getDescriptors = require('object.getownpropertydescriptors');\nvar assert = require('assert');\n/* when Object.getOwnPropertyDescriptors is present */\nvar shimmedDescriptors = getDescriptors.shim();\nassert.notEqual(shimmedDescriptors, getDescriptors);\nassert.deepEqual(shimmedDescriptors(obj), getDescriptors(obj));\n```\n\n## Tests\nSimply clone the repo, `npm install`, and run `npm test`\n\n[package-url]: https://npmjs.org/package/object.getownpropertydescriptors\n[npm-version-svg]: http://versionbadg.es/es-shims/Object.getOwnPropertyDescriptors.svg\n[travis-svg]: https://travis-ci.org/es-shims/Object.getOwnPropertyDescriptors.svg\n[travis-url]: https://travis-ci.org/es-shims/Object.getOwnPropertyDescriptors\n[deps-svg]: https://david-dm.org/es-shims/Object.getOwnPropertyDescriptors.svg\n[deps-url]: https://david-dm.org/es-shims/Object.getOwnPropertyDescriptors\n[dev-deps-svg]: https://david-dm.org/es-shims/Object.getOwnPropertyDescriptors/dev-status.svg\n[dev-deps-url]: https://david-dm.org/es-shims/Object.getOwnPropertyDescriptors#info=devDependencies\n[npm-badge-png]: https://nodei.co/npm/object.getownpropertydescriptors.png?downloads=true\u0026stars=true\n[license-image]: http://img.shields.io/npm/l/object.getownpropertydescriptors.svg\n[license-url]: LICENSE\n[downloads-image]: http://img.shields.io/npm/dm/object.getownpropertydescriptors.svg\n[downloads-url]: http://npm-stat.com/charts.html?package=object.getownpropertydescriptors\n[codecov-image]: https://codecov.io/gh/es-shims/Object.getOwnPropertyDescriptors/branch/main/graphs/badge.svg\n[codecov-url]: https://app.codecov.io/gh/es-shims/Object.getOwnPropertyDescriptors/\n[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/Object.getOwnPropertyDescriptors\n[actions-url]: https://github.com/es-shims/Object.getOwnPropertyDescriptors/actions\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fes-shims%2Fobject.getownpropertydescriptors","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fes-shims%2Fobject.getownpropertydescriptors","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fes-shims%2Fobject.getownpropertydescriptors/lists"}