Comparing version 1.0.0 to 1.1.0
@@ -7,3 +7,3 @@ 'use strict'; | ||
module.exports = (object, onChange) => { | ||
const onChange = (object, onChange) => { | ||
let inApply = false; | ||
@@ -53,3 +53,3 @@ let changed = false; | ||
const value = Reflect.get(target, property, receiver); | ||
if (isPrimitive(value)) { | ||
if (isPrimitive(value) || property === 'constructor') { | ||
return value; | ||
@@ -128,1 +128,4 @@ } | ||
}; | ||
module.exports = onChange; | ||
module.exports.default = onChange; |
{ | ||
"name": "on-change", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "Watch an object or array for changes", | ||
@@ -16,7 +16,8 @@ "license": "MIT", | ||
"scripts": { | ||
"test": "xo && ava", | ||
"test": "xo && ava && tsd-check", | ||
"bench": "matcha bench/bench.js" | ||
}, | ||
"files": [ | ||
"index.js" | ||
"index.js", | ||
"index.d.ts" | ||
], | ||
@@ -42,4 +43,5 @@ "keywords": [ | ||
"matcha": "^0.7.0", | ||
"xo": "^0.23.0" | ||
"tsd-check": "^0.3.0", | ||
"xo": "^0.24.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
7026
5
106
4