@bee.js/node 0.0.44 → 0.0.45

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bee.js/node",
3
- "version": "0.0.44",
3
+ "version": "0.0.45",
4
4
  "description": "A JavaScript framework for making Node.js API´s",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/tools/guid.js CHANGED
@@ -1,15 +1,15 @@
1
- const uuid = require('uuid')
1
+ const uuid = require("uuid");
2
2
 
3
3
  module.exports = {
4
- guid: function(fn, param) {
5
- return fn
6
- ? uuid[fn](param)
7
- : uuid.v4()
8
- },
9
-
10
- guidToBin: function(param) {
11
- return typeof(param) == "string" && param.length == 36 //&& uuid.validate(param)
12
- ? "0x" + param.replace(/-/g,'')
13
- : param
14
- },
15
- }
4
+ uuid: uuid.v4,
5
+
6
+ guid: function (fn, param) {
7
+ return fn ? uuid[fn](param) : uuid.v4();
8
+ },
9
+
10
+ guidToBin: function (param) {
11
+ return typeof param == "string" && param.length == 36
12
+ ? "0x" + param.replace(/-/g, "")
13
+ : param;
14
+ },
15
+ };
package/tools/hash.js CHANGED
@@ -1,5 +1,5 @@
1
- import sha256 from "crypto-js/sha256";
2
- import md5 from "crypto-js/md5";
1
+ const sha256 = require("crypto-js/sha256");
2
+ const md5 = require("crypto-js/md5");
3
3
 
4
4
  module.exports = {
5
5
  md5,