@universe/util
Advanced tools
Comparing version 0.1.0 to 0.2.0
@@ -38,2 +38,3 @@ export declare const isNull: (v: unknown) => v is null; | ||
} | ||
export declare const $: <E extends HTMLElement = HTMLElement>(s: string) => DomUtils<E>; | ||
export interface JsonArray extends Array<string | number | boolean | null | Date | Json | JsonArray> { | ||
@@ -44,6 +45,7 @@ } | ||
} | ||
export declare const NIL_UUID = "00000000-0000-0000-0000-000000000000"; | ||
export declare const isUuid: (v: unknown) => v is string; | ||
export declare const uuid: () => string; | ||
export declare const $: <E extends HTMLElement = HTMLElement>(s: string) => DomUtils<E>; | ||
export declare const GET: <O>(url: string, headers?: {}) => Promise<O>; | ||
export declare const POST: (url: string, data?: Json, headers?: {}) => Promise<Response>; | ||
export declare const POST: <O>(url: string, data?: Json, headers?: {}) => Promise<O>; | ||
export declare const debounce: <F extends (...args: any) => any>(func: F, timeout: number) => (this: ThisParameterType<F>, ...args: Parameters<F>) => Promise<ReturnType<F>>; | ||
@@ -60,1 +62,2 @@ export declare const abbrNum: (num: number, fixed?: number | undefined) => string | null; | ||
export declare function lineCount(filePath: string): Promise<number>; | ||
export declare function md5(s: string): string; |
@@ -12,3 +12,4 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.lineCount = exports.maxDate = exports.idToHue = exports.toCamelCase = exports.toPascalCase = exports.toTitleCase = exports.toKebabCase = exports.toSnakeCase = exports.sha256Digest = exports.abbrNum = exports.debounce = exports.POST = exports.GET = exports.$ = exports.uuid = exports.DomUtils = exports.assertNever = exports.noop = exports.isArrayOrNull = exports.isArray = exports.isObjectOrNull = exports.isObject = exports.isDateOrNull = exports.isDate = exports.isNumberOrNull = exports.isNumber = exports.isBooleanOrNull = exports.isBoolean = exports.isStringOrNull = exports.isString = exports.isNull = void 0; | ||
exports.md5 = exports.lineCount = exports.maxDate = exports.idToHue = exports.toCamelCase = exports.toPascalCase = exports.toTitleCase = exports.toKebabCase = exports.toSnakeCase = exports.sha256Digest = exports.abbrNum = exports.debounce = exports.POST = exports.GET = exports.uuid = exports.isUuid = exports.NIL_UUID = exports.$ = exports.DomUtils = exports.assertNever = exports.noop = exports.isArrayOrNull = exports.isArray = exports.isObjectOrNull = exports.isObject = exports.isDateOrNull = exports.isDate = exports.isNumberOrNull = exports.isNumber = exports.isBooleanOrNull = exports.isBoolean = exports.isStringOrNull = exports.isString = exports.isNull = void 0; | ||
// Generics type checking utils. | ||
exports.isNull = (v) => v === null; | ||
@@ -30,2 +31,3 @@ exports.isString = (v) => typeof v === 'string'; | ||
exports.assertNever = (message) => { throw new Error(message); }; | ||
// Itty bitty jquery clone | ||
class DomUtils { | ||
@@ -69,6 +71,9 @@ constructor(s) { this.s = Array.from(document.querySelectorAll(s)); } | ||
exports.DomUtils = DomUtils; | ||
exports.$ = (s) => new DomUtils(s); | ||
// https://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript | ||
const rand = typeof window === 'object' ? window.crypto.getRandomValues.bind(window.crypto) : require('crypto').randomFillSync; | ||
const uuidValidator = /^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i; | ||
exports.NIL_UUID = '00000000-0000-0000-0000-000000000000'; | ||
exports.isUuid = (v) => exports.isString(v) && (v === exports.NIL_UUID || uuidValidator.test(v)); | ||
exports.uuid = () => ('' + 1e7 + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, c => (+c ^ rand(new Uint8Array(1))[0] & 15 >> +c / 4).toString(16)); | ||
exports.$ = (s) => new DomUtils(s); | ||
exports.GET = (url, headers = {}) => window.fetch(url, { method: 'GET', headers }).then((res) => __awaiter(void 0, void 0, void 0, function* () { return (yield res.json()); })); | ||
@@ -79,3 +84,3 @@ exports.POST = (url, data = {}, headers = {}) => window.fetch(url, { | ||
body: JSON.stringify(data), | ||
}); | ||
}).then((res) => __awaiter(void 0, void 0, void 0, function* () { return (yield res.json()); })); | ||
/* eslint-disable-next-line @typescript-eslint/no-explicit-any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nN0IGlzTnVtYmVyID0gKHY6IHVua25vd24pOiB2IGlzIG51bWJlciA9PiB0eXBlb2YgdiA9PT0gJ251bWJlcic7XG5leHBvcnQgY29uc3QgaXNOdW1iZXJPck51bGwgPSAodjogdW5rbm93bik6IHYgaXMgbnVtYmVyIHwgbnVsbCA9PiBpc051bWJlcih2KSB8fCBpc051bGwodik7XG5leHBvcnQgY29uc3QgaXNEYXRlID0gKHY6IHVua25vd24pOiB2IGlzIERhdGUgPT4gdiBpbnN0YW5jZW9mIERhdGU7XG5leHBvcnQgY29uc3QgaXNEYXRlT3JOdWxsID0gKHY6IHVua25vd24pOiB2IGlzIERhdGUgfCBudWxsID0+IGlzRGF0ZSh2KSB8fCBpc051bGwodik7XG5leHBvcnQgY29uc3QgaXNPYmplY3QgPSAobzogdW5rbm93bik6IG8gaXMgb2JqZWN0ID0+IG8gJiYgdHlwZW9mIG8gPT09ICdvYmplY3QnO1xuZXhwb3J0IGNvbnN0IGlzT2JqZWN0T3JOdWxsID0gKG86IHVua25vd24pOiBvIGlzIG9iamVjdCA9PiBpc09iamVjdChvKSB8fCBpc051bGwobyk7XG5leHBvcnQgY29uc3QgaXNBcnJheSA9IEFycmF5LmlzQXJyYXk7XG5leHBvcnQgY29uc3QgaXNBcnJheU9yTnVsbCA9IChhOiB1bmtub3duKTogYSBpcyB1bmtub3duW10gPT4gaXNBcnJheShhKSB8fCBpc051bGwoYSk7XG5cbi8qIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tZW1wdHktZnVuY3Rpb24sIEB0eXBlc2NyaXB0LWVzbGludC9uby1leHBsaWNpdC1hbnkgKi9cbmV4cG9ydCBjb25zdCBub29wID0gKC4uLl86IGFueVtdKTogdm9pZCA9PiB7fTtcbmV4cG9ydCBjb25zdCBhc3NlcnROZXZlciA9IChtZXNzYWdlOiBzdHJpbmcpOiBuZXZlciA9PiB7IHRocm93IG5ldyBFcnJvcihtZXNzYWdlKTs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W5kJywgZnVuY3Rpb24oKSB7XG4gICAgICAgIHJlc29sdmUobGluZUNvdW50KTtcbiAgICAgIH0pO1xuICB9KTtcbn1cbiJdfQ== | ||
// https://gist.github.com/MichaelPote/3f0cefaaa9578d7e30be | ||
// http://www.myersdaily.org/joseph/javascript/md5-text.html | ||
const HEX_CHR = '0123456789abcdef'; | ||
const cc = (a, n) => a.charCodeAt(n); | ||
const rhex = (n) => [0, 8, 16, 24].map(j => HEX_CHR[(n >> (j + 4)) & 0x0F] + HEX_CHR[(n >> j) & 0x0F]).join(''); | ||
const cmn = (q, a, b, x, s, t, c = ((a + q) >> 0) + ((x + t) >> 0)) => ((((c >> 0) << s) | (c >> 0) >>> (32 - s)) + b) >> 0; | ||
const ff = (a, b, c, d, x, s, t) => cmn((b & c) | ((~b) & d), a, b, x, s, t); | ||
const gg = (a, b, c, d, x, s, t) => cmn((b & d) | (c & (~d)), a, b, x, s, t); | ||
const hh = (a, b, c, d, x, s, t) => cmn(b ^ c ^ d, a, b, x, s, t); | ||
const ii = (a, b, c, d, x, s, t) => cmn(c ^ (b | (~d)), a, b, x, s, t); | ||
function md5cycle(x, k) { | ||
let [a, b, c, d] = x; | ||
a = ff(a, b, c, d, k[0], 7, -680876936); | ||
d = ff(d, a, b, c, k[1], 12, -389564586); | ||
c = ff(c, d, a, b, k[2], 17, 606105819); | ||
b = ff(b, c, d, a, k[3], 22, -1044525330); | ||
a = ff(a, b, c, d, k[4], 7, -176418897); | ||
d = ff(d, a, b, c, k[5], 12, 1200080426); | ||
c = ff(c, d, a, b, k[6], 17, -1473231341); | ||
b = ff(b, c, d, a, k[7], 22, -45705983); | ||
a = ff(a, b, c, d, k[8], 7, 1770035416); | ||
d = ff(d, a, b, c, k[9], 12, -1958414417); | ||
c = ff(c, d, a, b, k[10], 17, -42063); | ||
b = ff(b, c, d, a, k[11], 22, -1990404162); | ||
a = ff(a, b, c, d, k[12], 7, 1804603682); | ||
d = ff(d, a, b, c, k[13], 12, -40341101); | ||
c = ff(c, d, a, b, k[14], 17, -1502002290); | ||
b = ff(b, c, d, a, k[15], 22, 1236535329); | ||
a = gg(a, b, c, d, k[1], 5, -165796510); | ||
d = gg(d, a, b, c, k[6], 9, -1069501632); | ||
c = gg(c, d, a, b, k[11], 14, 643717713); | ||
b = gg(b, c, d, a, k[0], 20, -373897302); | ||
a = gg(a, b, c, d, k[5], 5, -701558691); | ||
d = gg(d, a, b, c, k[10], 9, 38016083); | ||
c = gg(c, d, a, b, k[15], 14, -660478335); | ||
b = gg(b, c, d, a, k[4], 20, -405537848); | ||
a = gg(a, b, c, d, k[9], 5, 568446438); | ||
d = gg(d, a, b, c, k[14], 9, -1019803690); | ||
c = gg(c, d, a, b, k[3], 14, -187363961); | ||
b = gg(b, c, d, a, k[8], 20, 1163531501); | ||
a = gg(a, b, c, d, k[13], 5, -1444681467); | ||
d = gg(d, a, b, c, k[2], 9, -51403784); | ||
c = gg(c, d, a, b, k[7], 14, 1735328473); | ||
b = gg(b, c, d, a, k[12], 20, -1926607734); | ||
a = hh(a, b, c, d, k[5], 4, -378558); | ||
d = hh(d, a, b, c, k[8], 11, -2022574463); | ||
c = hh(c, d, a, b, k[11], 16, 1839030562); | ||
b = hh(b, c, d, a, k[14], 23, -35309556); | ||
a = hh(a, b, c, d, k[1], 4, -1530992060); | ||
d = hh(d, a, b, c, k[4], 11, 1272893353); | ||
c = hh(c, d, a, b, k[7], 16, -155497632); | ||
b = hh(b, c, d, a, k[10], 23, -1094730640); | ||
a = hh(a, b, c, d, k[13], 4, 681279174); | ||
d = hh(d, a, b, c, k[0], 11, -358537222); | ||
c = hh(c, d, a, b, k[3], 16, -722521979); | ||
b = hh(b, c, d, a, k[6], 23, 76029189); | ||
a = hh(a, b, c, d, k[9], 4, -640364487); | ||
d = hh(d, a, b, c, k[12], 11, -421815835); | ||
c = hh(c, d, a, b, k[15], 16, 530742520); | ||
b = hh(b, c, d, a, k[2], 23, -995338651); | ||
a = ii(a, b, c, d, k[0], 6, -198630844); | ||
d = ii(d, a, b, c, k[7], 10, 1126891415); | ||
c = ii(c, d, a, b, k[14], 15, -1416354905); | ||
b = ii(b, c, d, a, k[5], 21, -57434055); | ||
a = ii(a, b, c, d, k[12], 6, 1700485571); | ||
d = ii(d, a, b, c, k[3], 10, -1894986606); | ||
c = ii(c, d, a, b, k[10], 15, -1051523); | ||
b = ii(b, c, d, a, k[1], 21, -2054922799); | ||
a = ii(a, b, c, d, k[8], 6, 1873313359); | ||
d = ii(d, a, b, c, k[15], 10, -30611744); | ||
c = ii(c, d, a, b, k[6], 15, -1560198380); | ||
b = ii(b, c, d, a, k[13], 21, 1309151649); | ||
a = ii(a, b, c, d, k[4], 6, -145523070); | ||
d = ii(d, a, b, c, k[11], 10, -1120210379); | ||
c = ii(c, d, a, b, k[2], 15, 718787259); | ||
b = ii(b, c, d, a, k[9], 21, -343485551); | ||
x[0] = (a + x[0]) >> 0; | ||
x[1] = (b + x[1]) >> 0; | ||
x[2] = (c + x[2]) >> 0; | ||
x[3] = (d + x[3]) >> 0; | ||
return x; | ||
} | ||
function md5(s) { | ||
const n = s.length; | ||
const state = [1732584193, -271733879, -1732584194, 271733878]; | ||
const tail = new Array(16).fill(0); | ||
const fit = ((n / 64) | 0) * 64; | ||
for (let i = 0; i <= n - 64; i += 64) { | ||
md5cycle(state, tail.map((_, j) => cc(s, j * 4 + i) + (cc(s, j * 4 + i + 1) << 8) + (cc(s, j * 4 + i + 2) << 16) + (cc(s, j * 4 + i + 3) << 24))); | ||
} | ||
for (let i = 0; i < n - fit; i++) { | ||
tail[i >> 2] |= cc(s, i + fit) << ((i % 4) << 3); | ||
} | ||
tail[(n - fit) >> 2] |= 0x80 << (((n - fit) % 4) << 3); | ||
(n - fit) > 55 && md5cycle(state, tail.fill(0)); | ||
tail[14] = n * 8; | ||
return md5cycle(state, tail).map(rhex).join(''); | ||
} | ||
exports.md5 = md5; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5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ykgPDwgMjQpKSk7XG4gIH1cbiAgZm9yIChsZXQgaSA9IDA7IGkgPCBuIC0gZml0OyBpKyspIHtcbiAgICB0YWlsW2kgPj4gMl0gfD0gY2MocywgaSArIGZpdCkgPDwgKChpICUgNCkgPDwgMyk7XG4gIH1cbiAgdGFpbFsobiAtIGZpdCkgPj4gMl0gfD0gMHg4MCA8PCAoKChuIC0gZml0KSAlIDQpIDw8IDMpO1xuICAobiAtIGZpdCkgPiA1NSAmJiBtZDVjeWNsZShzdGF0ZSwgdGFpbC5maWxsKDApKTtcbiAgdGFpbFsxNF0gPSBuICogODtcbiAgcmV0dXJuIG1kNWN5Y2xlKHN0YXRlLCB0YWlsKS5tYXAocmhleCkuam9pbignJyk7XG59XG4iXX0= |
"use strict"; | ||
/* global describe, it */ | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
@@ -13,2 +12,5 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/* global describe, it */ | ||
const fs = require("fs"); | ||
const path = require("path"); | ||
const index_1 = require("../src/index"); | ||
@@ -43,4 +45,9 @@ const assert = require("assert"); | ||
}); | ||
it('runs md5', function () { | ||
assert.strictEqual(index_1.md5('hello'), '5d41402abc4b2a76b9719d911017c592'); | ||
assert.strictEqual(index_1.md5('0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'), 'c1906fa4ec71ebdc02c49c5d19908a39'); | ||
assert.strictEqual(index_1.md5(fs.readFileSync(path.join(__dirname, '../../fixtures/share.jpg'), 'binary')), '7b55446ad872973c5db5006905cc92aa'); | ||
}); | ||
}); | ||
}); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90ZXN0L2luZGV4LnRzIl0sIm5hbWVzIjp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cnN0ID49IDEwMDApO1xuICAgICAgYXNzZXJ0LnN0cmljdEVxdWFsKGNvdW50LCAxKTtcbiAgICB9KTtcbiAgICBpdCgncnVucyBtZDUnLCBmdW5jdGlvbigpIHtcbiAgICAgIGFzc2VydC5zdHJpY3RFcXVhbChtZDUoJ2hlbGxvJyksICc1ZDQxNDAyYWJjNGIyYTc2Yjk3MTlkOTExMDE3YzU5MicpO1xuICAgICAgYXNzZXJ0LnN0cmljdEVxdWFsKG1kNSgnMDEyMzQ1Njc4OWFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6QUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVowMTIzNDU2Nzg5JyksICdjMTkwNmZhNGVjNzFlYmRjMDJjNDljNWQxOTkwOGEzOScpO1xuICAgICAgYXNzZXJ0LnN0cmljdEVxdWFsKG1kNShmcy5yZWFkRmlsZVN5bmMocGF0aC5qb2luKF9fZGlybmFtZSwgJy4uLy4uL2ZpeHR1cmVzL3NoYXJlLmpwZycpLCAnYmluYXJ5JykpLCAnN2I1NTQ0NmFkODcyOTczYzVkYjUwMDY5MDVjYzkyYWEnKTtcbiAgICB9KTtcbiAgfSk7XG59KTtcbiJdfQ== |
{ | ||
"name": "@universe/util", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"main": "dist/src/index.js", | ||
@@ -5,0 +5,0 @@ "description": "Universe development utilities.", |
112
src/index.ts
@@ -0,1 +1,2 @@ | ||
// Generics type checking utils. | ||
export const isNull = (v: unknown): v is null => v === null; | ||
@@ -19,2 +20,3 @@ export const isString = (v: unknown): v is string => typeof v === 'string'; | ||
// Itty bitty jquery clone | ||
export class DomUtils<E extends HTMLElement> { | ||
@@ -42,2 +44,3 @@ private s: E[]; | ||
} | ||
export const $ = <E extends HTMLElement = HTMLElement>(s: string) => new DomUtils<E>(s); | ||
@@ -50,11 +53,13 @@ /* eslint-disable-next-line @typescript-eslint/no-empty-interface */ | ||
const rand = typeof window === 'object' ? window.crypto.getRandomValues.bind(window.crypto) : require('crypto').randomFillSync; | ||
const uuidValidator = /^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i; | ||
export const NIL_UUID = '00000000-0000-0000-0000-000000000000'; | ||
export const isUuid = (v: unknown): v is string => isString(v) && (v === NIL_UUID || uuidValidator.test(v)); | ||
export const uuid = () => ('' + 1e7 + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, c => (+c ^ rand(new Uint8Array(1))[0] & 15 >> +c / 4).toString(16)); | ||
export const $ = <E extends HTMLElement = HTMLElement>(s: string) => new DomUtils<E>(s); | ||
export const GET = <O>(url: string, headers = {}): Promise<O> => window.fetch(url, { method: 'GET', headers }).then(async(res) => ((await res.json()) as O)); | ||
export const POST = (url: string, data: Json = {}, headers = {}): Promise<Response> => window.fetch(url, { | ||
export const POST = <O>(url: string, data: Json = {}, headers = {}): Promise<O> => window.fetch(url, { | ||
method: 'POST', | ||
headers: { Accept: 'application/json, text/plain, */*', 'Content-Type': 'application/json', ...headers }, | ||
body: JSON.stringify(data), | ||
}); | ||
}).then(async(res) => ((await res.json()) as O)); | ||
@@ -134,1 +139,102 @@ /* eslint-disable-next-line @typescript-eslint/no-explicit-any */ | ||
} | ||
// https://gist.github.com/MichaelPote/3f0cefaaa9578d7e30be | ||
// http://www.myersdaily.org/joseph/javascript/md5-text.html | ||
const HEX_CHR = '0123456789abcdef'; | ||
const cc = (a: string, n: number) => a.charCodeAt(n); | ||
const rhex = (n: number): string => [ 0, 8, 16, 24 ].map(j => HEX_CHR[(n >> (j + 4)) & 0x0F] + HEX_CHR[(n >> j) & 0x0F]).join(''); | ||
const cmn = (q: number, a: number, b: number, x: number, s: number, t: number, c = ((a + q) >> 0) + ((x + t) >> 0)) => ((((c >> 0) << s) | (c >> 0) >>> (32 - s)) + b) >> 0; | ||
const ff = (a: number, b: number, c: number, d: number, x: number, s: number, t: number) => cmn((b & c) | ((~b) & d), a, b, x, s, t); | ||
const gg = (a: number, b: number, c: number, d: number, x: number, s: number, t: number) => cmn((b & d) | (c & (~d)), a, b, x, s, t); | ||
const hh = (a: number, b: number, c: number, d: number, x: number, s: number, t: number) => cmn(b ^ c ^ d, a, b, x, s, t); | ||
const ii = (a: number, b: number, c: number, d: number, x: number, s: number, t: number) => cmn(c ^ (b | (~d)), a, b, x, s, t); | ||
function md5cycle(x: number[], k: number[]) { | ||
let [ a, b, c, d ] = x; | ||
a = ff(a, b, c, d, k[0], 7, -680876936); | ||
d = ff(d, a, b, c, k[1], 12, -389564586); | ||
c = ff(c, d, a, b, k[2], 17, 606105819); | ||
b = ff(b, c, d, a, k[3], 22, -1044525330); | ||
a = ff(a, b, c, d, k[4], 7, -176418897); | ||
d = ff(d, a, b, c, k[5], 12, 1200080426); | ||
c = ff(c, d, a, b, k[6], 17, -1473231341); | ||
b = ff(b, c, d, a, k[7], 22, -45705983); | ||
a = ff(a, b, c, d, k[8], 7, 1770035416); | ||
d = ff(d, a, b, c, k[9], 12, -1958414417); | ||
c = ff(c, d, a, b, k[10], 17, -42063); | ||
b = ff(b, c, d, a, k[11], 22, -1990404162); | ||
a = ff(a, b, c, d, k[12], 7, 1804603682); | ||
d = ff(d, a, b, c, k[13], 12, -40341101); | ||
c = ff(c, d, a, b, k[14], 17, -1502002290); | ||
b = ff(b, c, d, a, k[15], 22, 1236535329); | ||
a = gg(a, b, c, d, k[1], 5, -165796510); | ||
d = gg(d, a, b, c, k[6], 9, -1069501632); | ||
c = gg(c, d, a, b, k[11], 14, 643717713); | ||
b = gg(b, c, d, a, k[0], 20, -373897302); | ||
a = gg(a, b, c, d, k[5], 5, -701558691); | ||
d = gg(d, a, b, c, k[10], 9, 38016083); | ||
c = gg(c, d, a, b, k[15], 14, -660478335); | ||
b = gg(b, c, d, a, k[4], 20, -405537848); | ||
a = gg(a, b, c, d, k[9], 5, 568446438); | ||
d = gg(d, a, b, c, k[14], 9, -1019803690); | ||
c = gg(c, d, a, b, k[3], 14, -187363961); | ||
b = gg(b, c, d, a, k[8], 20, 1163531501); | ||
a = gg(a, b, c, d, k[13], 5, -1444681467); | ||
d = gg(d, a, b, c, k[2], 9, -51403784); | ||
c = gg(c, d, a, b, k[7], 14, 1735328473); | ||
b = gg(b, c, d, a, k[12], 20, -1926607734); | ||
a = hh(a, b, c, d, k[5], 4, -378558); | ||
d = hh(d, a, b, c, k[8], 11, -2022574463); | ||
c = hh(c, d, a, b, k[11], 16, 1839030562); | ||
b = hh(b, c, d, a, k[14], 23, -35309556); | ||
a = hh(a, b, c, d, k[1], 4, -1530992060); | ||
d = hh(d, a, b, c, k[4], 11, 1272893353); | ||
c = hh(c, d, a, b, k[7], 16, -155497632); | ||
b = hh(b, c, d, a, k[10], 23, -1094730640); | ||
a = hh(a, b, c, d, k[13], 4, 681279174); | ||
d = hh(d, a, b, c, k[0], 11, -358537222); | ||
c = hh(c, d, a, b, k[3], 16, -722521979); | ||
b = hh(b, c, d, a, k[6], 23, 76029189); | ||
a = hh(a, b, c, d, k[9], 4, -640364487); | ||
d = hh(d, a, b, c, k[12], 11, -421815835); | ||
c = hh(c, d, a, b, k[15], 16, 530742520); | ||
b = hh(b, c, d, a, k[2], 23, -995338651); | ||
a = ii(a, b, c, d, k[0], 6, -198630844); | ||
d = ii(d, a, b, c, k[7], 10, 1126891415); | ||
c = ii(c, d, a, b, k[14], 15, -1416354905); | ||
b = ii(b, c, d, a, k[5], 21, -57434055); | ||
a = ii(a, b, c, d, k[12], 6, 1700485571); | ||
d = ii(d, a, b, c, k[3], 10, -1894986606); | ||
c = ii(c, d, a, b, k[10], 15, -1051523); | ||
b = ii(b, c, d, a, k[1], 21, -2054922799); | ||
a = ii(a, b, c, d, k[8], 6, 1873313359); | ||
d = ii(d, a, b, c, k[15], 10, -30611744); | ||
c = ii(c, d, a, b, k[6], 15, -1560198380); | ||
b = ii(b, c, d, a, k[13], 21, 1309151649); | ||
a = ii(a, b, c, d, k[4], 6, -145523070); | ||
d = ii(d, a, b, c, k[11], 10, -1120210379); | ||
c = ii(c, d, a, b, k[2], 15, 718787259); | ||
b = ii(b, c, d, a, k[9], 21, -343485551); | ||
x[0] = (a + x[0]) >> 0; | ||
x[1] = (b + x[1]) >> 0; | ||
x[2] = (c + x[2]) >> 0; | ||
x[3] = (d + x[3]) >> 0; | ||
return x; | ||
} | ||
export function md5(s: string): string { | ||
const n = s.length; | ||
const state = [ 1732584193, -271733879, -1732584194, 271733878 ]; | ||
const tail = new Array(16).fill(0); | ||
const fit = ((n / 64) | 0) * 64; | ||
for (let i = 0; i <= n - 64; i += 64) { | ||
md5cycle(state, tail.map((_, j) => cc(s, j * 4 + i) + (cc(s, j * 4 + i + 1) << 8) + (cc(s, j * 4 + i + 2) << 16) + (cc(s, j * 4 + i + 3) << 24))); | ||
} | ||
for (let i = 0; i < n - fit; i++) { | ||
tail[i >> 2] |= cc(s, i + fit) << ((i % 4) << 3); | ||
} | ||
tail[(n - fit) >> 2] |= 0x80 << (((n - fit) % 4) << 3); | ||
(n - fit) > 55 && md5cycle(state, tail.fill(0)); | ||
tail[14] = n * 8; | ||
return md5cycle(state, tail).map(rhex).join(''); | ||
} |
/* global describe, it */ | ||
import * as fs from 'fs'; | ||
import * as path from 'path'; | ||
import { debounce } from '../src/index'; | ||
import { debounce, md5 } from '../src/index'; | ||
@@ -30,3 +32,8 @@ import * as assert from 'assert'; | ||
}); | ||
it('runs md5', function() { | ||
assert.strictEqual(md5('hello'), '5d41402abc4b2a76b9719d911017c592'); | ||
assert.strictEqual(md5('0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'), 'c1906fa4ec71ebdc02c49c5d19908a39'); | ||
assert.strictEqual(md5(fs.readFileSync(path.join(__dirname, '../../fixtures/share.jpg'), 'binary')), '7b55446ad872973c5db5006905cc92aa'); | ||
}); | ||
}); | ||
}); |
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
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
AI-detected possible typosquat
Supply chain riskAI has identified this package as a potential typosquat of a more popular package. This suggests that the package may be intentionally mimicking another package's name, description, or other metadata.
Found 1 instance in 1 package
376678
10
641
3