@mongez/reinforcements 1.0.18 → 1.0.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,5 @@
1
+ /**
2
+ * Make a deep copy for the given object and its nested objects as well
3
+ */
1
4
  export default function clone(object: any): any;
2
5
  //# sourceMappingURL=objClone.d.ts.map
@@ -1,9 +1,12 @@
1
1
  'use strict';
2
2
 
3
- var immutable = require('immutable');
3
+ var Immutable = require('Immutable');
4
4
 
5
+ /**
6
+ * Make a deep copy for the given object and its nested objects as well
7
+ */
5
8
  function clone(object) {
6
- return immutable.mergeDeep({}, object);
9
+ return Immutable.fromJS(object).toJS();
7
10
  }
8
11
 
9
12
  module.exports = clone;
@@ -1,2 +1,5 @@
1
+ /**
2
+ * Make a deep copy for the given object and its nested objects as well
3
+ */
1
4
  export default function clone(object: any): any;
2
5
  //# sourceMappingURL=objClone.d.ts.map
@@ -1,7 +1,10 @@
1
- import { mergeDeep } from 'immutable';
1
+ import { fromJS } from 'Immutable';
2
2
 
3
+ /**
4
+ * Make a deep copy for the given object and its nested objects as well
5
+ */
3
6
  function clone(object) {
4
- return mergeDeep({}, object);
7
+ return fromJS(object).toJS();
5
8
  }
6
9
 
7
10
  export { clone as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mongez/reinforcements",
3
- "version": "1.0.18",
3
+ "version": "1.0.19",
4
4
  "description": "A lightweight package to give a massive reinforcements to variant types of data in Nodejs/Javascript",
5
5
  "main": "./cjs/index.js",
6
6
  "dependencies": {