Socket
Socket
Sign inDemoInstall

object.getownpropertydescriptors

Package Overview
Dependencies
67
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.1.3 to 2.1.4

10

CHANGELOG.md

@@ -0,1 +1,11 @@

2.1.4 / 2022-05-19
=================
* [Fix] `Array.prototype.reduce` isn’t present in ES3 engines
* [meta] use `npmignore` to autogenerate an npmignore file
* [Deps] update `define-properties`, `es-abstract`
* [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `aud`, `auto-changelog`, `functions-have-names`, `safe-publish-latest`, `tape`
* [Tests] use `mock-property`
* [actions] reuse common workflows
* [actions] update codecov uploader
2.1.3 / 2021-10-03

@@ -2,0 +12,0 @@ =================

4

implementation.js

@@ -8,2 +8,3 @@ 'use strict';

var callBound = require('call-bind/callBound');
var reduce = require('array.prototype.reduce');

@@ -14,3 +15,2 @@ var $gOPD = Object.getOwnPropertyDescriptor;

var $concat = callBound('Array.prototype.concat');
var $reduce = callBound('Array.prototype.reduce');
var getAll = $getSymbols ? function (obj) {

@@ -29,3 +29,3 @@ return $concat($getOwnNames(obj), $getSymbols(obj));

var O = ToObject(value);
return $reduce(
return reduce(
getAll(O),

@@ -32,0 +32,0 @@ function (acc, key) {

{
"name": "object.getownpropertydescriptors",
"version": "2.1.3",
"version": "2.1.4",
"author": "Jordan Harband <ljharb@gmail.com>",

@@ -12,2 +12,3 @@ "funding": {

"scripts": {
"prepack": "npmignore --auto --commentLines=autogenerated",
"prepublish": "not-in-publish || npm run prepublishOnly",

@@ -17,5 +18,5 @@ "prepublishOnly": "safe-publish-latest",

"test": "npm run --silent tests-only",
"posttest": "npx aud --production",
"posttest": "aud --production",
"tests-only": "nyc tape 'test/**/*.js'",
"lint": "eslint .",
"lint": "eslint --ext=js,mjs .",
"postlint": "es-shim-api --bound"

@@ -39,16 +40,20 @@ },

"dependencies": {
"array.prototype.reduce": "^1.0.4",
"call-bind": "^1.0.2",
"define-properties": "^1.1.3",
"es-abstract": "^1.19.1"
"define-properties": "^1.1.4",
"es-abstract": "^1.20.1"
},
"devDependencies": {
"@es-shims/api": "^2.2.1",
"@ljharb/eslint-config": "^18.0.0",
"aud": "^1.1.5",
"eslint": "^7.32.0",
"functions-have-names": "^1.2.2",
"@es-shims/api": "^2.2.3",
"@ljharb/eslint-config": "^21.0.0",
"aud": "^2.0.0",
"auto-changelog": "^2.4.0",
"eslint": "=8.8.0",
"functions-have-names": "^1.2.3",
"has-strict-mode": "^1.0.1",
"mock-property": "^1.0.0",
"npmignore": "^0.3.0",
"nyc": "^10.3.2",
"safe-publish-latest": "^1.1.4",
"tape": "^5.3.1"
"safe-publish-latest": "^2.0.0",
"tape": "^5.5.3"
},

@@ -78,3 +83,8 @@ "testling": {

"node": ">= 0.8"
},
"publishConfig": {
"ignore": [
".github/workflows"
]
}
}
'use strict';
var mockProperty = require('mock-property');
module.exports = function (getDescriptors, t) {

@@ -31,5 +33,3 @@ var enumDescriptor = {

/* eslint-disable no-extend-native, accessor-pairs */
Object.defineProperty(Object.prototype, key, { configurable: true, set: function (v) { throw new Error(v); } });
/* eslint-enable no-extend-native, accessor-pairs */
st.teardown(mockProperty(Object.prototype, key, { set: function (v) { throw new Error(v); } }));

@@ -106,3 +106,2 @@ var hasOwnNamesBug = false;

/* global Proxy */
var supportsProxy = typeof Proxy === 'function';

@@ -109,0 +108,0 @@ t.test('Proxies that return an undefined descriptor', { skip: !supportsProxy }, function (st) {

Sorry, the diff of this file is not supported yet

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