@jsonjoy.com/json-pack 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/__demos__/json.js +1 -1
- package/lib/__demos__/json.js.map +1 -1
- package/lib/__demos__/ubjson.js +1 -1
- package/lib/__demos__/ubjson.js.map +1 -1
- package/lib/bencode/BencodeDecoder.d.ts +1 -1
- package/lib/bencode/BencodeDecoder.js +1 -1
- package/lib/bencode/BencodeDecoder.js.map +1 -1
- package/lib/bencode/BencodeEncoder.d.ts +1 -1
- package/lib/bencode/BencodeEncoder.js +2 -2
- package/lib/bencode/BencodeEncoder.js.map +1 -1
- package/lib/bson/BsonEncoder.d.ts +1 -1
- package/lib/cbor/CborDecoder.d.ts +1 -1
- package/lib/cbor/CborDecoderBase.d.ts +2 -2
- package/lib/cbor/CborDecoderBase.js +3 -3
- package/lib/cbor/CborDecoderBase.js.map +1 -1
- package/lib/cbor/CborEncoder.d.ts +1 -1
- package/lib/cbor/CborEncoder.js +1 -1
- package/lib/cbor/CborEncoder.js.map +1 -1
- package/lib/cbor/CborEncoderFast.d.ts +2 -2
- package/lib/cbor/CborEncoderFast.js +1 -1
- package/lib/cbor/CborEncoderFast.js.map +1 -1
- package/lib/cbor/CborEncoderStable.js +2 -2
- package/lib/cbor/CborEncoderStable.js.map +1 -1
- package/lib/cbor/shared.d.ts +2 -2
- package/lib/codecs/Codecs.d.ts +1 -1
- package/lib/codecs/cbor.d.ts +1 -1
- package/lib/codecs/json.d.ts +1 -1
- package/lib/codecs/msgpack.d.ts +1 -1
- package/lib/ion/IonEncoderFast.d.ts +1 -1
- package/lib/ion/IonEncoderFast.js +1 -1
- package/lib/ion/IonEncoderFast.js.map +1 -1
- package/lib/ion/ast.js +1 -1
- package/lib/ion/ast.js.map +1 -1
- package/lib/json/JsonDecoder.d.ts +1 -1
- package/lib/json/JsonDecoder.js +2 -2
- package/lib/json/JsonDecoder.js.map +1 -1
- package/lib/json/JsonEncoder.d.ts +1 -1
- package/lib/json/JsonEncoderStable.js +2 -2
- package/lib/json/JsonEncoderStable.js.map +1 -1
- package/lib/json-binary/codec.js +1 -1
- package/lib/json-binary/codec.js.map +1 -1
- package/lib/json-binary/types.d.ts +1 -1
- package/lib/msgpack/MsgPackDecoder.d.ts +1 -1
- package/lib/msgpack/MsgPackDecoderFast.d.ts +2 -2
- package/lib/msgpack/MsgPackDecoderFast.js +2 -2
- package/lib/msgpack/MsgPackDecoderFast.js.map +1 -1
- package/lib/msgpack/MsgPackEncoder.d.ts +1 -1
- package/lib/msgpack/MsgPackEncoder.js +1 -1
- package/lib/msgpack/MsgPackEncoder.js.map +1 -1
- package/lib/msgpack/MsgPackEncoderFast.d.ts +1 -1
- package/lib/msgpack/MsgPackEncoderFast.js +1 -1
- package/lib/msgpack/MsgPackEncoderFast.js.map +1 -1
- package/lib/msgpack/MsgPackEncoderStable.js +1 -1
- package/lib/msgpack/MsgPackEncoderStable.js.map +1 -1
- package/lib/msgpack/MsgPackToJsonConverter.d.ts +1 -1
- package/lib/msgpack/MsgPackToJsonConverter.js +1 -1
- package/lib/msgpack/MsgPackToJsonConverter.js.map +1 -1
- package/lib/msgpack/shallow-read.js +1 -1
- package/lib/msgpack/shallow-read.js.map +1 -1
- package/lib/msgpack/types.d.ts +1 -1
- package/lib/msgpack/util.d.ts +3 -3
- package/lib/resp/RespDecoder.d.ts +1 -1
- package/lib/resp/RespDecoder.js +2 -2
- package/lib/resp/RespDecoder.js.map +1 -1
- package/lib/resp/RespEncoder.d.ts +2 -2
- package/lib/resp/RespEncoder.js +2 -2
- package/lib/resp/RespEncoder.js.map +1 -1
- package/lib/resp/RespEncoderLegacy.d.ts +1 -1
- package/lib/resp/RespStreamingDecoder.d.ts +1 -1
- package/lib/resp/RespStreamingDecoder.js +1 -1
- package/lib/resp/RespStreamingDecoder.js.map +1 -1
- package/lib/types.d.ts +1 -1
- package/lib/ubjson/UbjsonDecoder.d.ts +1 -1
- package/lib/ubjson/UbjsonDecoder.js +1 -1
- package/lib/ubjson/UbjsonDecoder.js.map +1 -1
- package/lib/ubjson/UbjsonEncoder.d.ts +1 -1
- package/package.json +2 -1
- package/lib/json-brand/index.d.ts +0 -3
- package/lib/json-brand/index.js +0 -5
- package/lib/json-brand/index.js.map +0 -1
- package/lib/json-brand/types.d.ts +0 -10
- package/lib/json-brand/types.js +0 -3
- package/lib/json-brand/types.js.map +0 -1
- package/lib/json-equal/$$deepEqual/index.d.ts +0 -1
- package/lib/json-equal/$$deepEqual/index.js +0 -5
- package/lib/json-equal/$$deepEqual/index.js.map +0 -1
- package/lib/json-equal/$$deepEqual/v1.d.ts +0 -2
- package/lib/json-equal/$$deepEqual/v1.js +0 -52
- package/lib/json-equal/$$deepEqual/v1.js.map +0 -1
- package/lib/json-equal/deepEqual/index.d.ts +0 -1
- package/lib/json-equal/deepEqual/index.js +0 -5
- package/lib/json-equal/deepEqual/index.js.map +0 -1
- package/lib/json-equal/deepEqual/v1.d.ts +0 -1
- package/lib/json-equal/deepEqual/v1.js +0 -34
- package/lib/json-equal/deepEqual/v1.js.map +0 -1
- package/lib/json-equal/deepEqual/v2.d.ts +0 -1
- package/lib/json-equal/deepEqual/v2.js +0 -37
- package/lib/json-equal/deepEqual/v2.js.map +0 -1
- package/lib/json-equal/deepEqual/v3.d.ts +0 -1
- package/lib/json-equal/deepEqual/v3.js +0 -37
- package/lib/json-equal/deepEqual/v3.js.map +0 -1
- package/lib/json-equal/deepEqual/v4.d.ts +0 -1
- package/lib/json-equal/deepEqual/v4.js +0 -34
- package/lib/json-equal/deepEqual/v4.js.map +0 -1
- package/lib/json-random/RandomJson.d.ts +0 -39
- package/lib/json-random/RandomJson.js +0 -267
- package/lib/json-random/RandomJson.js.map +0 -1
- package/lib/json-random/__demos__/json-random.d.ts +0 -1
- package/lib/json-random/__demos__/json-random.js +0 -35
- package/lib/json-random/__demos__/json-random.js.map +0 -1
- package/lib/json-random/index.d.ts +0 -1
- package/lib/json-random/index.js +0 -5
- package/lib/json-random/index.js.map +0 -1
- package/lib/util/Fuzzer.d.ts +0 -13
- package/lib/util/Fuzzer.js +0 -59
- package/lib/util/Fuzzer.js.map +0 -1
- package/lib/util/NullObject.d.ts +0 -1
- package/lib/util/NullObject.js +0 -6
- package/lib/util/NullObject.js.map +0 -1
- package/lib/util/buffers/Reader.d.ts +0 -22
- package/lib/util/buffers/Reader.js +0 -91
- package/lib/util/buffers/Reader.js.map +0 -1
- package/lib/util/buffers/Slice.d.ts +0 -8
- package/lib/util/buffers/Slice.js +0 -16
- package/lib/util/buffers/Slice.js.map +0 -1
- package/lib/util/buffers/StreamingOctetReader.d.ts +0 -18
- package/lib/util/buffers/StreamingOctetReader.js +0 -168
- package/lib/util/buffers/StreamingOctetReader.js.map +0 -1
- package/lib/util/buffers/StreamingReader.d.ts +0 -31
- package/lib/util/buffers/StreamingReader.js +0 -131
- package/lib/util/buffers/StreamingReader.js.map +0 -1
- package/lib/util/buffers/Uint8ArrayCut.d.ts +0 -6
- package/lib/util/buffers/Uint8ArrayCut.js +0 -12
- package/lib/util/buffers/Uint8ArrayCut.js.map +0 -1
- package/lib/util/buffers/Writer.d.ts +0 -33
- package/lib/util/buffers/Writer.js +0 -217
- package/lib/util/buffers/Writer.js.map +0 -1
- package/lib/util/buffers/b.d.ts +0 -1
- package/lib/util/buffers/b.js +0 -6
- package/lib/util/buffers/b.js.map +0 -1
- package/lib/util/buffers/bufferToUint8Array.d.ts +0 -2
- package/lib/util/buffers/bufferToUint8Array.js +0 -6
- package/lib/util/buffers/bufferToUint8Array.js.map +0 -1
- package/lib/util/buffers/cmpUint8Array.d.ts +0 -1
- package/lib/util/buffers/cmpUint8Array.js +0 -14
- package/lib/util/buffers/cmpUint8Array.js.map +0 -1
- package/lib/util/buffers/cmpUint8Array2.d.ts +0 -1
- package/lib/util/buffers/cmpUint8Array2.js +0 -16
- package/lib/util/buffers/cmpUint8Array2.js.map +0 -1
- package/lib/util/buffers/cmpUint8Array3.d.ts +0 -1
- package/lib/util/buffers/cmpUint8Array3.js +0 -18
- package/lib/util/buffers/cmpUint8Array3.js.map +0 -1
- package/lib/util/buffers/concat.d.ts +0 -3
- package/lib/util/buffers/concat.js +0 -36
- package/lib/util/buffers/concat.js.map +0 -1
- package/lib/util/buffers/copy.d.ts +0 -1
- package/lib/util/buffers/copy.js +0 -10
- package/lib/util/buffers/copy.js.map +0 -1
- package/lib/util/buffers/f16.d.ts +0 -1
- package/lib/util/buffers/f16.js +0 -18
- package/lib/util/buffers/f16.js.map +0 -1
- package/lib/util/buffers/index.d.ts +0 -1
- package/lib/util/buffers/index.js +0 -5
- package/lib/util/buffers/index.js.map +0 -1
- package/lib/util/buffers/isArrayBuffer.d.ts +0 -1
- package/lib/util/buffers/isArrayBuffer.js +0 -8
- package/lib/util/buffers/isArrayBuffer.js.map +0 -1
- package/lib/util/buffers/isFloat32.d.ts +0 -1
- package/lib/util/buffers/isFloat32.js +0 -10
- package/lib/util/buffers/isFloat32.js.map +0 -1
- package/lib/util/buffers/isUint8Array.d.ts +0 -1
- package/lib/util/buffers/isUint8Array.js +0 -7
- package/lib/util/buffers/isUint8Array.js.map +0 -1
- package/lib/util/buffers/printOctets.d.ts +0 -1
- package/lib/util/buffers/printOctets.js +0 -23
- package/lib/util/buffers/printOctets.js.map +0 -1
- package/lib/util/buffers/strings.d.ts +0 -6
- package/lib/util/buffers/strings.js +0 -23
- package/lib/util/buffers/strings.js.map +0 -1
- package/lib/util/buffers/toBuf.d.ts +0 -1
- package/lib/util/buffers/toBuf.js +0 -12
- package/lib/util/buffers/toBuf.js.map +0 -1
- package/lib/util/buffers/toUint8Array.d.ts +0 -1
- package/lib/util/buffers/toUint8Array.js +0 -19
- package/lib/util/buffers/toUint8Array.js.map +0 -1
- package/lib/util/buffers/types.d.ts +0 -54
- package/lib/util/buffers/types.js +0 -3
- package/lib/util/buffers/types.js.map +0 -1
- package/lib/util/buffers/utf8/CachedUtf8Decoder.d.ts +0 -7
- package/lib/util/buffers/utf8/CachedUtf8Decoder.js +0 -54
- package/lib/util/buffers/utf8/CachedUtf8Decoder.js.map +0 -1
- package/lib/util/buffers/utf8/decodeAscii.d.ts +0 -2
- package/lib/util/buffers/utf8/decodeAscii.js +0 -163
- package/lib/util/buffers/utf8/decodeAscii.js.map +0 -1
- package/lib/util/buffers/utf8/decodeUtf8/index.d.ts +0 -2
- package/lib/util/buffers/utf8/decodeUtf8/index.js +0 -7
- package/lib/util/buffers/utf8/decodeUtf8/index.js.map +0 -1
- package/lib/util/buffers/utf8/decodeUtf8/v1.d.ts +0 -2
- package/lib/util/buffers/utf8/decodeUtf8/v1.js +0 -46
- package/lib/util/buffers/utf8/decodeUtf8/v1.js.map +0 -1
- package/lib/util/buffers/utf8/decodeUtf8/v10.d.ts +0 -2
- package/lib/util/buffers/utf8/decodeUtf8/v10.js +0 -43
- package/lib/util/buffers/utf8/decodeUtf8/v10.js.map +0 -1
- package/lib/util/buffers/utf8/decodeUtf8/v11.d.ts +0 -2
- package/lib/util/buffers/utf8/decodeUtf8/v11.js +0 -5
- package/lib/util/buffers/utf8/decodeUtf8/v11.js.map +0 -1
- package/lib/util/buffers/utf8/decodeUtf8/v12.d.ts +0 -2
- package/lib/util/buffers/utf8/decodeUtf8/v12.js +0 -7
- package/lib/util/buffers/utf8/decodeUtf8/v12.js.map +0 -1
- package/lib/util/buffers/utf8/decodeUtf8/v13.d.ts +0 -2
- package/lib/util/buffers/utf8/decodeUtf8/v13.js +0 -26
- package/lib/util/buffers/utf8/decodeUtf8/v13.js.map +0 -1
- package/lib/util/buffers/utf8/decodeUtf8/v14.d.ts +0 -2
- package/lib/util/buffers/utf8/decodeUtf8/v14.js +0 -10
- package/lib/util/buffers/utf8/decodeUtf8/v14.js.map +0 -1
- package/lib/util/buffers/utf8/decodeUtf8/v15.d.ts +0 -2
- package/lib/util/buffers/utf8/decodeUtf8/v15.js +0 -18
- package/lib/util/buffers/utf8/decodeUtf8/v15.js.map +0 -1
- package/lib/util/buffers/utf8/decodeUtf8/v16.d.ts +0 -3
- package/lib/util/buffers/utf8/decodeUtf8/v16.js +0 -26
- package/lib/util/buffers/utf8/decodeUtf8/v16.js.map +0 -1
- package/lib/util/buffers/utf8/decodeUtf8/v17.d.ts +0 -2
- package/lib/util/buffers/utf8/decodeUtf8/v17.js +0 -42
- package/lib/util/buffers/utf8/decodeUtf8/v17.js.map +0 -1
- package/lib/util/buffers/utf8/decodeUtf8/v18.d.ts +0 -2
- package/lib/util/buffers/utf8/decodeUtf8/v18.js +0 -41
- package/lib/util/buffers/utf8/decodeUtf8/v18.js.map +0 -1
- package/lib/util/buffers/utf8/decodeUtf8/v19.d.ts +0 -2
- package/lib/util/buffers/utf8/decodeUtf8/v19.js +0 -5
- package/lib/util/buffers/utf8/decodeUtf8/v19.js.map +0 -1
- package/lib/util/buffers/utf8/decodeUtf8/v2.d.ts +0 -2
- package/lib/util/buffers/utf8/decodeUtf8/v2.js +0 -4
- package/lib/util/buffers/utf8/decodeUtf8/v2.js.map +0 -1
- package/lib/util/buffers/utf8/decodeUtf8/v3.d.ts +0 -2
- package/lib/util/buffers/utf8/decodeUtf8/v3.js +0 -6
- package/lib/util/buffers/utf8/decodeUtf8/v3.js.map +0 -1
- package/lib/util/buffers/utf8/decodeUtf8/v4.d.ts +0 -2
- package/lib/util/buffers/utf8/decodeUtf8/v4.js +0 -6
- package/lib/util/buffers/utf8/decodeUtf8/v4.js.map +0 -1
- package/lib/util/buffers/utf8/decodeUtf8/v5.d.ts +0 -2
- package/lib/util/buffers/utf8/decodeUtf8/v5.js +0 -37
- package/lib/util/buffers/utf8/decodeUtf8/v5.js.map +0 -1
- package/lib/util/buffers/utf8/decodeUtf8/v6.d.ts +0 -2
- package/lib/util/buffers/utf8/decodeUtf8/v6.js +0 -8
- package/lib/util/buffers/utf8/decodeUtf8/v6.js.map +0 -1
- package/lib/util/buffers/utf8/decodeUtf8/v7.d.ts +0 -2
- package/lib/util/buffers/utf8/decodeUtf8/v7.js +0 -39
- package/lib/util/buffers/utf8/decodeUtf8/v7.js.map +0 -1
- package/lib/util/buffers/utf8/decodeUtf8/v8.d.ts +0 -2
- package/lib/util/buffers/utf8/decodeUtf8/v8.js +0 -46
- package/lib/util/buffers/utf8/decodeUtf8/v8.js.map +0 -1
- package/lib/util/buffers/utf8/decodeUtf8/v9.d.ts +0 -2
- package/lib/util/buffers/utf8/decodeUtf8/v9.js +0 -39
- package/lib/util/buffers/utf8/decodeUtf8/v9.js.map +0 -1
- package/lib/util/buffers/utf8/encode.d.ts +0 -6
- package/lib/util/buffers/utf8/encode.js +0 -59
- package/lib/util/buffers/utf8/encode.js.map +0 -1
- package/lib/util/buffers/utf8/isUtf8.d.ts +0 -1
- package/lib/util/buffers/utf8/isUtf8.js +0 -43
- package/lib/util/buffers/utf8/isUtf8.js.map +0 -1
- package/lib/util/buffers/utf8/sharedCachedUtf8Decoder.d.ts +0 -3
- package/lib/util/buffers/utf8/sharedCachedUtf8Decoder.js +0 -5
- package/lib/util/buffers/utf8/sharedCachedUtf8Decoder.js.map +0 -1
- package/lib/util/codegen/Codegen.d.ts +0 -44
- package/lib/util/codegen/Codegen.js +0 -121
- package/lib/util/codegen/Codegen.js.map +0 -1
- package/lib/util/codegen/compile.d.ts +0 -4
- package/lib/util/codegen/compile.js +0 -8
- package/lib/util/codegen/compile.js.map +0 -1
- package/lib/util/codegen/dynamicFunction.d.ts +0 -1
- package/lib/util/codegen/dynamicFunction.js +0 -12
- package/lib/util/codegen/dynamicFunction.js.map +0 -1
- package/lib/util/codegen/index.d.ts +0 -3
- package/lib/util/codegen/index.js +0 -7
- package/lib/util/codegen/index.js.map +0 -1
- package/lib/util/codegen/switch.d.ts +0 -1
- package/lib/util/codegen/switch.js +0 -16
- package/lib/util/codegen/switch.js.map +0 -1
- package/lib/util/codegen/types.d.ts +0 -7
- package/lib/util/codegen/types.js +0 -3
- package/lib/util/codegen/types.js.map +0 -1
- package/lib/util/codegen/util/JsExpression.d.ts +0 -11
- package/lib/util/codegen/util/JsExpression.js +0 -30
- package/lib/util/codegen/util/JsExpression.js.map +0 -1
- package/lib/util/codegen/util/helpers.d.ts +0 -1
- package/lib/util/codegen/util/helpers.js +0 -11
- package/lib/util/codegen/util/helpers.js.map +0 -1
- package/lib/util/codegen/util/normalizeAccessor.d.ts +0 -1
- package/lib/util/codegen/util/normalizeAccessor.js +0 -13
- package/lib/util/codegen/util/normalizeAccessor.js.map +0 -1
- package/lib/util/hasOwnProperty.d.ts +0 -1
- package/lib/util/hasOwnProperty.js +0 -9
- package/lib/util/hasOwnProperty.js.map +0 -1
- package/lib/util/isEmpty.d.ts +0 -1
- package/lib/util/isEmpty.js +0 -11
- package/lib/util/isEmpty.js.map +0 -1
- package/lib/util/lazyFunction.d.ts +0 -1
- package/lib/util/lazyFunction.js +0 -14
- package/lib/util/lazyFunction.js.map +0 -1
- package/lib/util/objKeyCmp.d.ts +0 -1
- package/lib/util/objKeyCmp.js +0 -10
- package/lib/util/objKeyCmp.js.map +0 -1
- package/lib/util/sort/insertion.d.ts +0 -1
- package/lib/util/sort/insertion.js +0 -18
- package/lib/util/sort/insertion.js.map +0 -1
- package/lib/util/sort/insertion2.d.ts +0 -1
- package/lib/util/sort/insertion2.js +0 -18
- package/lib/util/sort/insertion2.js.map +0 -1
- package/lib/util/strings/asString.d.ts +0 -1
- package/lib/util/strings/asString.js +0 -28
- package/lib/util/strings/asString.js.map +0 -1
- package/lib/util/strings/escape.d.ts +0 -1
- package/lib/util/strings/escape.js +0 -135
- package/lib/util/strings/escape.js.map +0 -1
- package/lib/util/strings/flatstr.d.ts +0 -1
- package/lib/util/strings/flatstr.js +0 -10
- package/lib/util/strings/flatstr.js.map +0 -1
- package/lib/util/strings/utf8.d.ts +0 -1
- package/lib/util/strings/utf8.js +0 -28
- package/lib/util/strings/utf8.js.map +0 -1
- package/lib/util/strings/util.d.ts +0 -4
- package/lib/util/strings/util.js +0 -12
- package/lib/util/strings/util.js.map +0 -1
- package/lib/util/strings/wordWrap.d.ts +0 -4
- package/lib/util/strings/wordWrap.js +0 -19
- package/lib/util/strings/wordWrap.js.map +0 -1
- package/lib/util/types.d.ts +0 -9
- package/lib/util/types.js +0 -3
- package/lib/util/types.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/util/codegen/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare class JsExpression {
|
|
2
|
-
private expression;
|
|
3
|
-
private _wasUsed;
|
|
4
|
-
private _expression?;
|
|
5
|
-
private _listeners;
|
|
6
|
-
constructor(expression: () => string);
|
|
7
|
-
get wasUsed(): boolean;
|
|
8
|
-
use(): string;
|
|
9
|
-
chain(use: (expr: string) => string): JsExpression;
|
|
10
|
-
addListener(listener: (expr: string) => void): void;
|
|
11
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.JsExpression = void 0;
|
|
4
|
-
class JsExpression {
|
|
5
|
-
constructor(expression) {
|
|
6
|
-
this.expression = expression;
|
|
7
|
-
this._wasUsed = false;
|
|
8
|
-
this._listeners = [];
|
|
9
|
-
}
|
|
10
|
-
get wasUsed() {
|
|
11
|
-
return this._wasUsed;
|
|
12
|
-
}
|
|
13
|
-
use() {
|
|
14
|
-
if (this._wasUsed)
|
|
15
|
-
return this._expression;
|
|
16
|
-
this._wasUsed = true;
|
|
17
|
-
const expression = (this._expression = this.expression());
|
|
18
|
-
for (const listener of this._listeners)
|
|
19
|
-
listener(expression);
|
|
20
|
-
return expression;
|
|
21
|
-
}
|
|
22
|
-
chain(use) {
|
|
23
|
-
return new JsExpression(() => use(this.use()));
|
|
24
|
-
}
|
|
25
|
-
addListener(listener) {
|
|
26
|
-
this._listeners.push(listener);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
exports.JsExpression = JsExpression;
|
|
30
|
-
//# sourceMappingURL=JsExpression.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"JsExpression.js","sourceRoot":"","sources":["../../../../src/util/codegen/util/JsExpression.ts"],"names":[],"mappings":";;;AAcA,MAAa,YAAY;IAKvB,YAAoB,UAAwB;QAAxB,eAAU,GAAV,UAAU,CAAc;QAJpC,aAAQ,GAAY,KAAK,CAAC;QAE1B,eAAU,GAA+B,EAAE,CAAC;IAEL,CAAC;IAEhD,IAAW,OAAO;QAChB,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAEM,GAAG;QACR,IAAI,IAAI,CAAC,QAAQ;YAAE,OAAO,IAAI,CAAC,WAAY,CAAC;QAC5C,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QACrB,MAAM,UAAU,GAAG,CAAC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;QAC1D,KAAK,MAAM,QAAQ,IAAI,IAAI,CAAC,UAAU;YAAE,QAAQ,CAAC,UAAU,CAAC,CAAC;QAC7D,OAAO,UAAU,CAAC;IACpB,CAAC;IAEM,KAAK,CAAC,GAA6B;QACxC,OAAO,IAAI,YAAY,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;IACjD,CAAC;IAEM,WAAW,CAAC,QAAgC;QACjD,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACjC,CAAC;CACF;AA1BD,oCA0BC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const emitStringMatch: (expression: string, offset: string, match: string) => string;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.emitStringMatch = void 0;
|
|
4
|
-
const emitStringMatch = (expression, offset, match) => {
|
|
5
|
-
const conditions = [];
|
|
6
|
-
for (let i = 0; i < match.length; i++)
|
|
7
|
-
conditions.push(`${match.charCodeAt(i)} === ${expression}.charCodeAt(${offset} + ${i})`);
|
|
8
|
-
return conditions.join(' && ');
|
|
9
|
-
};
|
|
10
|
-
exports.emitStringMatch = emitStringMatch;
|
|
11
|
-
//# sourceMappingURL=helpers.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../src/util/codegen/util/helpers.ts"],"names":[],"mappings":";;;AAAO,MAAM,eAAe,GAAG,CAAC,UAAkB,EAAE,MAAc,EAAE,KAAa,EAAE,EAAE;IACnF,MAAM,UAAU,GAAa,EAAE,CAAC;IAChC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE;QACnC,UAAU,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,UAAU,eAAe,MAAM,MAAM,CAAC,GAAG,CAAC,CAAC;IAC3F,OAAO,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AACjC,CAAC,CAAC;AALW,QAAA,eAAe,mBAK1B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const normalizeAccessor: (accessor: string) => string;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.normalizeAccessor = void 0;
|
|
4
|
-
const normalizeAccessor = (accessor) => {
|
|
5
|
-
if (/^[a-z_][a-z_0-9]*$/i.test(accessor)) {
|
|
6
|
-
return '.' + accessor;
|
|
7
|
-
}
|
|
8
|
-
else {
|
|
9
|
-
return `[${JSON.stringify(accessor)}]`;
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
exports.normalizeAccessor = normalizeAccessor;
|
|
13
|
-
//# sourceMappingURL=normalizeAccessor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"normalizeAccessor.js","sourceRoot":"","sources":["../../../../src/util/codegen/util/normalizeAccessor.ts"],"names":[],"mappings":";;;AAAO,MAAM,iBAAiB,GAAG,CAAC,QAAgB,EAAU,EAAE;IAC5D,IAAI,qBAAqB,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;QACzC,OAAO,GAAG,GAAG,QAAQ,CAAC;IACxB,CAAC;SAAM,CAAC;QACN,OAAO,IAAI,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC;IACzC,CAAC;AACH,CAAC,CAAC;AANW,QAAA,iBAAiB,qBAM5B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function hasOwnProperty(obj: object, key: string): boolean;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.hasOwnProperty = void 0;
|
|
4
|
-
const has = Object.prototype.hasOwnProperty;
|
|
5
|
-
function hasOwnProperty(obj, key) {
|
|
6
|
-
return has.call(obj, key);
|
|
7
|
-
}
|
|
8
|
-
exports.hasOwnProperty = hasOwnProperty;
|
|
9
|
-
//# sourceMappingURL=hasOwnProperty.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hasOwnProperty.js","sourceRoot":"","sources":["../../src/util/hasOwnProperty.ts"],"names":[],"mappings":";;;AAAA,MAAM,GAAG,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AAE5C,SAAgB,cAAc,CAAC,GAAW,EAAE,GAAW;IACrD,OAAO,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AAC5B,CAAC;AAFD,wCAEC"}
|
package/lib/util/isEmpty.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const isEmpty: (obj: object) => boolean;
|
package/lib/util/isEmpty.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isEmpty = void 0;
|
|
4
|
-
const isEmpty = (obj) => {
|
|
5
|
-
for (const key in obj)
|
|
6
|
-
if (Object.prototype.hasOwnProperty.call(obj, key))
|
|
7
|
-
return false;
|
|
8
|
-
return true;
|
|
9
|
-
};
|
|
10
|
-
exports.isEmpty = isEmpty;
|
|
11
|
-
//# sourceMappingURL=isEmpty.js.map
|
package/lib/util/isEmpty.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isEmpty.js","sourceRoot":"","sources":["../../src/util/isEmpty.ts"],"names":[],"mappings":";;;AAAO,MAAM,OAAO,GAAG,CAAC,GAAW,EAAW,EAAE;IAC9C,KAAK,MAAM,GAAG,IAAI,GAAG;QAAE,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC;YAAE,OAAO,KAAK,CAAC;IACxF,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAHW,QAAA,OAAO,WAGlB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const lazy: <T extends (...args: any[]) => any>(factory: () => T) => T;
|
package/lib/util/lazyFunction.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.lazy = void 0;
|
|
4
|
-
const lazy = (factory) => {
|
|
5
|
-
let generated;
|
|
6
|
-
const fn = (...args) => {
|
|
7
|
-
if (!generated)
|
|
8
|
-
generated = factory();
|
|
9
|
-
return generated.apply(null, args);
|
|
10
|
-
};
|
|
11
|
-
return fn;
|
|
12
|
-
};
|
|
13
|
-
exports.lazy = lazy;
|
|
14
|
-
//# sourceMappingURL=lazyFunction.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lazyFunction.js","sourceRoot":"","sources":["../../src/util/lazyFunction.ts"],"names":[],"mappings":";;;AAAO,MAAM,IAAI,GAAG,CAAoC,OAAgB,EAAK,EAAE;IAC7E,IAAI,SAAwB,CAAC;IAC7B,MAAM,EAAE,GAAG,CAAC,GAAG,IAAW,EAAE,EAAE;QAC5B,IAAI,CAAC,SAAS;YAAE,SAAS,GAAG,OAAO,EAAE,CAAC;QACtC,OAAO,SAAS,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACrC,CAAC,CAAC;IACF,OAAO,EAAO,CAAC;AACjB,CAAC,CAAC;AAPW,QAAA,IAAI,QAOf"}
|
package/lib/util/objKeyCmp.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const objKeyCmp: (a: string, b: string) => number;
|
package/lib/util/objKeyCmp.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.objKeyCmp = void 0;
|
|
4
|
-
const objKeyCmp = (a, b) => {
|
|
5
|
-
const len1 = a.length;
|
|
6
|
-
const len2 = b.length;
|
|
7
|
-
return len1 === len2 ? (a > b ? 1 : -1) : len1 - len2;
|
|
8
|
-
};
|
|
9
|
-
exports.objKeyCmp = objKeyCmp;
|
|
10
|
-
//# sourceMappingURL=objKeyCmp.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"objKeyCmp.js","sourceRoot":"","sources":["../../src/util/objKeyCmp.ts"],"names":[],"mappings":";;;AAAO,MAAM,SAAS,GAAG,CAAC,CAAS,EAAE,CAAS,EAAU,EAAE;IACxD,MAAM,IAAI,GAAG,CAAC,CAAC,MAAM,CAAC;IACtB,MAAM,IAAI,GAAG,CAAC,CAAC,MAAM,CAAC;IACtB,OAAO,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC;AACxD,CAAC,CAAC;AAJW,QAAA,SAAS,aAIpB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const sort: <T>(arr: T[]) => T[];
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sort = void 0;
|
|
4
|
-
const sort = (arr) => {
|
|
5
|
-
const length = arr.length;
|
|
6
|
-
for (let i = 1; i < length; i++) {
|
|
7
|
-
const currentValue = arr[i];
|
|
8
|
-
let position = i;
|
|
9
|
-
while (position !== 0 && arr[position - 1] > currentValue) {
|
|
10
|
-
arr[position] = arr[position - 1];
|
|
11
|
-
position--;
|
|
12
|
-
}
|
|
13
|
-
arr[position] = currentValue;
|
|
14
|
-
}
|
|
15
|
-
return arr;
|
|
16
|
-
};
|
|
17
|
-
exports.sort = sort;
|
|
18
|
-
//# sourceMappingURL=insertion.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"insertion.js","sourceRoot":"","sources":["../../../src/util/sort/insertion.ts"],"names":[],"mappings":";;;AAQO,MAAM,IAAI,GAAG,CAAI,GAAQ,EAAO,EAAE;IACvC,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC;IAC1B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAChC,MAAM,YAAY,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;QAC5B,IAAI,QAAQ,GAAG,CAAC,CAAC;QACjB,OAAO,QAAQ,KAAK,CAAC,IAAI,GAAG,CAAC,QAAQ,GAAG,CAAC,CAAC,GAAG,YAAY,EAAE,CAAC;YAC1D,GAAG,CAAC,QAAQ,CAAC,GAAG,GAAG,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC;YAClC,QAAQ,EAAE,CAAC;QACb,CAAC;QACD,GAAG,CAAC,QAAQ,CAAC,GAAG,YAAY,CAAC;IAC/B,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC,CAAC;AAZW,QAAA,IAAI,QAYf"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const sort: <T>(arr: T[], comparator: (a: T, b: T) => number) => T[];
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sort = void 0;
|
|
4
|
-
const sort = (arr, comparator) => {
|
|
5
|
-
const length = arr.length;
|
|
6
|
-
for (let i = 1; i < length; i++) {
|
|
7
|
-
const currentValue = arr[i];
|
|
8
|
-
let position = i;
|
|
9
|
-
while (position !== 0 && comparator(arr[position - 1], currentValue) > 0) {
|
|
10
|
-
arr[position] = arr[position - 1];
|
|
11
|
-
position--;
|
|
12
|
-
}
|
|
13
|
-
arr[position] = currentValue;
|
|
14
|
-
}
|
|
15
|
-
return arr;
|
|
16
|
-
};
|
|
17
|
-
exports.sort = sort;
|
|
18
|
-
//# sourceMappingURL=insertion2.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"insertion2.js","sourceRoot":"","sources":["../../../src/util/sort/insertion2.ts"],"names":[],"mappings":";;;AASO,MAAM,IAAI,GAAG,CAAI,GAAQ,EAAE,UAAkC,EAAO,EAAE;IAC3E,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC;IAC1B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAChC,MAAM,YAAY,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;QAC5B,IAAI,QAAQ,GAAG,CAAC,CAAC;QACjB,OAAO,QAAQ,KAAK,CAAC,IAAI,UAAU,CAAC,GAAG,CAAC,QAAQ,GAAG,CAAC,CAAC,EAAE,YAAY,CAAC,GAAG,CAAC,EAAE,CAAC;YACzE,GAAG,CAAC,QAAQ,CAAC,GAAG,GAAG,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC;YAClC,QAAQ,EAAE,CAAC;QACb,CAAC;QACD,GAAG,CAAC,QAAQ,CAAC,GAAG,YAAY,CAAC;IAC/B,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC,CAAC;AAZW,QAAA,IAAI,QAYf"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const asString: (str: string) => string;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.asString = void 0;
|
|
4
|
-
const stringify = JSON.stringify;
|
|
5
|
-
const asString = (str) => {
|
|
6
|
-
const length = str.length;
|
|
7
|
-
if (length > 41)
|
|
8
|
-
return stringify(str);
|
|
9
|
-
let result = '';
|
|
10
|
-
let last = 0;
|
|
11
|
-
let found = false;
|
|
12
|
-
let point = 255;
|
|
13
|
-
for (let i = 0; i < length && point >= 32; i++) {
|
|
14
|
-
point = str.charCodeAt(i);
|
|
15
|
-
if (point >= 0xd800 && point <= 0xdfff)
|
|
16
|
-
return stringify(str);
|
|
17
|
-
if (point === 34 || point === 92) {
|
|
18
|
-
result += str.slice(last, i) + '\\';
|
|
19
|
-
last = i;
|
|
20
|
-
found = true;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
if (point < 32)
|
|
24
|
-
return stringify(str);
|
|
25
|
-
return '"' + (!found ? str : result + str.slice(last)) + '"';
|
|
26
|
-
};
|
|
27
|
-
exports.asString = asString;
|
|
28
|
-
//# sourceMappingURL=asString.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"asString.js","sourceRoot":"","sources":["../../../src/util/strings/asString.ts"],"names":[],"mappings":";;;AAAA,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;AAG1B,MAAM,QAAQ,GAAG,CAAC,GAAW,EAAE,EAAE;IACtC,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC;IAC1B,IAAI,MAAM,GAAG,EAAE;QAAE,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC;IACvC,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,IAAI,IAAI,GAAG,CAAC,CAAC;IACb,IAAI,KAAK,GAAG,KAAK,CAAC;IAClB,IAAI,KAAK,GAAG,GAAG,CAAC;IAChB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,IAAI,KAAK,IAAI,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;QAC/C,KAAK,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QAC1B,IAAI,KAAK,IAAI,MAAM,IAAI,KAAK,IAAI,MAAM;YAAE,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC;QAC9D,IAAI,KAAK,KAAK,EAAE,IAAI,KAAK,KAAK,EAAE,EAAE,CAAC;YACjC,MAAM,IAAI,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC;YACpC,IAAI,GAAG,CAAC,CAAC;YACT,KAAK,GAAG,IAAI,CAAC;QACf,CAAC;IACH,CAAC;IACD,IAAI,KAAK,GAAG,EAAE;QAAE,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC;IACtC,OAAO,GAAG,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC;AAC/D,CAAC,CAAC;AAlBW,QAAA,QAAQ,YAkBnB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const escape: (str: string) => string;
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.escape = void 0;
|
|
4
|
-
const strEscapeSequencesRegExp = /[\u0000-\u001f\u0022\u005c\ud800-\udfff]|[\ud800-\udbff](?![\udc00-\udfff])|(?:[^\ud800-\udbff]|^)[\udc00-\udfff]/;
|
|
5
|
-
const strEscapeSequencesReplacer = /[\u0000-\u001f\u0022\u005c\ud800-\udfff]|[\ud800-\udbff](?![\udc00-\udfff])|(?:[^\ud800-\udbff]|^)[\udc00-\udfff]/g;
|
|
6
|
-
const meta = [
|
|
7
|
-
'\\u0000',
|
|
8
|
-
'\\u0001',
|
|
9
|
-
'\\u0002',
|
|
10
|
-
'\\u0003',
|
|
11
|
-
'\\u0004',
|
|
12
|
-
'\\u0005',
|
|
13
|
-
'\\u0006',
|
|
14
|
-
'\\u0007',
|
|
15
|
-
'\\b',
|
|
16
|
-
'\\t',
|
|
17
|
-
'\\n',
|
|
18
|
-
'\\u000b',
|
|
19
|
-
'\\f',
|
|
20
|
-
'\\r',
|
|
21
|
-
'\\u000e',
|
|
22
|
-
'\\u000f',
|
|
23
|
-
'\\u0010',
|
|
24
|
-
'\\u0011',
|
|
25
|
-
'\\u0012',
|
|
26
|
-
'\\u0013',
|
|
27
|
-
'\\u0014',
|
|
28
|
-
'\\u0015',
|
|
29
|
-
'\\u0016',
|
|
30
|
-
'\\u0017',
|
|
31
|
-
'\\u0018',
|
|
32
|
-
'\\u0019',
|
|
33
|
-
'\\u001a',
|
|
34
|
-
'\\u001b',
|
|
35
|
-
'\\u001c',
|
|
36
|
-
'\\u001d',
|
|
37
|
-
'\\u001e',
|
|
38
|
-
'\\u001f',
|
|
39
|
-
'',
|
|
40
|
-
'',
|
|
41
|
-
'\\"',
|
|
42
|
-
'',
|
|
43
|
-
'',
|
|
44
|
-
'',
|
|
45
|
-
'',
|
|
46
|
-
'',
|
|
47
|
-
'',
|
|
48
|
-
'',
|
|
49
|
-
'',
|
|
50
|
-
'',
|
|
51
|
-
'',
|
|
52
|
-
'',
|
|
53
|
-
'',
|
|
54
|
-
'',
|
|
55
|
-
'',
|
|
56
|
-
'',
|
|
57
|
-
'',
|
|
58
|
-
'',
|
|
59
|
-
'',
|
|
60
|
-
'',
|
|
61
|
-
'',
|
|
62
|
-
'',
|
|
63
|
-
'',
|
|
64
|
-
'',
|
|
65
|
-
'',
|
|
66
|
-
'',
|
|
67
|
-
'',
|
|
68
|
-
'',
|
|
69
|
-
'',
|
|
70
|
-
'',
|
|
71
|
-
'',
|
|
72
|
-
'',
|
|
73
|
-
'',
|
|
74
|
-
'',
|
|
75
|
-
'',
|
|
76
|
-
'',
|
|
77
|
-
'',
|
|
78
|
-
'',
|
|
79
|
-
'',
|
|
80
|
-
'',
|
|
81
|
-
'',
|
|
82
|
-
'',
|
|
83
|
-
'',
|
|
84
|
-
'',
|
|
85
|
-
'',
|
|
86
|
-
'',
|
|
87
|
-
'',
|
|
88
|
-
'',
|
|
89
|
-
'',
|
|
90
|
-
'',
|
|
91
|
-
'',
|
|
92
|
-
'',
|
|
93
|
-
'',
|
|
94
|
-
'',
|
|
95
|
-
'',
|
|
96
|
-
'',
|
|
97
|
-
'',
|
|
98
|
-
'',
|
|
99
|
-
'\\\\',
|
|
100
|
-
];
|
|
101
|
-
const esc_ = (str) => {
|
|
102
|
-
if (str.length === 2)
|
|
103
|
-
return str[0] + '\\u' + str.charCodeAt(1).toString(16);
|
|
104
|
-
const charCode = str.charCodeAt(0);
|
|
105
|
-
return meta.length > charCode ? meta[charCode] : '\\u' + charCode.toString(16);
|
|
106
|
-
};
|
|
107
|
-
const escape = (str) => {
|
|
108
|
-
let point, last = 0, result = '';
|
|
109
|
-
if (str.length < 5000 && !strEscapeSequencesRegExp.test(str))
|
|
110
|
-
return str;
|
|
111
|
-
if (str.length > 100)
|
|
112
|
-
return str.replace(strEscapeSequencesReplacer, esc_);
|
|
113
|
-
for (let i = 0; i < str.length; i++) {
|
|
114
|
-
point = str.charCodeAt(i);
|
|
115
|
-
if (point === 34 || point === 92 || point < 32) {
|
|
116
|
-
result += str.slice(last, i) + meta[point];
|
|
117
|
-
last = i + 1;
|
|
118
|
-
}
|
|
119
|
-
else if (point >= 0xd800 && point <= 0xdfff) {
|
|
120
|
-
if (point <= 0xdbff && i + 1 < str.length) {
|
|
121
|
-
point = str.charCodeAt(i + 1);
|
|
122
|
-
if (point >= 0xdc00 && point <= 0xdfff) {
|
|
123
|
-
i++;
|
|
124
|
-
continue;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
result += str.slice(last, i) + '\\u' + point.toString(16);
|
|
128
|
-
last = i + 1;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
result += str.slice(last);
|
|
132
|
-
return result;
|
|
133
|
-
};
|
|
134
|
-
exports.escape = escape;
|
|
135
|
-
//# sourceMappingURL=escape.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"escape.js","sourceRoot":"","sources":["../../../src/util/strings/escape.ts"],"names":[],"mappings":"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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const flatstr: (s: string) => string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"flatstr.js","sourceRoot":"","sources":["../../../src/util/strings/flatstr.ts"],"names":[],"mappings":";;;AAAO,MAAM,OAAO,GAAG,CAAC,CAAS,EAAU,EAAE;IACrC,CAAE,GAAG,CAAC,CAAC;IACb,MAAM,CAAC,CAAC,CAAC,CAAC;IACV,OAAO,CAAC,CAAC;AACX,CAAC,CAAC;AAJW,QAAA,OAAO,WAIlB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function utf8Size(str: string): number;
|
package/lib/util/strings/utf8.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.utf8Size = void 0;
|
|
4
|
-
function utf8Size(str) {
|
|
5
|
-
const length = str.length;
|
|
6
|
-
let size = 0;
|
|
7
|
-
let pos = 0;
|
|
8
|
-
while (pos < length) {
|
|
9
|
-
let value = str.charCodeAt(pos++);
|
|
10
|
-
if ((value & 0xffffff80) === 0) {
|
|
11
|
-
size++;
|
|
12
|
-
continue;
|
|
13
|
-
}
|
|
14
|
-
else if ((value & 0xfffff800) === 0)
|
|
15
|
-
size += 2;
|
|
16
|
-
else {
|
|
17
|
-
if (value >= 0xd800 && value <= 0xdbff && pos < length) {
|
|
18
|
-
const extra = str.charCodeAt(pos);
|
|
19
|
-
if ((extra & 0xfc00) === 0xdc00)
|
|
20
|
-
value = (pos++, ((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000);
|
|
21
|
-
}
|
|
22
|
-
size += 3 + +((value & 0xffff0000) !== 0);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
return size;
|
|
26
|
-
}
|
|
27
|
-
exports.utf8Size = utf8Size;
|
|
28
|
-
//# sourceMappingURL=utf8.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utf8.js","sourceRoot":"","sources":["../../../src/util/strings/utf8.ts"],"names":[],"mappings":";;;AAOA,SAAgB,QAAQ,CAAC,GAAW;IAClC,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC;IAC1B,IAAI,IAAI,GAAG,CAAC,CAAC;IACb,IAAI,GAAG,GAAG,CAAC,CAAC;IACZ,OAAO,GAAG,GAAG,MAAM,EAAE,CAAC;QACpB,IAAI,KAAK,GAAG,GAAG,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,CAAC;QAClC,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;YAC/B,IAAI,EAAE,CAAC;YACP,SAAS;QACX,CAAC;aAAM,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC;YAAE,IAAI,IAAI,CAAC,CAAC;aAC5C,CAAC;YACJ,IAAI,KAAK,IAAI,MAAM,IAAI,KAAK,IAAI,MAAM,IAAI,GAAG,GAAG,MAAM,EAAE,CAAC;gBACvD,MAAM,KAAK,GAAG,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;gBAClC,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,MAAM;oBAAE,KAAK,GAAG,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,KAAK,GAAG,KAAK,CAAC,GAAG,OAAO,CAAC,CAAC;YACxG,CAAC;YACD,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;QAC5C,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAnBD,4BAmBC"}
|
package/lib/util/strings/util.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isPunctuation = exports.isWhitespace = exports.isLetter = void 0;
|
|
4
|
-
const LETTER_REGEX = /(\p{Letter}|\d)/u;
|
|
5
|
-
const WHITESPACE_REGEX = /\s/;
|
|
6
|
-
const isLetter = (char) => LETTER_REGEX.test(char[0]);
|
|
7
|
-
exports.isLetter = isLetter;
|
|
8
|
-
const isWhitespace = (char) => WHITESPACE_REGEX.test(char[0]);
|
|
9
|
-
exports.isWhitespace = isWhitespace;
|
|
10
|
-
const isPunctuation = (char) => !(0, exports.isLetter)(char) && !(0, exports.isWhitespace)(char);
|
|
11
|
-
exports.isPunctuation = isPunctuation;
|
|
12
|
-
//# sourceMappingURL=util.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"util.js","sourceRoot":"","sources":["../../../src/util/strings/util.ts"],"names":[],"mappings":";;;AAAA,MAAM,YAAY,GAAG,kBAAkB,CAAC;AACxC,MAAM,gBAAgB,GAAG,IAAI,CAAC;AAIvB,MAAM,QAAQ,GAAkB,CAAC,IAAY,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AAAvE,QAAA,QAAQ,YAA+D;AAC7E,MAAM,YAAY,GAAkB,CAAC,IAAY,EAAE,EAAE,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AAA/E,QAAA,YAAY,gBAAmE;AACrF,MAAM,aAAa,GAAkB,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC,IAAA,gBAAQ,EAAC,IAAI,CAAC,IAAI,CAAC,IAAA,oBAAY,EAAC,IAAI,CAAC,CAAC;AAAxF,QAAA,aAAa,iBAA2E"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.wordWrap = void 0;
|
|
4
|
-
const lineMap = (line) => line.slice(-1) === '\n' ? line.slice(0, line.length - 1).replace(/[ \t]*$/gm, '') : line;
|
|
5
|
-
const lineReduce = (acc, line) => {
|
|
6
|
-
acc.push(...line.split('\n'));
|
|
7
|
-
return acc;
|
|
8
|
-
};
|
|
9
|
-
const wordWrap = (str, options = {}) => {
|
|
10
|
-
if (!str)
|
|
11
|
-
return [];
|
|
12
|
-
const width = options.width || 50;
|
|
13
|
-
const regexString = '.{1,' + width + '}([\\s\u200B]+|$)|[^\\s\u200B]+?([\\s\u200B]+|$)';
|
|
14
|
-
const re = new RegExp(regexString, 'g');
|
|
15
|
-
const lines = (str.match(re) || []).map(lineMap).reduce(lineReduce, []);
|
|
16
|
-
return lines;
|
|
17
|
-
};
|
|
18
|
-
exports.wordWrap = wordWrap;
|
|
19
|
-
//# sourceMappingURL=wordWrap.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"wordWrap.js","sourceRoot":"","sources":["../../../src/util/strings/wordWrap.ts"],"names":[],"mappings":";;;AAIA,MAAM,OAAO,GAAG,CAAC,IAAY,EAAE,EAAE,CAC/B,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAC3F,MAAM,UAAU,GAAG,CAAC,GAAa,EAAE,IAAY,EAAE,EAAE;IACjD,GAAG,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;IAC9B,OAAO,GAAG,CAAC;AACb,CAAC,CAAC;AAEK,MAAM,QAAQ,GAAG,CAAC,GAAW,EAAE,UAAuB,EAAE,EAAY,EAAE;IAC3E,IAAI,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC;IAEpB,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC;IAClC,MAAM,WAAW,GAAG,MAAM,GAAG,KAAK,GAAG,kDAAkD,CAAC;IACxF,MAAM,EAAE,GAAG,IAAI,MAAM,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC;IACxC,MAAM,KAAK,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,UAAU,EAAE,EAAc,CAAC,CAAC;IAEpF,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AATW,QAAA,QAAQ,YASnB"}
|
package/lib/util/types.d.ts
DELETED
package/lib/util/types.js
DELETED
package/lib/util/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/util/types.ts"],"names":[],"mappings":""}
|