extendable-immutable
Advanced tools
Comparing version 1.0.5 to 1.0.6
@@ -7,2 +7,3 @@ import _typeof from 'babel-runtime/helpers/typeof'; | ||
var emptySymbol = _Symbol('empty'); | ||
var unwrappedMethods = ['get', 'getIn', 'first', 'last', 'getIn', 'reduce', 'reduceRight', 'find', 'findLast', 'findEntry', 'findLastEntry', 'max', 'maxBy', 'min', 'minBy']; | ||
@@ -36,3 +37,3 @@ export default function createExtendable(base, copy, empty) { | ||
for (var key in base.prototype) { | ||
if (!key.startsWith('__') && key !== 'to' + name && base.prototype.hasOwnProperty(key)) { | ||
if (!key.startsWith('__') && !key.startsWith('to') && unwrappedMethods.indexOf(key) === -1 && base.prototype.hasOwnProperty(key)) { | ||
(function () { | ||
@@ -39,0 +40,0 @@ var _originalMethod = base.prototype[key]; |
@@ -28,2 +28,3 @@ 'use strict'; | ||
var emptySymbol = (0, _symbol2.default)('empty'); | ||
var unwrappedMethods = ['get', 'getIn', 'first', 'last', 'getIn', 'reduce', 'reduceRight', 'find', 'findLast', 'findEntry', 'findLastEntry', 'max', 'maxBy', 'min', 'minBy']; | ||
@@ -57,3 +58,3 @@ function createExtendable(base, copy, empty) { | ||
for (var key in base.prototype) { | ||
if (!key.startsWith('__') && key !== 'to' + name && base.prototype.hasOwnProperty(key)) { | ||
if (!key.startsWith('__') && !key.startsWith('to') && unwrappedMethods.indexOf(key) === -1 && base.prototype.hasOwnProperty(key)) { | ||
(function () { | ||
@@ -60,0 +61,0 @@ var _originalMethod = base.prototype[key]; |
{ | ||
"name": "extendable-immutable", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"main": "lib/index.js", | ||
@@ -5,0 +5,0 @@ "jsnext:main": "es/index.js", |
import invariant from 'invariant' | ||
const emptySymbol = Symbol('empty') | ||
const unwrappedMethods = [ | ||
'get', | ||
'getIn', | ||
'first', | ||
'last', | ||
'getIn', | ||
'reduce', | ||
'reduceRight', | ||
'find', | ||
'findLast', | ||
'findEntry', | ||
'findLastEntry', | ||
'max', | ||
'maxBy', | ||
'min', | ||
'minBy' | ||
] | ||
@@ -34,3 +51,4 @@ export default function createExtendable(base, copy, empty) { | ||
!key.startsWith('__') && | ||
key !== `to${name}` && | ||
!key.startsWith('to') && | ||
unwrappedMethods.indexOf(key) === -1 && | ||
base.prototype.hasOwnProperty(key) | ||
@@ -37,0 +55,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
29203
471