{"name":"is-data-descriptor","version":"2.1.1","description":"Returns true if a value has the characteristics of a valid JavaScript data descriptor.","main":"index.js","exports":{".":"./index.js","./package.json":"./package.json"},"scripts":{"prepack":"npmignore --auto --commentLines=autogenerated","prepublishOnly":"safe-publish-latest","prepublish":"not-in-publish || npm run prepublishOnly","lint":"eslint --ext=js,mjs .","pretest":"npm run lint","tests-only":"nyc tape 'test/**/*.js'","test":"npm run tests-only","posttest":"aud --production","prelint":"evalmd README.md","version":"auto-changelog && git add CHANGELOG.md","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""},"repository":{"type":"git","url":"git+https://github.com/inspect-js/is-data-descriptor.git"},"keywords":["accessor","check","data","descriptor","get","getter","is","keys","object","properties","property","set","setter","type","valid","value"],"author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"license":"MIT","bugs":{"url":"https://github.com/inspect-js/is-data-descriptor/issues"},"homepage":"https://github.com/inspect-js/is-data-descriptor","contributors":[{"name":"Jordan Harband","url":"https://github.com/ljharb"},{"name":"Jon Schlinkert","url":"https://twitter.com/jonschlinkert"},{"name":"Rouven Weßling","url":"www.rouvenwessling.de"}],"devDependencies":{"@ljharb/eslint-config":"^21.0.1","aud":"^2.0.2","auto-changelog":"^2.4.0","eslint":"=8.8.0","evalmd":"^0.0.19","in-publish":"^2.0.1","npmignore":"^0.3.0","nyc":"^10.3.2","safe-publish-latest":"^2.0.0","tape":"^5.6.3"},"engines":{"node":">= 0.4"},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"publishConfig":{"ignore":[".github/workflows"]},"gitHead":"4caa007f46b4a9670fd1dc83b0eaab62cec9433d","_id":"is-data-descriptor@2.1.1","_nodeVersion":"20.0.0","_npmVersion":"9.6.4","dist":{"integrity":"sha512-N/OLRe9pfLIaz0HYqljaf0cfU362S9gqdOO6VJIal9++zACMC0KKAvbUeyG5dPSZkm6RmzUhm31niFcgl6UQjw==","shasum":"a534331c86660c625fea7475f0b97ab5c2c0dfba","tarball":"http://registry-npm.ywwl.com/is-data-descriptor/download/is-data-descriptor-2.1.1.tgz","fileCount":11,"unpackedSize":17623,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCYZHuviWKWNp+722EIwuBdd9MkhqL6kkcp9wRV3juHawIhANvEaDHEB/PGZXXUssxXhfbjs49NR7QQV/ONT2nh5+cb"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkSvaCACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrDjQ/+IFjMYWaV8XV/T/Xm+y9lGOLC4nFah1x9Q3xtjtavArLmRHds\r\n92dHnFODDz5UUUhKGPecEEG3EIWpHFW0EbVNNBo2hUP1NS99/943dDB+y1WG\r\nKJT4D3ViVUJXTvd1WiVPtQDN9VNXApLNhc9MrVmOyR7+664iYNmivOZrfXHP\r\nBUVzOGkG8pp1kTXDBaIbU3Kad+LT4XdRF95DE6EMEaRrfiZq3u2UZgCuxzXy\r\nV6cFgk/9zyjD1h0uZvElMIK3EHNcNO+gj8OrxOrzluNoID1mykfwJ45zOlAp\r\nmgRzQpg4yRAbJEqugtnOlbCn4/CC1uTvwP22kl+cINs7JTHupCSmLxxjhCfU\r\n3CDK1PSkODBpkTb9Ug5nRb6AavsF4NoO7uBRJj0noH98ieRkZ0SbV3sxaaM4\r\nlbAYtzOcTIwuUDlkuVUxXnnTeapapTJhImwBslimnUqNmAFreTzlvGz7m4Wm\r\nag0XI84ykE1aTL5VbxEXIeB3JCVr4Qpme1i2fjA9SAvcDA9vQkiLzqO42FGs\r\nAKXdV+985GaDg0SmeqsecxsXDvyDYMyw+SMTcR/VbGhTHl2D9pKjGlZOja0J\r\n47DzQdvhxNwcx+1WoQ1hK+ME7Ayj9XVa3e0Y9Sd2hX3d4CRv7ya8lExU0ikw\r\n6zuGSPb/LqLv2/7YhiXVBd6i1MZMxSSUfxw=\r\n=30Ne\r\n-----END PGP SIGNATURE-----\r\n","size":6206,"noattachment":false,"key":"/is-data-descriptor/-/is-data-descriptor-2.1.1.tgz"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"},{"name":"jonschlinkert","email":"github@sellside.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-data-descriptor_2.1.1_1682634370200_0.3730969378191573"},"_hasShrinkwrap":false,"readme":"# is-data-descriptor <sup>[![Version Badge][npm-version-svg]][package-url]</sup>\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> Returns true if a value has the characteristics of a valid JavaScript data descriptor.\n\n## Examples\n\n`true` when the descriptor has valid properties with valid values.\n`false` when not an object or when the object has invalid properties.\n\n```js\nvar isDataDesc = require('is-data-descriptor');\nvar assert = require('assert');\n\nassert.equal(true, isDataDesc({ value: 'foo' }));\nassert.equal(true, isDataDesc({ value: function () {} }));\nassert.equal(true, isDataDesc({ value: true }));\n\nassert.equal(false, isDataDesc('a'));\nassert.equal(false, isDataDesc(null));\nassert.equal(false, isDataDesc([]));\n\nassert.equal(false, isDataDesc({ value: 'foo', bar: 'baz' }));\nassert.equal(false, isDataDesc({ value: 'foo', bar: 'baz' }));\nassert.equal(false, isDataDesc({ value: 'foo', get: function () {} }));\nassert.equal(false, isDataDesc({ get: function () {}, value: 'foo' }) );\n \nassert.equal(false, isDataDesc({ value: 'foo', enumerable: 'foo' }));\nassert.equal(false, isDataDesc({ value: 'foo', configurable: 'foo' }));\nassert.equal(false, isDataDesc({ value: 'foo', writable: 'foo' }));\n```\n\n## Valid properties\n\nThe only valid data descriptor properties are the following:\n\n* `configurable` (required)\n* `enumerable` (required)\n* `value` (optional)\n* `writable` (optional)\n\nTo be a valid data descriptor, either `value` or `writable` must be defined.\n\n**Invalid properties**\n\nA descriptor may have additional _invalid_ properties (an error will **not** be thrown).\n\n```js\nvar foo = {};\n\nObject.defineProperty(foo, 'bar', {\n\tenumerable: true,\n\twhatever: 'blah', // invalid, but doesn't cause an error\n\tget() {\n\t\treturn 'baz';\n\t}\n});\n\nassert.equal(foo.bar, 'baz');\n```\n\n### Related projects\n\n* [is-accessor-descriptor](https://npmjs.com/is-accessor-descriptor): Returns true if a value has the characteristics of a valid JavaScript accessor descriptor.\n* [is-descriptor](https://npmjs.com/is-descriptor): Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for… [more](https://npmjs.com/is-descriptor)\n\n## Tests\n\nSimply clone the repo, `npm install`, and run `npm test`\n\n[package-url]: https://npmjs.org/package/is-data-descriptor\n[npm-version-svg]: https://versionbadg.es/inspect-js/is-data-descriptor.svg\n[deps-svg]: https://david-dm.org/inspect-js/is-data-descriptor.svg\n[deps-url]: https://david-dm.org/inspect-js/is-data-descriptor\n[dev-deps-svg]: https://david-dm.org/inspect-js/is-data-descriptor/dev-status.svg\n[dev-deps-url]: https://david-dm.org/inspect-js/is-data-descriptor#info=devDependencies\n[npm-badge-png]: https://nodei.co/npm/is-data-descriptor.png?downloads=true&stars=true\n[license-image]: https://img.shields.io/npm/l/is-data-descriptor.svg\n[license-url]: LICENSE\n[downloads-image]: https://img.shields.io/npm/dm/is-data-descriptor.svg\n[downloads-url]: https://npm-stat.com/charts.html?package=is-data-descriptor\n[codecov-image]: https://codecov.io/gh/inspect-js/is-data-descriptor/branch/main/graphs/badge.svg\n[codecov-url]: https://app.codecov.io/gh/inspect-js/is-data-descriptor/\n[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-data-descriptor\n[actions-url]: https://github.com/inspect-js/is-data-descriptor/actions\n","publish_time":1682634370349,"_cnpm_publish_time":1682634370349,"dist-tags":{"latest":"2.1.3","v0-backport":"0.1.5","v1-backport":"1.0.1"}}