@storm-software/linting-tools
Version:
⚡ A package containing various linting tools used to validate syntax, enforce design standards, and format code in a Storm workspace.
34 lines (21 loc) • 1.82 kB
JavaScript
;Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
var _chunkVG5X6OBLcjs = require('./chunk-VG5X6OBL.cjs');
var _chunk6B2W5NCRcjs = require('./chunk-6B2W5NCR.cjs');
// ../../node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/index.mjs
_chunk6B2W5NCRcjs.init_cjs_shims.call(void 0, );
// ../../node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/crypto/node/index.mjs
_chunk6B2W5NCRcjs.init_cjs_shims.call(void 0, );
var _crypto = require('crypto');
var e = _optionalChain([globalThis, 'access', _ => _.process, 'optionalAccess', _2 => _2.getBuiltinModule, 'optionalCall', _3 => _3("crypto"), 'optionalAccess', _4 => _4.hash]);
var r = "sha256";
var s = "base64url";
function digest(t) {
if (e) return e(r, t, s);
const o = _crypto.createHash.call(void 0, r).update(t);
return _optionalChain([globalThis, 'access', _5 => _5.process, 'optionalAccess', _6 => _6.versions, 'optionalAccess', _7 => _7.webcontainer]) ? o.digest().toString(s) : o.digest(s);
}
// ../../node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/index.mjs
function hash(input) {
return digest(_chunkVG5X6OBLcjs.serialize.call(void 0, input));
}
exports.digest = digest; exports.hash = hash; exports.isEqual = _chunkVG5X6OBLcjs.isEqual; exports.serialize = _chunkVG5X6OBLcjs.serialize;