@bbn/bbn 1.0.155 → 1.0.156
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.
- package/dist/bbn.js +7 -0
- package/dist/bbn.js.map +1 -1
- package/dist/fn/type/isSame.js +6 -0
- package/package.json +4 -1
package/dist/fn/type/isSame.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { hash } from '../string/hash.js';
|
|
2
2
|
import { each } from '../loop/each.js';
|
|
3
|
+
import { analyzeFunction } from '../misc/analyzeFunction.js';
|
|
3
4
|
/**
|
|
4
5
|
* Checks whether the data contained in the given objects is identical.
|
|
5
6
|
*
|
|
@@ -67,6 +68,11 @@ var isSame = function (obj1, obj2, done) {
|
|
|
67
68
|
});
|
|
68
69
|
return ok_1;
|
|
69
70
|
}
|
|
71
|
+
else if (obj1 && obj2 && typeof obj1 === 'function' && typeof obj2 === 'function') {
|
|
72
|
+
var tmp1 = analyzeFunction(obj1);
|
|
73
|
+
var tmp2 = analyzeFunction(obj2);
|
|
74
|
+
return tmp1.hash === tmp2.hash;
|
|
75
|
+
}
|
|
70
76
|
return false;
|
|
71
77
|
};
|
|
72
78
|
export { isSame };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bbn/bbn",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.156",
|
|
4
4
|
"description": "Javascript toolkit",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -48,5 +48,8 @@
|
|
|
48
48
|
"repository": {
|
|
49
49
|
"type": "git",
|
|
50
50
|
"url": "git@github.com:nabab/bbn-js.git"
|
|
51
|
+
},
|
|
52
|
+
"engines": {
|
|
53
|
+
"node": ">=16.0.0"
|
|
51
54
|
}
|
|
52
55
|
}
|