util.js 457 B

12345678910111213
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.hashToLocation = void 0;
  4. const hashToLocation = (hash) => {
  5. if (hash.length < 20)
  6. throw new TypeError('Hash is too short');
  7. const lastTwo = hash.slice(-2);
  8. const twoBeforeLastTwo = hash.slice(-4, -2);
  9. const folder = [lastTwo, twoBeforeLastTwo];
  10. return [folder, hash];
  11. };
  12. exports.hashToLocation = hashToLocation;
  13. //# sourceMappingURL=util.js.map