commit
This commit is contained in:
parent
be4fd23bcf
commit
0bd53741af
728 changed files with 86573 additions and 0 deletions
44
node_modules/unraw/dist/errors.d.ts
generated
vendored
Normal file
44
node_modules/unraw/dist/errors.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,44 @@
|
|||
/**
|
||||
* @file **unraw - errors.ts** | Error messages used by `unraw`.
|
||||
* @author Ian Sanders
|
||||
* @copyright 2019 Ian Sanders
|
||||
* @license MIT
|
||||
*/
|
||||
/**
|
||||
* Keys for possible error messages used by `unraw`.
|
||||
* Note: These do _not_ map to actual error object types. All errors thrown
|
||||
* are `SyntaxError`.
|
||||
*/
|
||||
export declare enum ErrorType {
|
||||
/**
|
||||
* Thrown when a badly formed Unicode escape sequence is found. Possible
|
||||
* reasons include the code being too short (`"\u25"`) or having invalid
|
||||
* characters (`"\u2$A5"`).
|
||||
*/
|
||||
MalformedUnicode = "MALFORMED_UNICODE",
|
||||
/**
|
||||
* Thrown when a badly formed hexadecimal escape sequence is found. Possible
|
||||
* reasons include the code being too short (`"\x2"`) or having invalid
|
||||
* characters (`"\x2$"`).
|
||||
*/
|
||||
MalformedHexadecimal = "MALFORMED_HEXADECIMAL",
|
||||
/**
|
||||
* Thrown when a Unicode code point escape sequence has too high of a code
|
||||
* point. The maximum code point allowed is `\u{10FFFF}`, so `\u{110000}` and
|
||||
* higher will throw this error.
|
||||
*/
|
||||
CodePointLimit = "CODE_POINT_LIMIT",
|
||||
/**
|
||||
* Thrown when an octal escape sequences is encountered and `allowOctals` is
|
||||
* `false`. For example, `unraw("\234", false)`.
|
||||
*/
|
||||
OctalDeprecation = "OCTAL_DEPRECATION",
|
||||
/**
|
||||
* Thrown only when a single backslash is found at the end of a string. For
|
||||
* example, `"\\"` or `"test\\x24\\"`.
|
||||
*/
|
||||
EndOfString = "END_OF_STRING"
|
||||
}
|
||||
/** Map of error message names to the full text of the message. */
|
||||
export declare const errorMessages: Readonly<Map<ErrorType, string>>;
|
||||
//# sourceMappingURL=errors.d.ts.map
|
1
node_modules/unraw/dist/errors.d.ts.map
generated
vendored
Normal file
1
node_modules/unraw/dist/errors.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH;;;;GAIG;AAEH,oBAAY,SAAS;IACnB;;;;OAIG;IACH,gBAAgB,sBAAsB;IACtC;;;;OAIG;IACH,oBAAoB,0BAA0B;IAC9C;;;;OAIG;IACH,cAAc,qBAAqB;IACnC;;;OAGG;IACH,gBAAgB,sBAAsB;IACtC;;;OAGG;IACH,WAAW,kBAAkB;CAC9B;AAED,kEAAkE;AAClE,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,GAAG,CAAC,SAAS,EAAE,MAAM,CAAC,CAgBzD,CAAC"}
|
66
node_modules/unraw/dist/errors.js
generated
vendored
Normal file
66
node_modules/unraw/dist/errors.js
generated
vendored
Normal file
|
@ -0,0 +1,66 @@
|
|||
"use strict";
|
||||
/**
|
||||
* @file **unraw - errors.ts** | Error messages used by `unraw`.
|
||||
* @author Ian Sanders
|
||||
* @copyright 2019 Ian Sanders
|
||||
* @license MIT
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
// NOTE: don't construct errors here or they'll have the wrong stack trace.
|
||||
// NOTE: don't make custom error class; the JS engines use `SyntaxError`
|
||||
/**
|
||||
* Keys for possible error messages used by `unraw`.
|
||||
* Note: These do _not_ map to actual error object types. All errors thrown
|
||||
* are `SyntaxError`.
|
||||
*/
|
||||
// Don't use const enum or JS users won't be able to access the enum values
|
||||
var ErrorType;
|
||||
(function (ErrorType) {
|
||||
/**
|
||||
* Thrown when a badly formed Unicode escape sequence is found. Possible
|
||||
* reasons include the code being too short (`"\u25"`) or having invalid
|
||||
* characters (`"\u2$A5"`).
|
||||
*/
|
||||
ErrorType["MalformedUnicode"] = "MALFORMED_UNICODE";
|
||||
/**
|
||||
* Thrown when a badly formed hexadecimal escape sequence is found. Possible
|
||||
* reasons include the code being too short (`"\x2"`) or having invalid
|
||||
* characters (`"\x2$"`).
|
||||
*/
|
||||
ErrorType["MalformedHexadecimal"] = "MALFORMED_HEXADECIMAL";
|
||||
/**
|
||||
* Thrown when a Unicode code point escape sequence has too high of a code
|
||||
* point. The maximum code point allowed is `\u{10FFFF}`, so `\u{110000}` and
|
||||
* higher will throw this error.
|
||||
*/
|
||||
ErrorType["CodePointLimit"] = "CODE_POINT_LIMIT";
|
||||
/**
|
||||
* Thrown when an octal escape sequences is encountered and `allowOctals` is
|
||||
* `false`. For example, `unraw("\234", false)`.
|
||||
*/
|
||||
ErrorType["OctalDeprecation"] = "OCTAL_DEPRECATION";
|
||||
/**
|
||||
* Thrown only when a single backslash is found at the end of a string. For
|
||||
* example, `"\\"` or `"test\\x24\\"`.
|
||||
*/
|
||||
ErrorType["EndOfString"] = "END_OF_STRING";
|
||||
})(ErrorType = exports.ErrorType || (exports.ErrorType = {}));
|
||||
/** Map of error message names to the full text of the message. */
|
||||
exports.errorMessages = new Map([
|
||||
[ErrorType.MalformedUnicode, "malformed Unicode character escape sequence"],
|
||||
[
|
||||
ErrorType.MalformedHexadecimal,
|
||||
"malformed hexadecimal character escape sequence"
|
||||
],
|
||||
[
|
||||
ErrorType.CodePointLimit,
|
||||
"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"
|
||||
],
|
||||
[
|
||||
ErrorType.OctalDeprecation,
|
||||
'"0"-prefixed octal literals and octal escape sequences are deprecated; ' +
|
||||
'for octal literals use the "0o" prefix instead'
|
||||
],
|
||||
[ErrorType.EndOfString, "malformed escape sequence at end of string"]
|
||||
]);
|
||||
//# sourceMappingURL=errors.js.map
|
1
node_modules/unraw/dist/errors.js.map
generated
vendored
Normal file
1
node_modules/unraw/dist/errors.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAEH,2EAA2E;AAC3E,wEAAwE;AAExE;;;;GAIG;AACH,2EAA2E;AAC3E,IAAY,SA6BX;AA7BD,WAAY,SAAS;IACnB;;;;OAIG;IACH,mDAAsC,CAAA;IACtC;;;;OAIG;IACH,2DAA8C,CAAA;IAC9C;;;;OAIG;IACH,gDAAmC,CAAA;IACnC;;;OAGG;IACH,mDAAsC,CAAA;IACtC;;;OAGG;IACH,0CAA6B,CAAA;AAC/B,CAAC,EA7BW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QA6BpB;AAED,kEAAkE;AACrD,QAAA,aAAa,GAAqC,IAAI,GAAG,CAAC;IACrE,CAAC,SAAS,CAAC,gBAAgB,EAAE,6CAA6C,CAAC;IAC3E;QACE,SAAS,CAAC,oBAAoB;QAC9B,iDAAiD;KAClD;IACD;QACE,SAAS,CAAC,cAAc;QACxB,wEAAwE;KACzE;IACD;QACE,SAAS,CAAC,gBAAgB;QAC1B,yEAAyE;YACvE,gDAAgD;KACnD;IACD,CAAC,SAAS,CAAC,WAAW,EAAE,4CAA4C,CAAC;CACtE,CAAC,CAAC"}
|
1
node_modules/unraw/dist/errors.min.js
generated
vendored
Normal file
1
node_modules/unraw/dist/errors.min.js
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
"use strict";var ErrorType;Object.defineProperty(exports,"__esModule",{value:!0}),function(e){e.MalformedUnicode="MALFORMED_UNICODE",e.MalformedHexadecimal="MALFORMED_HEXADECIMAL",e.CodePointLimit="CODE_POINT_LIMIT",e.OctalDeprecation="OCTAL_DEPRECATION",e.EndOfString="END_OF_STRING"}(ErrorType=exports.ErrorType||(exports.ErrorType={})),exports.errorMessages=new Map([[ErrorType.MalformedUnicode,"malformed Unicode character escape sequence"],[ErrorType.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[ErrorType.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[ErrorType.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[ErrorType.EndOfString,"malformed escape sequence at end of string"]]);
|
21
node_modules/unraw/dist/index.d.ts
generated
vendored
Normal file
21
node_modules/unraw/dist/index.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
/**
|
||||
* @file **unraw** | Convert raw escape sequences to their respective characters
|
||||
* (undo `String.raw`).
|
||||
* @author Ian Sanders
|
||||
* @copyright 2019 Ian Sanders
|
||||
* @license MIT
|
||||
*/
|
||||
import { ErrorType, errorMessages } from "./errors";
|
||||
export { ErrorType, errorMessages };
|
||||
/**
|
||||
* Replace raw escape character strings with their escape characters.
|
||||
* @param raw A string where escape characters are represented as raw string
|
||||
* values like `\'` rather than `'`.
|
||||
* @param allowOctals If `true`, will process the now-deprecated octal escape
|
||||
* sequences (ie, `\111`).
|
||||
* @returns The processed string, with escape characters replaced by their
|
||||
* respective actual Unicode characters.
|
||||
*/
|
||||
export declare function unraw(raw: string, allowOctals?: boolean): string;
|
||||
export default unraw;
|
||||
//# sourceMappingURL=index.d.ts.map
|
1
node_modules/unraw/dist/index.d.ts.map
generated
vendored
Normal file
1
node_modules/unraw/dist/index.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAC,SAAS,EAAE,aAAa,EAAC,MAAM,UAAU,CAAC;AAClD,OAAO,EAAC,SAAS,EAAE,aAAa,EAAC,CAAC;AAwLlC;;;;;;;;GAQG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,WAAW,UAAQ,GAAG,MAAM,CAwC9D;AACD,eAAe,KAAK,CAAC"}
|
196
node_modules/unraw/dist/index.js
generated
vendored
Normal file
196
node_modules/unraw/dist/index.js
generated
vendored
Normal file
|
@ -0,0 +1,196 @@
|
|||
"use strict";
|
||||
/**
|
||||
* @file **unraw** | Convert raw escape sequences to their respective characters
|
||||
* (undo `String.raw`).
|
||||
* @author Ian Sanders
|
||||
* @copyright 2019 Ian Sanders
|
||||
* @license MIT
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const errors_1 = require("./errors");
|
||||
exports.ErrorType = errors_1.ErrorType;
|
||||
exports.errorMessages = errors_1.errorMessages;
|
||||
/**
|
||||
* Parse a string as a base-16 number. This is more strict than `parseInt` as it
|
||||
* will not allow any other characters, including (for example) "+", "-", and
|
||||
* ".".
|
||||
* @param hex A string containing a hexadecimal number.
|
||||
* @returns The parsed integer, or `NaN` if the string is not a valid hex
|
||||
* number.
|
||||
*/
|
||||
function parseHexToInt(hex) {
|
||||
const isOnlyHexChars = !hex.match(/[^a-f0-9]/i);
|
||||
return isOnlyHexChars ? parseInt(hex, 16) : NaN;
|
||||
}
|
||||
/**
|
||||
* Check the validity and length of a hexadecimal code and optionally enforces
|
||||
* a specific number of hex digits.
|
||||
* @param hex The string to validate and parse.
|
||||
* @param errorName The name of the error message to throw a `SyntaxError` with
|
||||
* if `hex` is invalid. This is used to index `errorMessages`.
|
||||
* @param enforcedLength If provided, will throw an error if `hex` is not
|
||||
* exactly this many characters.
|
||||
* @returns The parsed hex number as a normal number.
|
||||
* @throws {SyntaxError} If the code is not valid.
|
||||
*/
|
||||
function validateAndParseHex(hex, errorName, enforcedLength) {
|
||||
const parsedHex = parseHexToInt(hex);
|
||||
if (Number.isNaN(parsedHex) ||
|
||||
(enforcedLength !== undefined && enforcedLength !== hex.length)) {
|
||||
throw new SyntaxError(errors_1.errorMessages.get(errorName));
|
||||
}
|
||||
return parsedHex;
|
||||
}
|
||||
/**
|
||||
* Parse a two-digit hexadecimal character escape code.
|
||||
* @param code The two-digit hexadecimal number that represents the character to
|
||||
* output.
|
||||
* @returns The single character represented by the code.
|
||||
* @throws {SyntaxError} If the code is not valid hex or is not the right
|
||||
* length.
|
||||
*/
|
||||
function parseHexadecimalCode(code) {
|
||||
const parsedCode = validateAndParseHex(code, errors_1.ErrorType.MalformedHexadecimal, 2);
|
||||
return String.fromCharCode(parsedCode);
|
||||
}
|
||||
/**
|
||||
* Parse a four-digit Unicode character escape code.
|
||||
* @param code The four-digit unicode number that represents the character to
|
||||
* output.
|
||||
* @param surrogateCode Optional four-digit unicode surrogate that represents
|
||||
* the other half of the character to output.
|
||||
* @returns The single character represented by the code.
|
||||
* @throws {SyntaxError} If the codes are not valid hex or are not the right
|
||||
* length.
|
||||
*/
|
||||
function parseUnicodeCode(code, surrogateCode) {
|
||||
const parsedCode = validateAndParseHex(code, errors_1.ErrorType.MalformedUnicode, 4);
|
||||
if (surrogateCode !== undefined) {
|
||||
const parsedSurrogateCode = validateAndParseHex(surrogateCode, errors_1.ErrorType.MalformedUnicode, 4);
|
||||
return String.fromCharCode(parsedCode, parsedSurrogateCode);
|
||||
}
|
||||
return String.fromCharCode(parsedCode);
|
||||
}
|
||||
/**
|
||||
* Test if the text is surrounded by curly braces (`{}`).
|
||||
* @param text Text to check.
|
||||
* @returns `true` if the text is in the form `{*}`.
|
||||
*/
|
||||
function isCurlyBraced(text) {
|
||||
return text.charAt(0) === "{" && text.charAt(text.length - 1) === "}";
|
||||
}
|
||||
/**
|
||||
* Parse a Unicode code point character escape code.
|
||||
* @param codePoint A unicode escape code point, including the surrounding curly
|
||||
* braces.
|
||||
* @returns The single character represented by the code.
|
||||
* @throws {SyntaxError} If the code is not valid hex or does not have the
|
||||
* surrounding curly braces.
|
||||
*/
|
||||
function parseUnicodeCodePointCode(codePoint) {
|
||||
if (!isCurlyBraced(codePoint)) {
|
||||
throw new SyntaxError(errors_1.errorMessages.get(errors_1.ErrorType.MalformedUnicode));
|
||||
}
|
||||
const withoutBraces = codePoint.slice(1, -1);
|
||||
const parsedCode = validateAndParseHex(withoutBraces, errors_1.ErrorType.MalformedUnicode);
|
||||
try {
|
||||
return String.fromCodePoint(parsedCode);
|
||||
}
|
||||
catch (err) {
|
||||
throw err instanceof RangeError
|
||||
? new SyntaxError(errors_1.errorMessages.get(errors_1.ErrorType.CodePointLimit))
|
||||
: err;
|
||||
}
|
||||
}
|
||||
// Have to give overload that takes boolean for when compiler doesn't know if
|
||||
// true or false
|
||||
function parseOctalCode(code, error = false) {
|
||||
if (error) {
|
||||
throw new SyntaxError(errors_1.errorMessages.get(errors_1.ErrorType.OctalDeprecation));
|
||||
}
|
||||
// The original regex only allows digits so we don't need to have a strict
|
||||
// octal parser like hexToInt. Length is not enforced for octals.
|
||||
const parsedCode = parseInt(code, 8);
|
||||
return String.fromCharCode(parsedCode);
|
||||
}
|
||||
/**
|
||||
* Map of unescaped letters to their corresponding special JS escape characters.
|
||||
* Intentionally does not include characters that map to themselves like "\'".
|
||||
*/
|
||||
const singleCharacterEscapes = new Map([
|
||||
["b", "\b"],
|
||||
["f", "\f"],
|
||||
["n", "\n"],
|
||||
["r", "\r"],
|
||||
["t", "\t"],
|
||||
["v", "\v"],
|
||||
["0", "\0"]
|
||||
]);
|
||||
/**
|
||||
* Parse a single character escape sequence and return the matching character.
|
||||
* If none is matched, defaults to `code`.
|
||||
* @param code A single character code.
|
||||
*/
|
||||
function parseSingleCharacterCode(code) {
|
||||
return singleCharacterEscapes.get(code) || code;
|
||||
}
|
||||
/**
|
||||
* Matches every escape sequence possible, including invalid ones.
|
||||
*
|
||||
* All capture groups (described below) are unique (only one will match), except
|
||||
* for 4, which can only potentially match if 3 does.
|
||||
*
|
||||
* **Capture Groups:**
|
||||
* 0. A single backslash
|
||||
* 1. Hexadecimal code
|
||||
* 2. Unicode code point code with surrounding curly braces
|
||||
* 3. Unicode escape code with surrogate
|
||||
* 4. Surrogate code
|
||||
* 5. Unicode escape code without surrogate
|
||||
* 6. Octal code _NOTE: includes "0"._
|
||||
* 7. A single character (will never be \, x, u, or 0-3)
|
||||
*/
|
||||
const escapeMatch = /\\(?:(\\)|x([\s\S]{0,2})|u(\{[^}]*\}?)|u([\s\S]{4})\\u([^{][\s\S]{0,3})|u([\s\S]{0,4})|([0-3]?[0-7]{1,2})|([\s\S])|$)/g;
|
||||
/**
|
||||
* Replace raw escape character strings with their escape characters.
|
||||
* @param raw A string where escape characters are represented as raw string
|
||||
* values like `\'` rather than `'`.
|
||||
* @param allowOctals If `true`, will process the now-deprecated octal escape
|
||||
* sequences (ie, `\111`).
|
||||
* @returns The processed string, with escape characters replaced by their
|
||||
* respective actual Unicode characters.
|
||||
*/
|
||||
function unraw(raw, allowOctals = false) {
|
||||
return raw.replace(escapeMatch, function (_, backslash, hex, codePoint, unicodeWithSurrogate, surrogate, unicode, octal, singleCharacter) {
|
||||
// Compare groups to undefined because empty strings mean different errors
|
||||
// Otherwise, `\u` would fail the same as `\` which is wrong.
|
||||
if (backslash !== undefined) {
|
||||
return "\\";
|
||||
}
|
||||
if (hex !== undefined) {
|
||||
return parseHexadecimalCode(hex);
|
||||
}
|
||||
if (codePoint !== undefined) {
|
||||
return parseUnicodeCodePointCode(codePoint);
|
||||
}
|
||||
if (unicodeWithSurrogate !== undefined) {
|
||||
return parseUnicodeCode(unicodeWithSurrogate, surrogate);
|
||||
}
|
||||
if (unicode !== undefined) {
|
||||
return parseUnicodeCode(unicode);
|
||||
}
|
||||
if (octal === "0") {
|
||||
return "\0";
|
||||
}
|
||||
if (octal !== undefined) {
|
||||
return parseOctalCode(octal, !allowOctals);
|
||||
}
|
||||
if (singleCharacter !== undefined) {
|
||||
return parseSingleCharacterCode(singleCharacter);
|
||||
}
|
||||
throw new SyntaxError(errors_1.errorMessages.get(errors_1.ErrorType.EndOfString));
|
||||
});
|
||||
}
|
||||
exports.unraw = unraw;
|
||||
exports.default = unraw;
|
||||
//# sourceMappingURL=index.js.map
|
1
node_modules/unraw/dist/index.js.map
generated
vendored
Normal file
1
node_modules/unraw/dist/index.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAEH,qCAAkD;AAC1C,oBADA,kBAAS,CACA;AAAE,wBAD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AClC;QACD,IAAI,KAAK,KAAK,GAAG,EAAE;YACjB,OAAO,IAAI,CAAC;SACb;QACD,IAAI,KAAK,KAAK,SAAS,EAAE;YACvB,OAAO,cAAc,CAAC,KAAK,EAAE,CAAC,WAAW,CAAC,CAAC;SAC5C;QACD,IAAI,eAAe,KAAK,SAAS,EAAE;YACjC,OAAO,wBAAwB,CAAC,eAAe,CAAC,CAAC;SAClD;QACD,MAAM,IAAI,WAAW,CAAC,sBAAa,CAAC,GAAG,CAAC,kBAAS,CAAC,WAAW,CAAC,CAAC,CAAC;IAClE,CAAC,CAAC,CAAC;AACL,CAAC;AAxCD,sBAwCC;AACD,kBAAe,KAAK,CAAC"}
|
1
node_modules/unraw/dist/index.min.js
generated
vendored
Normal file
1
node_modules/unraw/dist/index.min.js
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const errors_1=require("./errors");function parseHexToInt(r){return!r.match(/[^a-f0-9]/i)?parseInt(r,16):NaN}function validateAndParseHex(r,e,o){const n=parseHexToInt(r);if(Number.isNaN(n)||void 0!==o&&o!==r.length)throw new SyntaxError(errors_1.errorMessages.get(e));return n}function parseHexadecimalCode(r){const e=validateAndParseHex(r,errors_1.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(e)}function parseUnicodeCode(r,e){const o=validateAndParseHex(r,errors_1.ErrorType.MalformedUnicode,4);if(void 0!==e){const r=validateAndParseHex(e,errors_1.ErrorType.MalformedUnicode,4);return String.fromCharCode(o,r)}return String.fromCharCode(o)}function isCurlyBraced(r){return"{"===r.charAt(0)&&"}"===r.charAt(r.length-1)}function parseUnicodeCodePointCode(r){if(!isCurlyBraced(r))throw new SyntaxError(errors_1.errorMessages.get(errors_1.ErrorType.MalformedUnicode));const e=validateAndParseHex(r.slice(1,-1),errors_1.ErrorType.MalformedUnicode);try{return String.fromCodePoint(e)}catch(r){throw r instanceof RangeError?new SyntaxError(errors_1.errorMessages.get(errors_1.ErrorType.CodePointLimit)):r}}function parseOctalCode(r,e=!1){if(e)throw new SyntaxError(errors_1.errorMessages.get(errors_1.ErrorType.OctalDeprecation));const o=parseInt(r,8);return String.fromCharCode(o)}exports.ErrorType=errors_1.ErrorType,exports.errorMessages=errors_1.errorMessages;const singleCharacterEscapes=new Map([["b","\b"],["f","\f"],["n","\n"],["r","\r"],["t","\t"],["v","\v"],["0","\0"]]);function parseSingleCharacterCode(r){return singleCharacterEscapes.get(r)||r}const escapeMatch=/\\(?:(\\)|x([\s\S]{0,2})|u(\{[^}]*\}?)|u([\s\S]{4})\\u([^{][\s\S]{0,3})|u([\s\S]{0,4})|([0-3]?[0-7]{1,2})|([\s\S])|$)/g;function unraw(r,e=!1){return r.replace(escapeMatch,function(r,o,n,t,a,s,i,d,c){if(void 0!==o)return"\\";if(void 0!==n)return parseHexadecimalCode(n);if(void 0!==t)return parseUnicodeCodePointCode(t);if(void 0!==a)return parseUnicodeCode(a,s);if(void 0!==i)return parseUnicodeCode(i);if("0"===d)return"\0";if(void 0!==d)return parseOctalCode(d,!e);if(void 0!==c)return parseSingleCharacterCode(c);throw new SyntaxError(errors_1.errorMessages.get(errors_1.ErrorType.EndOfString))})}exports.unraw=unraw,exports.default=unraw;
|
Loading…
Add table
Add a link
Reference in a new issue