{"id":17807411,"url":"https://github.com/inspect-js/is-accessor-descriptor","last_synced_at":"2025-06-13T17:08:18.603Z","repository":{"id":57276928,"uuid":"41658954","full_name":"inspect-js/is-accessor-descriptor","owner":"inspect-js","description":"Returns true if a value has the characteristics of a valid JavaScript accessor descriptor.","archived":false,"fork":false,"pushed_at":"2023-10-27T19:52:30.000Z","size":127,"stargazers_count":15,"open_issues_count":0,"forks_count":4,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-06-05T05:56:41.299Z","etag":null,"topics":["accessor","accessor-descriptor","descriptor","javascript","node","nodejs"],"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/inspect-js.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":["ljharb"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":"npm/deep-equal","community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2015-08-31T06:12:28.000Z","updated_at":"2023-04-28T03:11:20.000Z","dependencies_parsed_at":"2024-06-18T14:08:14.484Z","dependency_job_id":"3396421b-f5bd-4bcd-b48d-1e60867393c9","html_url":"https://github.com/inspect-js/is-accessor-descriptor","commit_stats":null,"previous_names":["jonschlinkert/is-accessor-descriptor"],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inspect-js%2Fis-accessor-descriptor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inspect-js%2Fis-accessor-descriptor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inspect-js%2Fis-accessor-descriptor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inspect-js%2Fis-accessor-descriptor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/inspect-js","download_url":"https://codeload.github.com/inspect-js/is-accessor-descriptor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inspect-js%2Fis-accessor-descriptor/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259063396,"owners_count":22799711,"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":["accessor","accessor-descriptor","descriptor","javascript","node","nodejs"],"created_at":"2024-10-27T14:04:19.997Z","updated_at":"2025-06-13T17:08:18.386Z","avatar_url":"https://github.com/inspect-js.png","language":"JavaScript","funding_links":["https://github.com/sponsors/ljharb","https://tidelift.com/funding/github/npm/deep-equal"],"categories":[],"sub_categories":[],"readme":"# is-accessor-descriptor \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[![License][license-image]][license-url]\n[![Downloads][downloads-image]][downloads-url]\n\n[![npm badge][npm-badge-png]][package-url]\n\n\u003e Returns true if a value has the characteristics of a valid JavaScript accessor descriptor.\n\n## Examples\n\n```js\nconst isAccessorDescriptor = require('is-accessor-descriptor');\nconst assert = require('assert');\n\nconst obj = {\n\tget foo() {},\n\tbar: { get: function() {} }\n};\n\nassert.equal(true, isAccessorDescriptor(obj, 'foo'));\nassert.equal(false, isAccessorDescriptor(obj, 'bar'));\n\n// or, if you already have the descriptor you can pass it directly\nconst foo = Object.getOwnPropertyDescriptor(obj, 'foo');\nassert.equal(true, isAccessorDescriptor(foo));\n\nconst bar = Object.getOwnPropertyDescriptor(obj, 'bar');\nassert.equal(false, isAccessorDescriptor(bar));\n```\n\n### Related projects\n\nYou might also be interested in these projects:\n\n* [is-data-descriptor](https://www.npmjs.com/package/is-data-descriptor): Returns true if a value has the characteristics of a valid JavaScript data descriptor.\n* [is-descriptor](https://www.npmjs.com/package/is-descriptor): Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for… [more](https://github.com/inspect-js/is-descriptor)\n* [is-object](https://www.npmjs.com/package/is-object): Returns true if the value is an object and not an array or null.\n\n## Tests\nSimply clone the repo, `npm install`, and run `npm test`\n\n[package-url]: https://npmjs.org/package/is-accessor-descriptor\n[npm-version-svg]: https://versionbadg.es/inspect-js/is-accessor-descriptor.svg\n[deps-svg]: https://david-dm.org/inspect-js/is-accessor-descriptor.svg\n[deps-url]: https://david-dm.org/inspect-js/is-accessor-descriptor\n[dev-deps-svg]: https://david-dm.org/inspect-js/is-accessor-descriptor/dev-status.svg\n[dev-deps-url]: https://david-dm.org/inspect-js/is-accessor-descriptor#info=devDependencies\n[npm-badge-png]: https://nodei.co/npm/is-accessor-descriptor.png?downloads=true\u0026stars=true\n[license-image]: https://img.shields.io/npm/l/is-accessor-descriptor.svg\n[license-url]: LICENSE\n[downloads-image]: https://img.shields.io/npm/dm/is-accessor-descriptor.svg\n[downloads-url]: https://npm-stat.com/charts.html?package=is-accessor-descriptor\n[codecov-image]: https://codecov.io/gh/inspect-js/is-accessor-descriptor/branch/main/graphs/badge.svg\n[codecov-url]: https://app.codecov.io/gh/inspect-js/is-accessor-descriptor/\n[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-accessor-descriptor\n[actions-url]: https://github.com/inspect-js/is-accessor-descriptor/actions\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finspect-js%2Fis-accessor-descriptor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finspect-js%2Fis-accessor-descriptor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finspect-js%2Fis-accessor-descriptor/lists"}