Files
formipay/node_modules/shallow-clone
dwindown e8fbfb14c1 fix: prevent asset conflicts between React and Grid.js versions
Add coexistence checks to all enqueue methods to prevent loading
both React and Grid.js assets simultaneously.

Changes:
- ReactAdmin.php: Only enqueue React assets when ?react=1
- Init.php: Skip Grid.js when React active on admin pages
- Form.php, Coupon.php, Access.php: Restore classic assets when ?react=0
- Customer.php, Product.php, License.php: Add coexistence checks

Now the toggle between Classic and React versions works correctly.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 17:02:14 +07:00
..

shallow-clone NPM version

Make a shallow clone of an object, array or primitive.

Install

Install with npm

$ npm i shallow-clone --save

Usage

var clone = require('shallow-clone');

shallow clones arrays

The array itself is cloned, but not the elements of the array. So any objects in the array will still not be cloned (e.g. they will be the same object as in the orginal array).

var arr = [{ 'a': 0 }, { 'b': 1 }]
var foo = clone(arr);
// foo =>  [{ 'a': 0 }, { 'b': 1 }]

// array is cloned
assert.equal(actual === expected, false);

// array elements are not
assert.deepEqual(actual[0], expected[0]); // true

returns primitives as-is

clone(0)
//=> 0

clone('foo')
//=> 'foo'

shallow clone a regex

clone(/foo/g)
//=> /foo/g

shallow clone an object

clone({a: 1, b: 2, c: 3 })
//=> {a: 1, b: 2, c: 3 }
  • assign-deep: Deeply assign the enumerable properties of source objects to a destination object.
  • clone-deep: Recursively (deep) clone JavaScript native types, like Object, Array, RegExp, Date as well as primitives.
  • extend-shallow: Extend an object with the properties of additional objects. node.js/javascript util.
  • is-plain-object: Returns true if an object was created by the Object constructor.
  • mixin-object: Mixin the own and inherited properties of other objects onto the first object. Pass an… more
  • mixin-deep: Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone.

Running tests

Install dev dependencies:

$ npm i -d && npm test

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue

Author

Jon Schlinkert

License

Copyright © 2015 Jon Schlinkert Released under the MIT license.


This file was generated by verb-cli on August 10, 2015.