{"id":26608075,"url":"https://github.com/es-shims/object.getprototypeof","last_synced_at":"2025-07-19T23:03:01.486Z","repository":{"id":21802302,"uuid":"25124870","full_name":"es-shims/Object.getPrototypeOf","owner":"es-shims","description":"An ES5 mostly-spec-compliant `Object.getPrototypeOf` sham/polyfill/replacement that works in as many engines as possible.","archived":false,"fork":false,"pushed_at":"2025-01-03T00:32:01.000Z","size":150,"stargazers_count":3,"open_issues_count":1,"forks_count":2,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-07-14T00:06:47.443Z","etag":null,"topics":["ecmascript","ecmascript5","javascript","polyfill","shim"],"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/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":"2014-10-12T16:26:31.000Z","updated_at":"2025-07-04T17:12:14.000Z","dependencies_parsed_at":"2024-03-17T07:41:54.716Z","dependency_job_id":"d2eb6f02-aaae-4e2a-904e-4633d9e5779f","html_url":"https://github.com/es-shims/Object.getPrototypeOf","commit_stats":{"total_commits":62,"total_committers":2,"mean_commits":31.0,"dds":0.06451612903225812,"last_synced_commit":"e7582e2d8e39e2f8fdc67a7f0d80b78a6d37a3d8"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/es-shims/Object.getPrototypeOf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/es-shims%2FObject.getPrototypeOf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/es-shims%2FObject.getPrototypeOf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/es-shims%2FObject.getPrototypeOf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/es-shims%2FObject.getPrototypeOf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/es-shims","download_url":"https://codeload.github.com/es-shims/Object.getPrototypeOf/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/es-shims%2FObject.getPrototypeOf/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266037737,"owners_count":23867579,"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","ecmascript5","javascript","polyfill","shim"],"created_at":"2025-03-23T23:32:00.639Z","updated_at":"2025-07-19T23:03:01.420Z","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.getprototypeof \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 ES5 mostly-spec-compliant `Object.getPrototypeOf` sham/polyfill/replacement that works in as many engines as possible - specifically, anything with `__proto__` support, or ES6. Built-in types will also work correctly in older engines.\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://www.ecma-international.org/ecma-262/5.1/).\n\n## Example\n\n```js\nvar getPrototypeOf = require('object.getprototypeof');\nvar assert = require('assert');\n\nassert.equal(getPrototypeOf(true), Boolean.prototype);\nassert.equal(getPrototypeOf(42), Number.prototype);\nassert.equal(getPrototypeOf(''), String.prototype);\nassert.equal(getPrototypeOf(/a/g), RegExp.prototype);\nassert.equal(getPrototypeOf(new Date()), Date.prototype);\nassert.equal(getPrototypeOf(function () {}), Function.prototype);\nassert.equal(getPrototypeOf([]), Array.prototype);\nassert.equal(getPrototypeOf({}), Object.prototype);\n```\n\n```js\nvar getPrototypeOf = require('object.getprototypeof');\nvar assert = require('assert');\n/* when Object.getPrototypeOf is not present */\ndelete Object.getPrototypeOf;\nvar shimmed = getPrototypeOf.shim();\nassert.equal(shimmed, getPrototypeOf.getPolyfill());\n\nassert.equal(Object.getPrototypeOf(true), Boolean.prototype);\nassert.equal(Object.getPrototypeOf(42), Number.prototype);\nassert.equal(Object.getPrototypeOf(''), String.prototype);\nassert.equal(Object.getPrototypeOf(/a/g), RegExp.prototype);\nassert.equal(Object.getPrototypeOf(new Date()), Date.prototype);\nassert.equal(Object.getPrototypeOf(function () {}), Function.prototype);\nassert.equal(Object.getPrototypeOf([]), Array.prototype);\nassert.equal(Object.getPrototypeOf({}), Object.prototype);\n```\n\n```js\nvar getPrototypeOf = require('object.getprototypeof');\nvar assert = require('assert');\n/* when Object.getPrototypeOf is present */\nvar shimmedGetPrototypeOf = getPrototypeOf.shim();\nassert.equal(shimmedGetPrototypeOf, Object.getPrototypeOf);\nassert.equal(Object.getPrototypeOf([]), Array.prototype);\n```\n\n## Tests\nSimply clone the repo, `npm install`, and run `npm test`\n\n[package-url]: https://npmjs.org/package/object.getprototypeof\n[npm-version-svg]: https://versionbadg.es/es-shims/Object.getPrototypeOf.svg\n[deps-svg]: https://david-dm.org/es-shims/Object.getPrototypeOf.svg\n[deps-url]: https://david-dm.org/es-shims/Object.getPrototypeOf\n[dev-deps-svg]: https://david-dm.org/es-shims/Object.getPrototypeOf/dev-status.svg\n[dev-deps-url]: https://david-dm.org/es-shims/Object.getPrototypeOf#info=devDependencies\n[npm-badge-png]: https://nodei.co/npm/object.getprototypeof.png?downloads=true\u0026stars=true\n[license-image]: https://img.shields.io/npm/l/object.getprototypeof.svg\n[license-url]: LICENSE\n[downloads-image]: https://img.shields.io/npm/dm/object.getprototypeof.svg\n[downloads-url]: https://npm-stat.com/charts.html?package=object.getprototypeof\n[codecov-image]: https://codecov.io/gh/es-shims/Object.getPrototypeOf/branch/main/graphs/badge.svg\n[codecov-url]: https://app.codecov.io/gh/es-shims/Object.getPrototypeOf/\n[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/Object.getPrototypeOf\n[actions-url]: https://github.com/es-shims/Object.getPrototypeOf/actions\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fes-shims%2Fobject.getprototypeof","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fes-shims%2Fobject.getprototypeof","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fes-shims%2Fobject.getprototypeof/lists"}