Socket
Socket
Sign inDemoInstall

has-property-descriptors

Package Overview
Dependencies
7
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.1 to 1.0.2

8

CHANGELOG.md

@@ -8,2 +8,10 @@ # Changelog

## [v1.0.2](https://github.com/inspect-js/has-property-descriptors/compare/v1.0.1...v1.0.2) - 2024-02-12
### Commits
- [Refactor] use `es-define-property` [`f93a8c8`](https://github.com/inspect-js/has-property-descriptors/commit/f93a8c85eba70cbceab500f2619fb5cce73a1805)
- [Dev Deps] update `aud`, `npmignore`, `tape` [`42b0c9d`](https://github.com/inspect-js/has-property-descriptors/commit/42b0c9d1c23e747755f0f2924923c418ea34a9ee)
- [Deps] update `get-intrinsic` [`35e9b46`](https://github.com/inspect-js/has-property-descriptors/commit/35e9b46a7f14331bf0de98b644dd803676746037)
## [v1.0.1](https://github.com/inspect-js/has-property-descriptors/compare/v1.0.0...v1.0.1) - 2023-10-20

@@ -10,0 +18,0 @@

17

index.js
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $defineProperty = require('es-define-property');
var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
var hasPropertyDescriptors = function hasPropertyDescriptors() {
if ($defineProperty) {
try {
$defineProperty({}, 'a', { value: 1 });
return true;
} catch (e) {
// IE 8 has a broken defineProperty
return false;
}
}
return false;
return !!$defineProperty;
};

@@ -22,3 +11,3 @@

// node v0.6 has a bug where array lengths can be Set but not Defined
if (!hasPropertyDescriptors()) {
if (!$defineProperty) {
return null;

@@ -25,0 +14,0 @@ }

{
"name": "has-property-descriptors",
"version": "1.0.1",
"version": "1.0.2",
"description": "Does the environment have full property descriptor support? Handles IE 8's broken defineProperty/gOPD.",

@@ -48,3 +48,3 @@ "main": "index.js",

"@ljharb/eslint-config": "^21.1.0",
"aud": "^2.0.3",
"aud": "^2.0.4",
"auto-changelog": "^2.4.0",

@@ -54,9 +54,9 @@ "eslint": "=8.8.0",

"in-publish": "^2.0.1",
"npmignore": "^0.3.0",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"safe-publish-latest": "^2.0.0",
"tape": "^5.7.2"
"tape": "^5.7.4"
},
"dependencies": {
"get-intrinsic": "^1.2.2"
"es-define-property": "^1.0.0"
},

@@ -63,0 +63,0 @@ "testling": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc