fa4be69d1abedf0730ee31d94a28f6d03a68e37cc25508eb768b59aa43a332ab62abd28d931804ea987b917dcea8f57787de6f07022a3b955487d30b9fbccb 704 B

1234567891011121314
  1. "use strict";
  2. // When writing files on Windows, translate the characters to their
  3. // 0xf000 higher-encoded versions.
  4. Object.defineProperty(exports, "__esModule", { value: true });
  5. exports.decode = exports.encode = void 0;
  6. const raw = ['|', '<', '>', '?', ':'];
  7. const win = raw.map(char => String.fromCharCode(0xf000 + char.charCodeAt(0)));
  8. const toWin = new Map(raw.map((char, i) => [char, win[i]]));
  9. const toRaw = new Map(win.map((char, i) => [char, raw[i]]));
  10. const encode = (s) => raw.reduce((s, c) => s.split(c).join(toWin.get(c)), s);
  11. exports.encode = encode;
  12. const decode = (s) => win.reduce((s, c) => s.split(c).join(toRaw.get(c)), s);
  13. exports.decode = decode;
  14. //# sourceMappingURL=winchars.js.map