* chore: add oxlint support * style: apply autofix * style: apply autofix for toSorted * style: use alternative api for nsfw-flag jsPlugins * fix: git diff * fix: codeql * test: console.log * style: update lint workflow to use Checkstyle SARIF converter * style: remove debug log from extractDateFromURL function * chore: use oxlint-json-to-sarif * test: console.log * test: remove console.log * test: update cookie data expectation in getCookies test https://github.com/mccutchen/go-httpbin/pull/235 breaks this * style: type-aware linting * style: enable type-aware linting for oxlint
17 lines
466 B
TypeScript
17 lines
466 B
TypeScript
/* eslint-disable unicorn/prefer-code-point */
|
|
import { inflateSync } from 'node:zlib';
|
|
|
|
const unzip = (b64Data) => {
|
|
const strData = Buffer.from(b64Data, 'base64').toString('binary');
|
|
const charData = [...strData].map((x) => x.charCodeAt(0));
|
|
const binData = new Uint8Array(charData);
|
|
const data = inflateSync(binData);
|
|
let ret = '';
|
|
for (const c of data) {
|
|
ret += String.fromCharCode(c);
|
|
}
|
|
return ret;
|
|
};
|
|
|
|
export { unzip };
|