node-ejs-renderer/node_modules/memfs/lib/crud-to-cas/util.js

13 lines
457 B
JavaScript
Raw Permalink Normal View History

2024-06-09 13:55:01 -04:00
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.hashToLocation = void 0;
const hashToLocation = (hash) => {
if (hash.length < 20)
throw new TypeError('Hash is too short');
const lastTwo = hash.slice(-2);
const twoBeforeLastTwo = hash.slice(-4, -2);
const folder = [lastTwo, twoBeforeLastTwo];
return [folder, hash];
};
exports.hashToLocation = hashToLocation;
//# sourceMappingURL=util.js.map