{"id":31425041,"url":"https://github.com/es-shims/object.defineproperties","last_synced_at":"2025-09-30T04:55:08.669Z","repository":{"id":57687947,"uuid":"488985608","full_name":"es-shims/Object.defineProperties","owner":"es-shims","description":"ES spec-compliant `Object.defineProperties` shim/polyfill/replacement that works as far down as ES3","archived":false,"fork":false,"pushed_at":"2024-03-17T07:21:01.000Z","size":44,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-09-21T13:36:49.544Z","etag":null,"topics":["defineproperties","defineproperty","ecmascript","javascript","object","polyfill","shim"],"latest_commit_sha":null,"homepage":"https://tc39.es/ecma262/#sec-object.defineproperties","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":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["ljharb"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":"npm/object.defineproperties","community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2022-05-05T13:34:02.000Z","updated_at":"2022-05-08T15:10:26.000Z","dependencies_parsed_at":"2023-01-21T23:05:02.229Z","dependency_job_id":null,"html_url":"https://github.com/es-shims/Object.defineProperties","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/es-shims/Object.defineProperties","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/es-shims%2FObject.defineProperties","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/es-shims%2FObject.defineProperties/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/es-shims%2FObject.defineProperties/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/es-shims%2FObject.defineProperties/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/es-shims","download_url":"https://codeload.github.com/es-shims/Object.defineProperties/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/es-shims%2FObject.defineProperties/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":277632370,"owners_count":25850734,"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","status":"online","status_checked_at":"2025-09-30T02:00:09.208Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["defineproperties","defineproperty","ecmascript","javascript","object","polyfill","shim"],"created_at":"2025-09-30T04:55:05.020Z","updated_at":"2025-09-30T04:55:08.654Z","avatar_url":"https://github.com/es-shims.png","language":"JavaScript","funding_links":["https://github.com/sponsors/ljharb","https://tidelift.com/funding/github/npm/object.defineproperties"],"categories":[],"sub_categories":[],"readme":"# object.defineproperties \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 ES spec-compliant `Object.defineProperties` shim. Invoke its \"shim\" method to shim `Object.defineProperties` if it is unavailable or noncompliant.\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://tc39.es/ecma262/#sec-object.defineproperties).\n\nMost common usage:\n```js\nvar assert = require('assert');\nvar defineProperties = require('object.defineproperties');\n\nvar descriptors = {\n\ta: {\n\t\tvalue: 2\n\t},\n\tc: {\n\t\tconfigurable: true,\n\t\tenumerable: true,\n\t\tvalue: 3,\n\t\twritable: true\n\t}\n};\n\nvar obj = { a: 1, b: 2 };\nvar result = defineProperties(obj, descriptors);\n\nassert.equal(obj, result); // same object\nassert.deepEqual(obj, { a: 2, b: 2, c: 3 });\n\ndefineProperties.shim();\n\nassert.deepEqual(\n\tObject.defineProperties({ a: 1, b: 2 }, descriptors),\n\tdefineProperties({ a: 1, b: 2 }, descriptors)\n);\n```\n\n## Tests\nSimply clone the repo, `npm install`, and run `npm test`\n\n[package-url]: https://npmjs.com/package/object.defineproperties\n[npm-version-svg]: https://versionbadg.es/es-shims/Object.defineProperties.svg\n[deps-svg]: https://david-dm.org/es-shims/Object.defineProperties.svg\n[deps-url]: https://david-dm.org/es-shims/Object.defineProperties\n[dev-deps-svg]: https://david-dm.org/es-shims/Object.defineProperties/dev-status.svg\n[dev-deps-url]: https://david-dm.org/es-shims/Object.defineProperties#info=devDependencies\n[npm-badge-png]: https://nodei.co/npm/object.defineproperties.png?downloads=true\u0026stars=true\n[license-image]: https://img.shields.io/npm/l/object.defineproperties.svg\n[license-url]: LICENSE\n[downloads-image]: https://img.shields.io/npm/dm/object.defineproperties.svg\n[downloads-url]: https://npm-stat.com/charts.html?package=object.defineproperties\n[codecov-image]: https://codecov.io/gh/es-shims/Object.defineProperties/branch/main/graphs/badge.svg\n[codecov-url]: https://app.codecov.io/gh/es-shims/Object.defineProperties/\n[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/Object.defineProperties\n[actions-url]: https://github.com/es-shims/Object.defineProperties/actions\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fes-shims%2Fobject.defineproperties","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fes-shims%2Fobject.defineproperties","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fes-shims%2Fobject.defineproperties/lists"}