@putout/bundle 1.4.0 → 1.5.0
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/README.md +10 -2
- package/bundle/putout-iife.js +125663 -0
- package/bundle/putout.js +301 -291
- package/package.json +2 -1
package/bundle/putout.js
CHANGED
|
@@ -4662,348 +4662,358 @@ function isValidIdentifier(name, reserved = true) {
|
|
|
4662
4662
|
|
|
4663
4663
|
var lib$i = {};
|
|
4664
4664
|
|
|
4665
|
-
|
|
4666
|
-
value: true
|
|
4667
|
-
});
|
|
4668
|
-
lib$i.readCodePoint = readCodePoint$1;
|
|
4669
|
-
lib$i.readInt = readInt$1;
|
|
4670
|
-
lib$i.readStringContents = readStringContents$1;
|
|
4665
|
+
var hasRequiredLib$b;
|
|
4671
4666
|
|
|
4672
|
-
|
|
4673
|
-
|
|
4674
|
-
|
|
4667
|
+
function requireLib$b () {
|
|
4668
|
+
if (hasRequiredLib$b) return lib$i;
|
|
4669
|
+
hasRequiredLib$b = 1;
|
|
4675
4670
|
|
|
4676
|
-
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
oct: ch => ch >= 48 && ch <= 55,
|
|
4683
|
-
dec: ch => ch >= 48 && ch <= 57,
|
|
4684
|
-
hex: ch => ch >= 48 && ch <= 57 || ch >= 65 && ch <= 70 || ch >= 97 && ch <= 102
|
|
4685
|
-
};
|
|
4671
|
+
Object.defineProperty(lib$i, "__esModule", {
|
|
4672
|
+
value: true
|
|
4673
|
+
});
|
|
4674
|
+
lib$i.readCodePoint = readCodePoint;
|
|
4675
|
+
lib$i.readInt = readInt;
|
|
4676
|
+
lib$i.readStringContents = readStringContents;
|
|
4686
4677
|
|
|
4687
|
-
|
|
4688
|
-
|
|
4689
|
-
|
|
4690
|
-
const initialCurLine = curLine;
|
|
4691
|
-
let out = "";
|
|
4692
|
-
let firstInvalidLoc = null;
|
|
4693
|
-
let chunkStart = pos;
|
|
4694
|
-
const {
|
|
4695
|
-
length
|
|
4696
|
-
} = input;
|
|
4678
|
+
var _isDigit = function isDigit(code) {
|
|
4679
|
+
return code >= 48 && code <= 57;
|
|
4680
|
+
};
|
|
4697
4681
|
|
|
4698
|
-
|
|
4699
|
-
|
|
4700
|
-
|
|
4701
|
-
|
|
4702
|
-
|
|
4703
|
-
|
|
4682
|
+
const forbiddenNumericSeparatorSiblings = {
|
|
4683
|
+
decBinOct: new Set([46, 66, 69, 79, 95, 98, 101, 111]),
|
|
4684
|
+
hex: new Set([46, 88, 95, 120])
|
|
4685
|
+
};
|
|
4686
|
+
const isAllowedNumericSeparatorSibling = {
|
|
4687
|
+
bin: ch => ch === 48 || ch === 49,
|
|
4688
|
+
oct: ch => ch >= 48 && ch <= 55,
|
|
4689
|
+
dec: ch => ch >= 48 && ch <= 57,
|
|
4690
|
+
hex: ch => ch >= 48 && ch <= 57 || ch >= 65 && ch <= 70 || ch >= 97 && ch <= 102
|
|
4691
|
+
};
|
|
4704
4692
|
|
|
4705
|
-
|
|
4693
|
+
function readStringContents(type, input, pos, lineStart, curLine, errors) {
|
|
4694
|
+
const initialPos = pos;
|
|
4695
|
+
const initialLineStart = lineStart;
|
|
4696
|
+
const initialCurLine = curLine;
|
|
4697
|
+
let out = "";
|
|
4698
|
+
let firstInvalidLoc = null;
|
|
4699
|
+
let chunkStart = pos;
|
|
4700
|
+
const {
|
|
4701
|
+
length
|
|
4702
|
+
} = input;
|
|
4706
4703
|
|
|
4707
|
-
|
|
4708
|
-
|
|
4709
|
-
|
|
4710
|
-
|
|
4704
|
+
for (;;) {
|
|
4705
|
+
if (pos >= length) {
|
|
4706
|
+
errors.unterminated(initialPos, initialLineStart, initialCurLine);
|
|
4707
|
+
out += input.slice(chunkStart, pos);
|
|
4708
|
+
break;
|
|
4709
|
+
}
|
|
4711
4710
|
|
|
4712
|
-
|
|
4713
|
-
out += input.slice(chunkStart, pos);
|
|
4714
|
-
const res = readEscapedChar$1(input, pos, lineStart, curLine, type === "template", errors);
|
|
4711
|
+
const ch = input.charCodeAt(pos);
|
|
4715
4712
|
|
|
4716
|
-
|
|
4717
|
-
|
|
4718
|
-
|
|
4719
|
-
|
|
4720
|
-
curLine
|
|
4721
|
-
};
|
|
4722
|
-
} else {
|
|
4723
|
-
out += res.ch;
|
|
4724
|
-
}
|
|
4713
|
+
if (isStringEnd(type, ch, input, pos)) {
|
|
4714
|
+
out += input.slice(chunkStart, pos);
|
|
4715
|
+
break;
|
|
4716
|
+
}
|
|
4725
4717
|
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
curLine
|
|
4730
|
-
} = res);
|
|
4731
|
-
chunkStart = pos;
|
|
4732
|
-
} else if (ch === 8232 || ch === 8233) {
|
|
4733
|
-
++pos;
|
|
4734
|
-
++curLine;
|
|
4735
|
-
lineStart = pos;
|
|
4736
|
-
} else if (ch === 10 || ch === 13) {
|
|
4737
|
-
if (type === "template") {
|
|
4738
|
-
out += input.slice(chunkStart, pos) + "\n";
|
|
4739
|
-
++pos;
|
|
4718
|
+
if (ch === 92) {
|
|
4719
|
+
out += input.slice(chunkStart, pos);
|
|
4720
|
+
const res = readEscapedChar(input, pos, lineStart, curLine, type === "template", errors);
|
|
4740
4721
|
|
|
4741
|
-
|
|
4742
|
-
|
|
4743
|
-
|
|
4722
|
+
if (res.ch === null && !firstInvalidLoc) {
|
|
4723
|
+
firstInvalidLoc = {
|
|
4724
|
+
pos,
|
|
4725
|
+
lineStart,
|
|
4726
|
+
curLine
|
|
4727
|
+
};
|
|
4728
|
+
} else {
|
|
4729
|
+
out += res.ch;
|
|
4730
|
+
}
|
|
4744
4731
|
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4732
|
+
({
|
|
4733
|
+
pos,
|
|
4734
|
+
lineStart,
|
|
4735
|
+
curLine
|
|
4736
|
+
} = res);
|
|
4737
|
+
chunkStart = pos;
|
|
4738
|
+
} else if (ch === 8232 || ch === 8233) {
|
|
4739
|
+
++pos;
|
|
4740
|
+
++curLine;
|
|
4741
|
+
lineStart = pos;
|
|
4742
|
+
} else if (ch === 10 || ch === 13) {
|
|
4743
|
+
if (type === "template") {
|
|
4744
|
+
out += input.slice(chunkStart, pos) + "\n";
|
|
4745
|
+
++pos;
|
|
4746
|
+
|
|
4747
|
+
if (ch === 13 && input.charCodeAt(pos) === 10) {
|
|
4748
|
+
++pos;
|
|
4749
|
+
}
|
|
4754
4750
|
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
|
|
4761
|
-
|
|
4762
|
-
|
|
4763
|
-
}
|
|
4751
|
+
++curLine;
|
|
4752
|
+
chunkStart = lineStart = pos;
|
|
4753
|
+
} else {
|
|
4754
|
+
errors.unterminated(initialPos, initialLineStart, initialCurLine);
|
|
4755
|
+
}
|
|
4756
|
+
} else {
|
|
4757
|
+
++pos;
|
|
4758
|
+
}
|
|
4759
|
+
}
|
|
4764
4760
|
|
|
4765
|
-
|
|
4766
|
-
|
|
4767
|
-
|
|
4768
|
-
|
|
4761
|
+
return {
|
|
4762
|
+
pos,
|
|
4763
|
+
str: out,
|
|
4764
|
+
firstInvalidLoc,
|
|
4765
|
+
lineStart,
|
|
4766
|
+
curLine,
|
|
4767
|
+
containsInvalid: !!firstInvalidLoc
|
|
4768
|
+
};
|
|
4769
|
+
}
|
|
4769
4770
|
|
|
4770
|
-
|
|
4771
|
-
|
|
4771
|
+
function isStringEnd(type, ch, input, pos) {
|
|
4772
|
+
if (type === "template") {
|
|
4773
|
+
return ch === 96 || ch === 36 && input.charCodeAt(pos + 1) === 123;
|
|
4774
|
+
}
|
|
4772
4775
|
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
pos++;
|
|
4776
|
+
return ch === (type === "double" ? 34 : 39);
|
|
4777
|
+
}
|
|
4776
4778
|
|
|
4777
|
-
|
|
4778
|
-
|
|
4779
|
-
|
|
4780
|
-
lineStart,
|
|
4781
|
-
curLine
|
|
4782
|
-
});
|
|
4779
|
+
function readEscapedChar(input, pos, lineStart, curLine, inTemplate, errors) {
|
|
4780
|
+
const throwOnInvalid = !inTemplate;
|
|
4781
|
+
pos++;
|
|
4783
4782
|
|
|
4784
|
-
|
|
4783
|
+
const res = ch => ({
|
|
4784
|
+
pos,
|
|
4785
|
+
ch,
|
|
4786
|
+
lineStart,
|
|
4787
|
+
curLine
|
|
4788
|
+
});
|
|
4785
4789
|
|
|
4786
|
-
|
|
4787
|
-
case 110:
|
|
4788
|
-
return res("\n");
|
|
4790
|
+
const ch = input.charCodeAt(pos++);
|
|
4789
4791
|
|
|
4790
|
-
|
|
4791
|
-
|
|
4792
|
+
switch (ch) {
|
|
4793
|
+
case 110:
|
|
4794
|
+
return res("\n");
|
|
4792
4795
|
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
-
let code;
|
|
4796
|
-
({
|
|
4797
|
-
code,
|
|
4798
|
-
pos
|
|
4799
|
-
} = readHexChar$1(input, pos, lineStart, curLine, 2, false, throwOnInvalid, errors));
|
|
4800
|
-
return res(code === null ? null : String.fromCharCode(code));
|
|
4801
|
-
}
|
|
4796
|
+
case 114:
|
|
4797
|
+
return res("\r");
|
|
4802
4798
|
|
|
4803
|
-
|
|
4804
|
-
|
|
4805
|
-
|
|
4806
|
-
|
|
4807
|
-
|
|
4808
|
-
|
|
4809
|
-
|
|
4810
|
-
|
|
4811
|
-
|
|
4799
|
+
case 120:
|
|
4800
|
+
{
|
|
4801
|
+
let code;
|
|
4802
|
+
({
|
|
4803
|
+
code,
|
|
4804
|
+
pos
|
|
4805
|
+
} = readHexChar(input, pos, lineStart, curLine, 2, false, throwOnInvalid, errors));
|
|
4806
|
+
return res(code === null ? null : String.fromCharCode(code));
|
|
4807
|
+
}
|
|
4812
4808
|
|
|
4813
|
-
|
|
4814
|
-
|
|
4809
|
+
case 117:
|
|
4810
|
+
{
|
|
4811
|
+
let code;
|
|
4812
|
+
({
|
|
4813
|
+
code,
|
|
4814
|
+
pos
|
|
4815
|
+
} = readCodePoint(input, pos, lineStart, curLine, throwOnInvalid, errors));
|
|
4816
|
+
return res(code === null ? null : String.fromCodePoint(code));
|
|
4817
|
+
}
|
|
4815
4818
|
|
|
4816
|
-
|
|
4817
|
-
|
|
4819
|
+
case 116:
|
|
4820
|
+
return res("\t");
|
|
4818
4821
|
|
|
4819
|
-
|
|
4820
|
-
|
|
4822
|
+
case 98:
|
|
4823
|
+
return res("\b");
|
|
4821
4824
|
|
|
4822
|
-
|
|
4823
|
-
|
|
4825
|
+
case 118:
|
|
4826
|
+
return res("\u000b");
|
|
4824
4827
|
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
++pos;
|
|
4828
|
-
}
|
|
4828
|
+
case 102:
|
|
4829
|
+
return res("\f");
|
|
4829
4830
|
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4831
|
+
case 13:
|
|
4832
|
+
if (input.charCodeAt(pos) === 10) {
|
|
4833
|
+
++pos;
|
|
4834
|
+
}
|
|
4833
4835
|
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4836
|
+
case 10:
|
|
4837
|
+
lineStart = pos;
|
|
4838
|
+
++curLine;
|
|
4837
4839
|
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
return res(null);
|
|
4842
|
-
} else {
|
|
4843
|
-
errors.strictNumericEscape(pos - 1, lineStart, curLine);
|
|
4844
|
-
}
|
|
4840
|
+
case 8232:
|
|
4841
|
+
case 8233:
|
|
4842
|
+
return res("");
|
|
4845
4843
|
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
|
|
4844
|
+
case 56:
|
|
4845
|
+
case 57:
|
|
4846
|
+
if (inTemplate) {
|
|
4847
|
+
return res(null);
|
|
4848
|
+
} else {
|
|
4849
|
+
errors.strictNumericEscape(pos - 1, lineStart, curLine);
|
|
4850
|
+
}
|
|
4852
4851
|
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
|
|
4852
|
+
default:
|
|
4853
|
+
if (ch >= 48 && ch <= 55) {
|
|
4854
|
+
const startPos = pos - 1;
|
|
4855
|
+
const match = input.slice(startPos, pos + 2).match(/^[0-7]+/);
|
|
4856
|
+
let octalStr = match[0];
|
|
4857
|
+
let octal = parseInt(octalStr, 8);
|
|
4858
|
+
|
|
4859
|
+
if (octal > 255) {
|
|
4860
|
+
octalStr = octalStr.slice(0, -1);
|
|
4861
|
+
octal = parseInt(octalStr, 8);
|
|
4862
|
+
}
|
|
4857
4863
|
|
|
4858
|
-
|
|
4859
|
-
|
|
4864
|
+
pos += octalStr.length - 1;
|
|
4865
|
+
const next = input.charCodeAt(pos);
|
|
4860
4866
|
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
|
|
4867
|
+
if (octalStr !== "0" || next === 56 || next === 57) {
|
|
4868
|
+
if (inTemplate) {
|
|
4869
|
+
return res(null);
|
|
4870
|
+
} else {
|
|
4871
|
+
errors.strictNumericEscape(startPos, lineStart, curLine);
|
|
4872
|
+
}
|
|
4873
|
+
}
|
|
4868
4874
|
|
|
4869
|
-
|
|
4870
|
-
|
|
4875
|
+
return res(String.fromCharCode(octal));
|
|
4876
|
+
}
|
|
4871
4877
|
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
}
|
|
4878
|
+
return res(String.fromCharCode(ch));
|
|
4879
|
+
}
|
|
4880
|
+
}
|
|
4875
4881
|
|
|
4876
|
-
function readHexChar
|
|
4877
|
-
|
|
4878
|
-
|
|
4879
|
-
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
|
|
4882
|
+
function readHexChar(input, pos, lineStart, curLine, len, forceLen, throwOnInvalid, errors) {
|
|
4883
|
+
const initialPos = pos;
|
|
4884
|
+
let n;
|
|
4885
|
+
({
|
|
4886
|
+
n,
|
|
4887
|
+
pos
|
|
4888
|
+
} = readInt(input, pos, lineStart, curLine, 16, len, forceLen, false, errors, !throwOnInvalid));
|
|
4883
4889
|
|
|
4884
|
-
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
|
|
4889
|
-
|
|
4890
|
-
|
|
4890
|
+
if (n === null) {
|
|
4891
|
+
if (throwOnInvalid) {
|
|
4892
|
+
errors.invalidEscapeSequence(initialPos, lineStart, curLine);
|
|
4893
|
+
} else {
|
|
4894
|
+
pos = initialPos - 1;
|
|
4895
|
+
}
|
|
4896
|
+
}
|
|
4891
4897
|
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
|
|
4896
|
-
}
|
|
4898
|
+
return {
|
|
4899
|
+
code: n,
|
|
4900
|
+
pos
|
|
4901
|
+
};
|
|
4902
|
+
}
|
|
4897
4903
|
|
|
4898
|
-
function readInt
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
+
function readInt(input, pos, lineStart, curLine, radix, len, forceLen, allowNumSeparator, errors, bailOnError) {
|
|
4905
|
+
const start = pos;
|
|
4906
|
+
const forbiddenSiblings = radix === 16 ? forbiddenNumericSeparatorSiblings.hex : forbiddenNumericSeparatorSiblings.decBinOct;
|
|
4907
|
+
const isAllowedSibling = radix === 16 ? isAllowedNumericSeparatorSibling.hex : radix === 10 ? isAllowedNumericSeparatorSibling.dec : radix === 8 ? isAllowedNumericSeparatorSibling.oct : isAllowedNumericSeparatorSibling.bin;
|
|
4908
|
+
let invalid = false;
|
|
4909
|
+
let total = 0;
|
|
4904
4910
|
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
|
|
4911
|
+
for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) {
|
|
4912
|
+
const code = input.charCodeAt(pos);
|
|
4913
|
+
let val;
|
|
4908
4914
|
|
|
4909
|
-
|
|
4910
|
-
|
|
4911
|
-
|
|
4915
|
+
if (code === 95 && allowNumSeparator !== "bail") {
|
|
4916
|
+
const prev = input.charCodeAt(pos - 1);
|
|
4917
|
+
const next = input.charCodeAt(pos + 1);
|
|
4912
4918
|
|
|
4913
|
-
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
|
|
4919
|
+
if (!allowNumSeparator) {
|
|
4920
|
+
if (bailOnError) return {
|
|
4921
|
+
n: null,
|
|
4922
|
+
pos
|
|
4923
|
+
};
|
|
4924
|
+
errors.numericSeparatorInEscapeSequence(pos, lineStart, curLine);
|
|
4925
|
+
} else if (Number.isNaN(next) || !isAllowedSibling(next) || forbiddenSiblings.has(prev) || forbiddenSiblings.has(next)) {
|
|
4926
|
+
if (bailOnError) return {
|
|
4927
|
+
n: null,
|
|
4928
|
+
pos
|
|
4929
|
+
};
|
|
4930
|
+
errors.unexpectedNumericSeparator(pos, lineStart, curLine);
|
|
4931
|
+
}
|
|
4926
4932
|
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
|
|
4933
|
+
++pos;
|
|
4934
|
+
continue;
|
|
4935
|
+
}
|
|
4930
4936
|
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
4937
|
+
if (code >= 97) {
|
|
4938
|
+
val = code - 97 + 10;
|
|
4939
|
+
} else if (code >= 65) {
|
|
4940
|
+
val = code - 65 + 10;
|
|
4941
|
+
} else if (_isDigit(code)) {
|
|
4942
|
+
val = code - 48;
|
|
4943
|
+
} else {
|
|
4944
|
+
val = Infinity;
|
|
4945
|
+
}
|
|
4940
4946
|
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
|
|
4945
|
-
|
|
4946
|
-
|
|
4947
|
-
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
|
|
4955
|
-
|
|
4947
|
+
if (val >= radix) {
|
|
4948
|
+
if (val <= 9 && bailOnError) {
|
|
4949
|
+
return {
|
|
4950
|
+
n: null,
|
|
4951
|
+
pos
|
|
4952
|
+
};
|
|
4953
|
+
} else if (val <= 9 && errors.invalidDigit(pos, lineStart, curLine, radix)) {
|
|
4954
|
+
val = 0;
|
|
4955
|
+
} else if (forceLen) {
|
|
4956
|
+
val = 0;
|
|
4957
|
+
invalid = true;
|
|
4958
|
+
} else {
|
|
4959
|
+
break;
|
|
4960
|
+
}
|
|
4961
|
+
}
|
|
4956
4962
|
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
|
|
4963
|
+
++pos;
|
|
4964
|
+
total = total * radix + val;
|
|
4965
|
+
}
|
|
4960
4966
|
|
|
4961
|
-
|
|
4962
|
-
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
+
if (pos === start || len != null && pos - start !== len || invalid) {
|
|
4968
|
+
return {
|
|
4969
|
+
n: null,
|
|
4970
|
+
pos
|
|
4971
|
+
};
|
|
4972
|
+
}
|
|
4967
4973
|
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
}
|
|
4974
|
+
return {
|
|
4975
|
+
n: total,
|
|
4976
|
+
pos
|
|
4977
|
+
};
|
|
4978
|
+
}
|
|
4973
4979
|
|
|
4974
|
-
function readCodePoint
|
|
4975
|
-
|
|
4976
|
-
|
|
4980
|
+
function readCodePoint(input, pos, lineStart, curLine, throwOnInvalid, errors) {
|
|
4981
|
+
const ch = input.charCodeAt(pos);
|
|
4982
|
+
let code;
|
|
4977
4983
|
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
|
|
4984
|
+
if (ch === 123) {
|
|
4985
|
+
++pos;
|
|
4986
|
+
({
|
|
4987
|
+
code,
|
|
4988
|
+
pos
|
|
4989
|
+
} = readHexChar(input, pos, lineStart, curLine, input.indexOf("}", pos) - pos, true, throwOnInvalid, errors));
|
|
4990
|
+
++pos;
|
|
4991
|
+
|
|
4992
|
+
if (code !== null && code > 0x10ffff) {
|
|
4993
|
+
if (throwOnInvalid) {
|
|
4994
|
+
errors.invalidCodePoint(pos, lineStart, curLine);
|
|
4995
|
+
} else {
|
|
4996
|
+
return {
|
|
4997
|
+
code: null,
|
|
4998
|
+
pos
|
|
4999
|
+
};
|
|
5000
|
+
}
|
|
5001
|
+
}
|
|
5002
|
+
} else {
|
|
5003
|
+
({
|
|
5004
|
+
code,
|
|
5005
|
+
pos
|
|
5006
|
+
} = readHexChar(input, pos, lineStart, curLine, 4, false, throwOnInvalid, errors));
|
|
5007
|
+
}
|
|
4985
5008
|
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
code: null,
|
|
4992
|
-
pos
|
|
4993
|
-
};
|
|
4994
|
-
}
|
|
4995
|
-
}
|
|
4996
|
-
} else {
|
|
4997
|
-
({
|
|
4998
|
-
code,
|
|
4999
|
-
pos
|
|
5000
|
-
} = readHexChar$1(input, pos, lineStart, curLine, 4, false, throwOnInvalid, errors));
|
|
5001
|
-
}
|
|
5009
|
+
return {
|
|
5010
|
+
code,
|
|
5011
|
+
pos
|
|
5012
|
+
};
|
|
5013
|
+
}
|
|
5002
5014
|
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
pos
|
|
5006
|
-
};
|
|
5015
|
+
|
|
5016
|
+
return lib$i;
|
|
5007
5017
|
}
|
|
5008
5018
|
|
|
5009
5019
|
var constants = {};
|
|
@@ -5359,7 +5369,7 @@ function requireCore$2 () {
|
|
|
5359
5369
|
var _is = requireIs$1();
|
|
5360
5370
|
var _isValidIdentifier = isValidIdentifier$1;
|
|
5361
5371
|
var _helperValidatorIdentifier = lib$j;
|
|
5362
|
-
var _helperStringParser =
|
|
5372
|
+
var _helperStringParser = requireLib$b();
|
|
5363
5373
|
var _constants = constants;
|
|
5364
5374
|
var _utils = requireUtils$2();
|
|
5365
5375
|
const defineType = (0, _utils.defineAliasedType)("Standardized");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@putout/bundle",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"commitType": "colon",
|
|
6
6
|
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
"report": "madrun report",
|
|
32
32
|
"build": "madrun build",
|
|
33
33
|
"build:putout": "madrun build:putout",
|
|
34
|
+
"build:putout:iife": "madrun build:putout:iife",
|
|
34
35
|
"build:plugins:putout": "madrun build:plugins:putout",
|
|
35
36
|
"wisdom": "madrun wisdom"
|
|
36
37
|
},
|