@textile/threads-id
Advanced tools
Comparing version 0.5.0 to 0.5.1
@@ -1560,2 +1560,3 @@ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; | ||
// Build the character lookup table: | ||
/** @type {Record<string, number>} */ | ||
const codes = {}; | ||
@@ -1750,2 +1751,3 @@ for (let i = 0; i < alphabet.length; ++i) { | ||
/** @typedef {import("./types").BaseCode} BaseCode */ | ||
/** @typedef {import("./types").BaseName} BaseName */ | ||
@@ -1854,6 +1856,6 @@ /** | ||
function encoding (nameOrCode) { | ||
if (constants_1.names[nameOrCode]) { | ||
return constants_1.names[nameOrCode] | ||
} else if (constants_1.codes[nameOrCode]) { | ||
return constants_1.codes[nameOrCode] | ||
if (constants_1.names[/** @type {BaseName} */(nameOrCode)]) { | ||
return constants_1.names[/** @type {BaseName} */(nameOrCode)] | ||
} else if (constants_1.codes[/** @type {BaseCode} */(nameOrCode)]) { | ||
return constants_1.codes[/** @type {BaseCode} */(nameOrCode)] | ||
} else { | ||
@@ -1860,0 +1862,0 @@ throw new Error(`Unsupported encoding: ${nameOrCode}`) |
{ | ||
"name": "@textile/threads-id", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"main": "dist/cjs/index.js", | ||
@@ -21,3 +21,3 @@ "types": "dist/cjs/index.d.ts", | ||
}, | ||
"repository": "github:textileio/js-threads", | ||
"repository": "github:textileio/js-textile", | ||
"dependencies": { | ||
@@ -28,3 +28,3 @@ "@consento/sync-randombytes": "^1.0.4", | ||
}, | ||
"gitHead": "50581c7fddd9b3c40377ff78665d64980cc83d25" | ||
"gitHead": "9968376dfc216bb447bd9582159c773c2ee0119a" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
87586
2375