Comparing version 1.5.0 to 1.6.0
@@ -5,2 +5,12 @@ # Changelog | ||
## [1.6.0](https://github.com/medikoo/es5-ext/compare/v1.5.0...v1.6.0) (2021-09-24) | ||
### Features | ||
- `Object.clear` util ([a955da4](https://github.com/medikoo/es5-ext/commit/a955da41e65a25ad87a46234bae065f096abd1d2)) | ||
### Bug Fixes | ||
- Fix `Object.entries` to not return non enumerable properties ([44fb872](https://github.com/medikoo/es5-ext/commit/44fb87266617378d2f47a1a5baad6280bf6298a8)) | ||
## [1.5.0](https://github.com/medikoo/es5-ext/compare/v1.3.0...v1.5.0) (2021-08-23) | ||
@@ -7,0 +17,0 @@ |
@@ -5,3 +5,3 @@ "use strict"; | ||
var objHasOwnProperty = Object.prototype.hasOwnProperty; | ||
var objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable; | ||
@@ -12,3 +12,3 @@ module.exports = function (object) { | ||
for (var key in object) { | ||
if (!objHasOwnProperty.call(object, key)) continue; | ||
if (!objPropertyIsEnumerable.call(object, key)) continue; | ||
result.push([key, object[key]]); | ||
@@ -15,0 +15,0 @@ } |
{ | ||
"name": "ext", | ||
"version": "1.5.0", | ||
"version": "1.6.0", | ||
"description": "JavaScript utilities with respect to emerging standard", | ||
@@ -5,0 +5,0 @@ "author": "Mariusz Nowak <medyk@medikoo.com> (http://www.medikoo.com/)", |
@@ -27,2 +27,3 @@ # ext | ||
- `Object` | ||
- [`clear`](docs/object/clear.md) | ||
- [`entries`](docs/object/entries.md) | ||
@@ -29,0 +30,0 @@ - `Promise` |
@@ -9,4 +9,13 @@ "use strict"; | ||
}); | ||
if (Object.defineProperty) { | ||
it("Should not resolve non-enumerable properties", function () { | ||
var obj = { visible: true }; | ||
Object.defineProperty(obj, "hidden", { value: "elo" }); | ||
assert.deepEqual(entries(obj), [["visible", true]]); | ||
}); | ||
} | ||
it("Should resolve entries array for a primitive", function () { | ||
assert.deepEqual(entries("raz"), [["0", "r"], ["1", "a"], ["2", "z"]]); | ||
assert.deepEqual(entries("raz"), [ | ||
["0", "r"], ["1", "a"], ["2", "z"] | ||
]); | ||
}); | ||
@@ -13,0 +22,0 @@ it("Should throw on non-value", function () { |
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
33135
56
635
37