Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
props,
state,
} = instance;
if (typeof actionCreators === 'function' && (!pure || !areOwnPropsEqual(props, nextProps))) {
instance.actionCreators = getActionCreators(actionCreators, __store.dispatch, nextProps);
}
if (!pure) {
return true;
}
return (
!areOwnPropsEqual(props, nextProps)
|| !areStatesEqual(state, nextState)
|| !shallowEqual(context, nextContext)
|| !areMergedPropsEqual(
// eslint workaround
mergeProps(state, wrappedActionCreators, props),
mergeProps(nextState, instance.actionCreators, nextProps)
)
);
};
'nil',
'number',
'promise',
'string',
'symbol',
'undef',
'weakmap',
'weakset',
];
const newObject = copy(object);
console.log(object, newObject);
console.log('is equal object', sameValueZeroEqual(object, newObject));
console.log('is shallowEqual object', shallowEqual(object, newObject));
console.log('is deepEqual object', deepEqual(object, newObject));
console.log('lodash copy', _.cloneDeep(object));
console.log('clone copy', clone(object));
console.log('deepclone copy', deepClone(object));
Object.keys(object).forEach((key) => {
console.group(key);
console.log(`new object has key ${key}`, Object.prototype.hasOwnProperty.call(newObject, key));
if (~primitiveKeys.indexOf(key)) {
console.log(`is ${key} equal`, sameValueZeroEqual(object[key], newObject[key]));
} else {
console.log(`is ${key} not equal`, !sameValueZeroEqual(object[key], newObject[key]));
console.log(`is ${key} equivalent`, deepEqual(object[key], newObject[key]));
console.log(
updateEditorSelection() {
if (this._settingBrowserSelection) return this._settingBrowserSelection = false;
const range = getSelection(this);
this._settingEditorSelection = true;
this.editor.setSelection(range);
this._settingEditorSelection = false;
if (!shallowEqual(range, this.editor.selection)) this.updateBrowserSelection();
}