is-data-descriptor
Advanced tools
Comparing version 2.1.2 to 2.1.3
@@ -8,2 +8,35 @@ # Changelog | ||
## [v2.1.3](https://github.com/inspect-js/is-data-descriptor/compare/v2.1.2...v2.1.3) - 2023-10-26 | ||
### Commits | ||
- Merge tag v0.1.5, v1.0.1 [`c64e97f`](https://github.com/inspect-js/is-data-descriptor/commit/c64e97fccae99478ee2ce1444e9c07c7eb71d29c) | ||
- [eslint] actually use eslint [`dce7eae`](https://github.com/inspect-js/is-data-descriptor/commit/dce7eaea756b16ceb9de6361c1f6ae424e4607cb) | ||
- [eslint] actually use eslint [`65fed07`](https://github.com/inspect-js/is-data-descriptor/commit/65fed07b2dde027da64f303c21a44a4375a2e2bd) | ||
- [meta] update package.json etc from main [`1ebc548`](https://github.com/inspect-js/is-data-descriptor/commit/1ebc548ff35b653bf3442884ea15a5106a468eb4) | ||
- [readme] clean up readme, remove verb [`10ad663`](https://github.com/inspect-js/is-data-descriptor/commit/10ad663093b0ed9c9c0c13c6db4ead4351b8670e) | ||
- [meta] clean up package.json [`7f76a01`](https://github.com/inspect-js/is-data-descriptor/commit/7f76a015050fc87e9b394440c3b5283cf55b2c82) | ||
- [readme] remove verb [`8178901`](https://github.com/inspect-js/is-data-descriptor/commit/8178901ff4a02f77eabe1a57d395b9759a5dd54c) | ||
- [meta] update `.gitignore` [`a2ca593`](https://github.com/inspect-js/is-data-descriptor/commit/a2ca593bb1173e73f23eb401e455249c71c2eda8) | ||
- [Tests] switch to tape [`70540e5`](https://github.com/inspect-js/is-data-descriptor/commit/70540e5449ef3239051d4e40dce8a5a1978d1634) | ||
- [Tests] switch to tape [`95ff316`](https://github.com/inspect-js/is-data-descriptor/commit/95ff3166a7a3a1967f65a38a51f3aaab854bcf12) | ||
- [readme] update from main [`bb8bcf2`](https://github.com/inspect-js/is-data-descriptor/commit/bb8bcf2ff298afe02e96f84acee8dd3efb3fc178) | ||
- [Tests] migrate from travis to github actions [`eee138d`](https://github.com/inspect-js/is-data-descriptor/commit/eee138d84d57191310acf3e7fdc83f5951570188) | ||
- [Tests] migrate from travis to github actions [`a46e5a4`](https://github.com/inspect-js/is-data-descriptor/commit/a46e5a4bcf0b6ffa724e0e020de31b38ef636ec7) | ||
- [readme] use `evalmd` [`7648a08`](https://github.com/inspect-js/is-data-descriptor/commit/7648a08ed9329999f1a272b2797afbdcbffe6c48) | ||
- [Tests] move into a test dir [`f0f3521`](https://github.com/inspect-js/is-data-descriptor/commit/f0f352180550868cdada6fb01e9e85b56cfb30fa) | ||
- [Fix] properly return false for an accessor descriptor [`2c213cd`](https://github.com/inspect-js/is-data-descriptor/commit/2c213cd67d558c169a02892dc52592ca1d5d8f40) | ||
- [Fix] correctly return false for something with get or set [`16bcab0`](https://github.com/inspect-js/is-data-descriptor/commit/16bcab054ae075f25f319dbbded100637098400c) | ||
- [Performance] move data object to module level [`37688a1`](https://github.com/inspect-js/is-data-descriptor/commit/37688a1653f3a2a364f14bb396803413cb435963) | ||
- [Fix] allow any non-primitive; arrays and functions are objects too [`f01936a`](https://github.com/inspect-js/is-data-descriptor/commit/f01936a33307ae2e3ae0565b4e09f0559feff59e) | ||
- [Refactor] use `hasown` [`060ed0a`](https://github.com/inspect-js/is-data-descriptor/commit/060ed0aa7c6afefa390f623e321b186d056fba6f) | ||
- [Fix] allow any non-primitive; arrays and functions are objects too [`197c77a`](https://github.com/inspect-js/is-data-descriptor/commit/197c77a39c53d12d7a091bcc029fcf7d75ce3a26) | ||
- [Fix] accept a symbol in the two-arg form [`78b6215`](https://github.com/inspect-js/is-data-descriptor/commit/78b6215b682e194fe3eaaf4344074472143afedf) | ||
- Only apps should have lockfiles [`bbf6d2e`](https://github.com/inspect-js/is-data-descriptor/commit/bbf6d2ef78a07cbc5cc78d76681ce3c807c06d00) | ||
- Only apps should have lockfiles [`20aa6e5`](https://github.com/inspect-js/is-data-descriptor/commit/20aa6e513aeb4bb84be63e278ce073c860deeade) | ||
- [Fix] use correct logic for two-arg form [`1f77993`](https://github.com/inspect-js/is-data-descriptor/commit/1f779935fa9bb60e69cdb8fdc84366827aabd162) | ||
- [Robustness] switch to `hasown` [`aa48e2f`](https://github.com/inspect-js/is-data-descriptor/commit/aa48e2f61b3fb29e80cf655618d1573a21e8433e) | ||
- [Fix] properly guard for-in loop [`014971e`](https://github.com/inspect-js/is-data-descriptor/commit/014971ea90715c2675511b89d05df00d4be10ecf) | ||
- [Robustness] use a null object just in case [`ab05aad`](https://github.com/inspect-js/is-data-descriptor/commit/ab05aad03368d202505c4acde07ebc22f8da128d) | ||
## [v2.1.2](https://github.com/inspect-js/is-data-descriptor/compare/v2.1.1...v2.1.2) - 2023-10-25 | ||
@@ -37,3 +70,3 @@ | ||
## [v2.0.0](https://github.com/inspect-js/is-data-descriptor/compare/v1.0.0...v2.0.0) - 2018-12-13 | ||
## [v2.0.0](https://github.com/inspect-js/is-data-descriptor/compare/v1.0.1...v2.0.0) - 2018-12-13 | ||
@@ -44,4 +77,22 @@ ### Commits | ||
## [v1.0.0](https://github.com/inspect-js/is-data-descriptor/compare/v0.1.4...v1.0.0) - 2017-11-01 | ||
## [v1.0.1](https://github.com/inspect-js/is-data-descriptor/compare/v1.0.0...v1.0.1) - 2023-10-26 | ||
### Commits | ||
- [eslint] actually use eslint [`65fed07`](https://github.com/inspect-js/is-data-descriptor/commit/65fed07b2dde027da64f303c21a44a4375a2e2bd) | ||
- [readme] clean up readme, remove verb [`10ad663`](https://github.com/inspect-js/is-data-descriptor/commit/10ad663093b0ed9c9c0c13c6db4ead4351b8670e) | ||
- [meta] clean up package.json [`7f76a01`](https://github.com/inspect-js/is-data-descriptor/commit/7f76a015050fc87e9b394440c3b5283cf55b2c82) | ||
- [meta] update `.gitignore` [`a2ca593`](https://github.com/inspect-js/is-data-descriptor/commit/a2ca593bb1173e73f23eb401e455249c71c2eda8) | ||
- [Tests] switch to tape [`70540e5`](https://github.com/inspect-js/is-data-descriptor/commit/70540e5449ef3239051d4e40dce8a5a1978d1634) | ||
- [Tests] migrate from travis to github actions [`eee138d`](https://github.com/inspect-js/is-data-descriptor/commit/eee138d84d57191310acf3e7fdc83f5951570188) | ||
- [Fix] properly return false for an accessor descriptor [`2c213cd`](https://github.com/inspect-js/is-data-descriptor/commit/2c213cd67d558c169a02892dc52592ca1d5d8f40) | ||
- [Performance] move data object to module level [`37688a1`](https://github.com/inspect-js/is-data-descriptor/commit/37688a1653f3a2a364f14bb396803413cb435963) | ||
- [Fix] allow any non-primitive; arrays and functions are objects too [`197c77a`](https://github.com/inspect-js/is-data-descriptor/commit/197c77a39c53d12d7a091bcc029fcf7d75ce3a26) | ||
- Only apps should have lockfiles [`20aa6e5`](https://github.com/inspect-js/is-data-descriptor/commit/20aa6e513aeb4bb84be63e278ce073c860deeade) | ||
- [Robustness] switch to `hasown` [`aa48e2f`](https://github.com/inspect-js/is-data-descriptor/commit/aa48e2f61b3fb29e80cf655618d1573a21e8433e) | ||
- [Fix] properly guard for-in loop [`014971e`](https://github.com/inspect-js/is-data-descriptor/commit/014971ea90715c2675511b89d05df00d4be10ecf) | ||
- [Robustness] use a null object just in case [`ab05aad`](https://github.com/inspect-js/is-data-descriptor/commit/ab05aad03368d202505c4acde07ebc22f8da128d) | ||
## [v1.0.0](https://github.com/inspect-js/is-data-descriptor/compare/v0.1.5...v1.0.0) - 2017-11-01 | ||
### Merged | ||
@@ -58,2 +109,21 @@ | ||
## [v0.1.5](https://github.com/inspect-js/is-data-descriptor/compare/v0.1.4...v0.1.5) - 2023-10-26 | ||
### Commits | ||
- [eslint] actually use eslint [`dce7eae`](https://github.com/inspect-js/is-data-descriptor/commit/dce7eaea756b16ceb9de6361c1f6ae424e4607cb) | ||
- [meta] update package.json etc from main [`1ebc548`](https://github.com/inspect-js/is-data-descriptor/commit/1ebc548ff35b653bf3442884ea15a5106a468eb4) | ||
- [readme] remove verb [`8178901`](https://github.com/inspect-js/is-data-descriptor/commit/8178901ff4a02f77eabe1a57d395b9759a5dd54c) | ||
- [Tests] switch to tape [`95ff316`](https://github.com/inspect-js/is-data-descriptor/commit/95ff3166a7a3a1967f65a38a51f3aaab854bcf12) | ||
- [readme] update from main [`bb8bcf2`](https://github.com/inspect-js/is-data-descriptor/commit/bb8bcf2ff298afe02e96f84acee8dd3efb3fc178) | ||
- [Tests] migrate from travis to github actions [`a46e5a4`](https://github.com/inspect-js/is-data-descriptor/commit/a46e5a4bcf0b6ffa724e0e020de31b38ef636ec7) | ||
- [readme] use `evalmd` [`7648a08`](https://github.com/inspect-js/is-data-descriptor/commit/7648a08ed9329999f1a272b2797afbdcbffe6c48) | ||
- [Tests] move into a test dir [`f0f3521`](https://github.com/inspect-js/is-data-descriptor/commit/f0f352180550868cdada6fb01e9e85b56cfb30fa) | ||
- [Fix] correctly return false for something with get or set [`16bcab0`](https://github.com/inspect-js/is-data-descriptor/commit/16bcab054ae075f25f319dbbded100637098400c) | ||
- [Fix] allow any non-primitive; arrays and functions are objects too [`f01936a`](https://github.com/inspect-js/is-data-descriptor/commit/f01936a33307ae2e3ae0565b4e09f0559feff59e) | ||
- [Refactor] use `hasown` [`060ed0a`](https://github.com/inspect-js/is-data-descriptor/commit/060ed0aa7c6afefa390f623e321b186d056fba6f) | ||
- [Fix] accept a symbol in the two-arg form [`78b6215`](https://github.com/inspect-js/is-data-descriptor/commit/78b6215b682e194fe3eaaf4344074472143afedf) | ||
- Only apps should have lockfiles [`bbf6d2e`](https://github.com/inspect-js/is-data-descriptor/commit/bbf6d2ef78a07cbc5cc78d76681ce3c807c06d00) | ||
- [Fix] use correct logic for two-arg form [`1f77993`](https://github.com/inspect-js/is-data-descriptor/commit/1f779935fa9bb60e69cdb8fdc84366827aabd162) | ||
## [v0.1.4](https://github.com/inspect-js/is-data-descriptor/compare/v0.1.3...v0.1.4) - 2015-12-28 | ||
@@ -60,0 +130,0 @@ |
'use strict'; | ||
var hasOwn = require('hasown'); | ||
var gOPD = require('gopd'); | ||
var isObject = function (val) { | ||
@@ -12,3 +14,3 @@ return val !== null && typeof val === 'object' && !Array.isArray(val); | ||
} | ||
var desc = arguments.length > 1 ? Object.getOwnPropertyDescriptor(obj, key) : obj; | ||
var desc = arguments.length > 1 ? gOPD(obj, key) : obj; | ||
if (isObject(desc)) { | ||
@@ -15,0 +17,0 @@ if ( |
{ | ||
"name": "is-data-descriptor", | ||
"version": "2.1.2", | ||
"version": "2.1.3", | ||
"description": "Returns true if a value has the characteristics of a valid JavaScript data descriptor.", | ||
@@ -14,2 +14,3 @@ "main": "index.js", | ||
"prepublish": "not-in-publish || npm run prepublishOnly", | ||
"prelint": "evalmd README.md", | ||
"lint": "eslint --ext=js,mjs .", | ||
@@ -20,3 +21,2 @@ "pretest": "npm run lint", | ||
"posttest": "aud --production", | ||
"prelint": "evalmd README.md", | ||
"version": "auto-changelog && git add CHANGELOG.md", | ||
@@ -58,2 +58,6 @@ "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" | ||
], | ||
"dependencies": { | ||
"gopd": "^1.0.1", | ||
"hasown": "^2.0.0" | ||
}, | ||
"devDependencies": { | ||
@@ -86,6 +90,3 @@ "@ljharb/eslint-config": "^21.1.0", | ||
] | ||
}, | ||
"dependencies": { | ||
"hasown": "^2.0.0" | ||
} | ||
} |
@@ -60,3 +60,3 @@ # is-data-descriptor <sup>[![Version Badge][npm-version-svg]][package-url]</sup> | ||
whatever: 'blah', // invalid, but doesn't cause an error | ||
get: function() { | ||
get() { | ||
return 'baz'; | ||
@@ -66,4 +66,3 @@ } | ||
console.log(foo.bar); | ||
//=> 'baz' | ||
assert.equal(foo.bar, 'baz'); | ||
``` | ||
@@ -73,9 +72,7 @@ | ||
You might also be interested in these projects: | ||
* [is-accessor-descriptor](https://npmjs.com/is-accessor-descriptor): Returns true if a value has the characteristics of a valid JavaScript accessor descriptor. | ||
* [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) | ||
* [is-accessor-descriptor](https://www.npmjs.com/package/is-accessor-descriptor): Returns true if a value has the characteristics of a valid JavaScript accessor descriptor. | ||
* [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/jonschlinkert/is-descriptor) | ||
* [is-object](https://www.npmjs.com/package/is-object): Returns true if the value is an object and not an array or null. | ||
## Tests | ||
## Tests | ||
Simply clone the repo, `npm install`, and run `npm test` | ||
@@ -82,0 +79,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26404
103
2
92
+ Addedgopd@^1.0.1
+ Addedes-errors@1.3.0(transitive)
+ Addedget-intrinsic@1.2.4(transitive)
+ Addedgopd@1.0.1(transitive)
+ Addedhas-proto@1.0.3(transitive)
+ Addedhas-symbols@1.0.3(transitive)