@stryke/hash 0.9.6 â 0.10.0
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/README.md +1 -1
- package/dist/hash.d.ts +2 -2
- package/dist/index.cjs +11 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +1 -1
- package/dist/md5.cjs +10 -0
- package/dist/md5.d.ts +8 -0
- package/dist/md5.mjs +1 -0
- package/package.json +9 -3
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ This package is part of Storm Software's **đŠī¸ Stryke** monorepo. Stryke pac
|
|
|
22
22
|
|
|
23
23
|
<h3 align="center">đģ Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
24
24
|
|
|
25
|
-
[](https://prettier.io/) [](http://nx.dev/) [](https://nextjs.org/) [](http://commitizen.github.io/cz-cli/)  [](https://fumadocs.vercel.app/) 
|
|
26
26
|
|
|
27
27
|
> [!IMPORTANT] Important
|
|
28
28
|
> This repository, and the apps, libraries, and tools contained within, is still in it's initial development phase. As a result, bugs and issues are expected with it's usage. When the main development phase completes, a proper release will be performed, the packages will be available through NPM (and other distributions), and this message will be removed. However, in the meantime, please feel free to report any issues you may come across.
|
package/dist/hash.d.ts
CHANGED
|
@@ -9,8 +9,8 @@ export interface HashOptions {
|
|
|
9
9
|
/**
|
|
10
10
|
* Hash any JS value into a string
|
|
11
11
|
*
|
|
12
|
-
* @param
|
|
12
|
+
* @param content - The value to hash
|
|
13
13
|
* @param options - Hashing options
|
|
14
14
|
* @returns A hashed string value
|
|
15
15
|
*/
|
|
16
|
-
export declare function hash(
|
|
16
|
+
export declare function hash(content: any, options?: HashOptions): string;
|
package/dist/index.cjs
CHANGED
|
@@ -25,6 +25,17 @@ Object.keys(_hashFiles).forEach(function (key) {
|
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
27
|
});
|
|
28
|
+
var _md = require("./md5.cjs");
|
|
29
|
+
Object.keys(_md).forEach(function (key) {
|
|
30
|
+
if (key === "default" || key === "__esModule") return;
|
|
31
|
+
if (key in exports && exports[key] === _md[key]) return;
|
|
32
|
+
Object.defineProperty(exports, key, {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () {
|
|
35
|
+
return _md[key];
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
});
|
|
28
39
|
var _sha = require("./sha-256.cjs");
|
|
29
40
|
Object.keys(_sha).forEach(function (key) {
|
|
30
41
|
if (key === "default" || key === "__esModule") return;
|
package/dist/index.d.ts
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export*from"./hash";export*from"./hash-files";export*from"./sha-256";export*from"./xx-hash";
|
|
1
|
+
export*from"./hash";export*from"./hash-files";export*from"./md5";export*from"./sha-256";export*from"./xx-hash";
|
package/dist/md5.cjs
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.md5 = md5;
|
|
7
|
+
var _nodeCrypto = require("node:crypto");
|
|
8
|
+
function md5(e, t = 32) {
|
|
9
|
+
return (0, _nodeCrypto.createHash)("md5").update(e).digest("hex").slice(0, t);
|
|
10
|
+
}
|
package/dist/md5.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generate an MD5 hash of the provided content.
|
|
3
|
+
*
|
|
4
|
+
* @param content - The content to hash.
|
|
5
|
+
* @param length - The length of the hash to return.
|
|
6
|
+
* @returns The generated MD5 hash.
|
|
7
|
+
*/
|
|
8
|
+
export declare function md5(content: string, length?: number): string;
|
package/dist/md5.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createHash as r}from"node:crypto";export function md5(e,t=32){return r("md5").update(e).digest("hex").slice(0,t)}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stryke/hash",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing utility functions that hash data using various algorithms.",
|
|
6
6
|
"repository": {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"js-xxhash": "^4.0.0",
|
|
14
14
|
"ohash": "^2.0.11",
|
|
15
|
-
"@stryke/fs": "^0.
|
|
15
|
+
"@stryke/fs": "^0.22.6"
|
|
16
16
|
},
|
|
17
17
|
"publishConfig": { "access": "public" },
|
|
18
18
|
"devDependencies": {},
|
|
@@ -87,6 +87,11 @@
|
|
|
87
87
|
"default": "./dist/sha-256.mjs"
|
|
88
88
|
}
|
|
89
89
|
},
|
|
90
|
+
"./md5": {
|
|
91
|
+
"import": { "types": "./dist/md5.d.ts", "default": "./dist/md5.mjs" },
|
|
92
|
+
"require": { "types": "./dist/md5.d.ts", "default": "./dist/md5.cjs" },
|
|
93
|
+
"default": { "types": "./dist/md5.d.ts", "default": "./dist/md5.mjs" }
|
|
94
|
+
},
|
|
90
95
|
"./index": {
|
|
91
96
|
"import": { "types": "./dist/index.d.ts", "default": "./dist/index.mjs" },
|
|
92
97
|
"require": {
|
|
@@ -140,5 +145,6 @@
|
|
|
140
145
|
},
|
|
141
146
|
"main": "./dist/index.cjs",
|
|
142
147
|
"module": "./dist/index.mjs",
|
|
143
|
-
"types": "./dist/index.d.ts"
|
|
148
|
+
"types": "./dist/index.d.ts",
|
|
149
|
+
"gitHead": "ea7a3a1d68d4a4361cc04d6f5bf6219a5bc4a2a2"
|
|
144
150
|
}
|