@yiuayiu/functions 0.0.1-1

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.
@@ -0,0 +1,9 @@
1
+ /// <reference types="node" />
2
+ import crypto from "crypto";
3
+ export declare function sha1(string: crypto.BinaryLike): string;
4
+ export declare function md5(string: crypto.BinaryLike): string;
5
+ declare const _default: {
6
+ sha1: typeof sha1;
7
+ md5: typeof md5;
8
+ };
9
+ export default _default;
@@ -0,0 +1,8 @@
1
+ import crypto from "crypto";
2
+ export function sha1(string) {
3
+ return crypto.createHash("sha1").update(string).digest("hex");
4
+ }
5
+ export function md5(string) {
6
+ return crypto.createHash("md5").update(string).digest("hex");
7
+ }
8
+ export default { sha1, md5 };
package/package.json ADDED
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "@yiuayiu/functions",
3
+ "version": "0.0.1-1",
4
+ "description": "",
5
+ "main": "dist/functions.js",
6
+ "type": "module",
7
+ "keywords": [],
8
+ "author": "AYiU <npm@ayiu.net>",
9
+ "license": "ISC",
10
+ "publishConfig": {
11
+ "access": "public"
12
+ },
13
+ "devDependencies": {
14
+ "@types/node": "^20.2.3"
15
+ },
16
+ "scripts": {
17
+ "test": "echo \"Error: no test specified\" && exit 1"
18
+ }
19
+ }