@allmaps/id
Advanced tools
Comparing version 1.0.0-beta.26 to 1.0.0-beta.27
@@ -5,3 +5,3 @@ /** | ||
* @param {string} str - Input string. | ||
* @param {number} [length=16] - Length of returned hash. The maximum length of the hash is 40 characters. | ||
* @param {number} [length] - Length of returned hash. The maximum length of the hash is 40 characters. The default length is 16. | ||
* @returns {Promise<string>} First `length` characters of the SHA-1 hash of `str`. | ||
@@ -14,3 +14,3 @@ */ | ||
* @async | ||
* @param {number} [length=16] - Length of returned hash. The maximum length of the hash is 40 characters. | ||
* @param {number} [length] - Length of returned hash. The maximum length of the hash is 40 characters. | ||
* @returns {Promise<string>} First `length` characters of the SHA-1 hash of a random UUID. | ||
@@ -24,5 +24,5 @@ */ | ||
* @param {Object} obj - JSON object. | ||
* @param {number} [length=16] - Length of returned hash. The maximum length of the hash is 40 characters. | ||
* @param {number} [length] Length of returned hash. The maximum length of the hash is 40 characters. | ||
* @returns {Promise<string>} First `length` characters of the SHA-1 hash of sorted and serialized version of `obj`. | ||
*/ | ||
export declare function generateChecksum(obj: unknown, length?: number): Promise<string>; |
@@ -20,3 +20,3 @@ import serialize from './checksum.js'; | ||
* @param {string} str - Input string. | ||
* @param {number} [length=16] - Length of returned hash. The maximum length of the hash is 40 characters. | ||
* @param {number} [length] - Length of returned hash. The maximum length of the hash is 40 characters. The default length is 16. | ||
* @returns {Promise<string>} First `length` characters of the SHA-1 hash of `str`. | ||
@@ -32,3 +32,3 @@ */ | ||
* @async | ||
* @param {number} [length=16] - Length of returned hash. The maximum length of the hash is 40 characters. | ||
* @param {number} [length] - Length of returned hash. The maximum length of the hash is 40 characters. | ||
* @returns {Promise<string>} First `length` characters of the SHA-1 hash of a random UUID. | ||
@@ -46,3 +46,3 @@ */ | ||
* @param {Object} obj - JSON object. | ||
* @param {number} [length=16] - Length of returned hash. The maximum length of the hash is 40 characters. | ||
* @param {number} [length] Length of returned hash. The maximum length of the hash is 40 characters. | ||
* @returns {Promise<string>} First `length` characters of the SHA-1 hash of sorted and serialized version of `obj`. | ||
@@ -49,0 +49,0 @@ */ |
{ | ||
"name": "@allmaps/id", | ||
"version": "1.0.0-beta.26", | ||
"version": "1.0.0-beta.27", | ||
"description": "IDs for Allmaps", | ||
@@ -54,11 +54,12 @@ "type": "module", | ||
"dependencies": { | ||
"@allmaps/types": "^1.0.0-beta.12" | ||
"@allmaps/types": "^1.0.0-beta.13" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^20.8.0", | ||
"@typescript-eslint/eslint-plugin": "^5.45.0", | ||
"@typescript-eslint/parser": "^5.45.0", | ||
"@types/eslint": "^8.56.0", | ||
"@typescript-eslint/eslint-plugin": "^7.0.0", | ||
"@typescript-eslint/parser": "^7.0.0", | ||
"chai": "^4.3.6", | ||
"documentation": "^14.0.0", | ||
"eslint": "^8.35.0", | ||
"eslint": "^8.56.0", | ||
"eslint-config-prettier": "^9.1.0", | ||
"mocha": "^8.4.0", | ||
@@ -71,3 +72,3 @@ "prettier": "^2.8.0", | ||
}, | ||
"gitHead": "60322ac9345b16940b25ae912e0a3aeb69c6af9e" | ||
"gitHead": "2cd1595a894c77557a492e61371508d615d9f6b8" | ||
} |
@@ -86,3 +86,3 @@ # @allmaps/id | ||
* `str` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Input string. | ||
* `length` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Length of returned hash. The maximum length of the hash is 40 characters. (optional, default `16`) | ||
* `length` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Length of returned hash. The maximum length of the hash is 40 characters. The default length is 16. (optional, default `16`) | ||
@@ -97,3 +97,3 @@ Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** First `length` characters of the SHA-1 hash of `str`. | ||
* `length` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Length of returned hash. The maximum length of the hash is 40 characters. (optional, default `16`) | ||
* `length` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Length of returned hash. The maximum length of the hash is 40 characters. | ||
@@ -109,4 +109,4 @@ Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** First `length` characters of the SHA-1 hash of a random UUID. | ||
* `obj` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** JSON object. | ||
* `length` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Length of returned hash. The maximum length of the hash is 40 characters. (optional, default `16`) | ||
* `length` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Length of returned hash. The maximum length of the hash is 40 characters. | ||
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** First `length` characters of the SHA-1 hash of sorted and serialized version of `obj`. |
10223
10