{"id":18817822,"url":"https://github.com/vitorluizc/object-descriptors","last_synced_at":"2025-04-13T23:24:42.545Z","repository":{"id":32842857,"uuid":"144028525","full_name":"VitorLuizC/object-descriptors","owner":"VitorLuizC","description":"A pretty well typed function to get object property descriptors. `Object.getOwnPropertyDescriptors` polyfill.","archived":false,"fork":false,"pushed_at":"2023-01-07T06:55:25.000Z","size":656,"stargazers_count":6,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T17:05:31.411Z","etag":null,"topics":["ava","bili","descriptor","es2017","es7","javascript","object-property","polyfill","property","property-descriptor","property-descriptors","shim","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/VitorLuizC.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":"2018-08-08T14:51:25.000Z","updated_at":"2023-03-04T05:30:00.000Z","dependencies_parsed_at":"2023-01-14T22:30:59.871Z","dependency_job_id":null,"html_url":"https://github.com/VitorLuizC/object-descriptors","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VitorLuizC%2Fobject-descriptors","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VitorLuizC%2Fobject-descriptors/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VitorLuizC%2Fobject-descriptors/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VitorLuizC%2Fobject-descriptors/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VitorLuizC","download_url":"https://codeload.github.com/VitorLuizC/object-descriptors/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248795283,"owners_count":21162741,"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":["ava","bili","descriptor","es2017","es7","javascript","object-property","polyfill","property","property-descriptor","property-descriptors","shim","typescript"],"created_at":"2024-11-08T00:13:34.221Z","updated_at":"2025-04-13T23:24:42.510Z","avatar_url":"https://github.com/VitorLuizC.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# object-descriptors\n\n[![Build Status](https://travis-ci.org/VitorLuizC/object-descriptors.svg?branch=master)](https://travis-ci.org/VitorLuizC/object-descriptors)\n\nA pretty well typed `Object.getOwnPropertyDescriptors` polyfill.\n\n## Install\n\nThis module is published under NPM registry, so you can install from any package manager.\n\n```sh\nnpm install object-descriptors --save\n\n# Use the command below if you're using Yarn.\nyarn add object-descriptors\n```\n\n## Usage\n\nImport `getDescriptors` function and get property descriptors from any object.\n\n\u003e I'm exporting `PropertyDescriptors` type too, so you can use on your TypeScript/JSDoc types.\n\n```ts\nimport getDescriptors, { PropertyDescriptors } from 'object-descriptors';\n\nconst value = {\n  name: 'Ryan',\n  sayName() {\n    console.log(this.name);\n  },\n};\n\nlet descriptors: PropertyDescriptors\u003c{ name: string; sayName: () =\u003e void }\u003e;\n\ndescriptors = getDescriptors(value);\n\nconsole.log(descriptors);\n// =\u003e {\n//   name: {\n//     value: 'Ryan',\n//     writable: true,\n//     enumerable: true,\n//     configurable: true\n//   },\n//   sayName: {\n//     value: ƒ sayName(),\n//     writable: true,\n//     enumerable: true,\n//     configurable: true\n//   }\n// }\n```\n\n## License\n\nReleased under [MIT License](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitorluizc%2Fobject-descriptors","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvitorluizc%2Fobject-descriptors","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitorluizc%2Fobject-descriptors/lists"}