@alwatr/hash-string 5.2.29 → 5.2.30
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/CHANGELOG.md +4 -0
- package/dist/main.cjs +1 -1
- package/dist/main.mjs +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [5.2.30](https://github.com/Alwatr/nanolib/compare/@alwatr/hash-string@5.2.29...@alwatr/hash-string@5.2.30) (2026-03-18)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @alwatr/hash-string
|
|
9
|
+
|
|
6
10
|
## [5.2.29](https://github.com/Alwatr/nanolib/compare/@alwatr/hash-string@5.2.28...@alwatr/hash-string@5.2.29) (2026-03-16)
|
|
7
11
|
|
|
8
12
|
### 🔨 Code Refactoring
|
package/dist/main.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/** 📦 @alwatr/hash-string v5.2.
|
|
1
|
+
/** 📦 @alwatr/hash-string v5.2.30 */
|
|
2
2
|
"use strict";var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __hasOwnProp=Object.prototype.hasOwnProperty;var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:true})};var __copyProps=(to,from,except,desc)=>{if(from&&typeof from==="object"||typeof from==="function"){for(let key of __getOwnPropNames(from))if(!__hasOwnProp.call(to,key)&&key!==except)__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable})}return to};var __toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:true}),mod);var main_exports={};__export(main_exports,{nanoHash:()=>nanoHash});module.exports=__toCommonJS(main_exports);function nanoHash(str,prefix,repeat=1){if(repeat<1){throw new Error("The repeat parameter must be greater than or equal to 1")}let hash1=3735928559;let hash2=1103547991;if(typeof str==="number"){str=str.toString()}const len=str.length;for(let i=0;i<len;i++){const char=str.charCodeAt(i);hash1=Math.imul(hash1^char,2654435761);hash2=Math.imul(hash2^char,1597334677)}hash1=Math.imul(hash1^hash1>>>16,2246822507)^Math.imul(hash2^hash2>>>13,3266489909);hash2=Math.imul(hash2^hash2>>>16,2246822507)^Math.imul(hash1^hash1>>>13,3266489909);const result=prefix+(hash1>>>0).toString(36)+(hash2>>>0).toString(36);if(repeat===1){return result}else{return nanoHash(result,prefix,repeat-1)}}0&&(module.exports={nanoHash});
|
|
3
3
|
//# sourceMappingURL=main.cjs.map
|
package/dist/main.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/** 📦 @alwatr/hash-string v5.2.
|
|
1
|
+
/** 📦 @alwatr/hash-string v5.2.30 */
|
|
2
2
|
function nanoHash(str,prefix,repeat=1){if(repeat<1){throw new Error("The repeat parameter must be greater than or equal to 1")}let hash1=3735928559;let hash2=1103547991;if(typeof str==="number"){str=str.toString()}const len=str.length;for(let i=0;i<len;i++){const char=str.charCodeAt(i);hash1=Math.imul(hash1^char,2654435761);hash2=Math.imul(hash2^char,1597334677)}hash1=Math.imul(hash1^hash1>>>16,2246822507)^Math.imul(hash2^hash2>>>13,3266489909);hash2=Math.imul(hash2^hash2>>>16,2246822507)^Math.imul(hash1^hash1>>>13,3266489909);const result=prefix+(hash1>>>0).toString(36)+(hash2>>>0).toString(36);if(repeat===1){return result}else{return nanoHash(result,prefix,repeat-1)}}export{nanoHash};
|
|
3
3
|
//# sourceMappingURL=main.mjs.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alwatr/hash-string",
|
|
3
3
|
"description": "A simple utility to generate a hash string.",
|
|
4
|
-
"version": "5.2.
|
|
4
|
+
"version": "5.2.30",
|
|
5
5
|
"author": "S. Ali Mihandoost <ali.mihandoost@gmail.com>",
|
|
6
6
|
"bugs": "https://github.com/Alwatr/nanolib/issues",
|
|
7
7
|
"devDependencies": {
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"clean": "rm -rfv dist *.tsbuildinfo",
|
|
65
65
|
"d": "bun run build:es && bun --enable-source-maps --trace-warnings",
|
|
66
66
|
"t": "bun run test",
|
|
67
|
-
"test": "
|
|
67
|
+
"test": "bun test",
|
|
68
68
|
"w": "bun run watch",
|
|
69
69
|
"watch": "bun run watch:ts & bun run watch:es",
|
|
70
70
|
"watch:es": "bun run build:es --watch",
|
|
@@ -73,5 +73,5 @@
|
|
|
73
73
|
"sideEffects": false,
|
|
74
74
|
"type": "module",
|
|
75
75
|
"types": "./dist/main.d.ts",
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "def1decf8f496f4b0d3d3ab952c346c689c30160"
|
|
77
77
|
}
|