@poe-platform/safe-js 0.1.458 → 0.1.460
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/dist/safe-js/chunks/{chunk-GPAQUL2B.js → chunk-BJWRB7U7.js} +49 -43
- package/dist/safe-js/chunks/{chunk-GPAQUL2B.js.map → chunk-BJWRB7U7.js.map} +2 -2
- package/dist/safe-js/chunks/{chunk-JU4NFCTY.js → chunk-CVOUIR2A.js} +2 -2
- package/dist/safe-js/cli.js +2 -2
- package/dist/safe-js/core.js +1 -1
- package/dist/safe-js/index.js +2 -2
- package/package.json +2 -2
- /package/dist/safe-js/chunks/{chunk-JU4NFCTY.js.map → chunk-CVOUIR2A.js.map} +0 -0
|
@@ -19733,8 +19733,9 @@ function getNumberMember(property, budget) {
|
|
|
19733
19733
|
}
|
|
19734
19734
|
return createSandboxClosure({
|
|
19735
19735
|
sandbox: true,
|
|
19736
|
-
|
|
19737
|
-
|
|
19736
|
+
guest: true,
|
|
19737
|
+
name: property,
|
|
19738
|
+
length: property === "toLocaleString" ? 0 : 1,
|
|
19738
19739
|
call: (args, context) => callNumberMethod(context?.thisValue, property, args, budget, context)
|
|
19739
19740
|
});
|
|
19740
19741
|
}
|
|
@@ -19867,41 +19868,42 @@ async function compareStringLocale(value, args, budget, context) {
|
|
|
19867
19868
|
}
|
|
19868
19869
|
|
|
19869
19870
|
// packages/safe-js/src/interp/methods/string.ts
|
|
19870
|
-
var
|
|
19871
|
-
|
|
19872
|
-
|
|
19873
|
-
|
|
19874
|
-
|
|
19875
|
-
|
|
19876
|
-
|
|
19877
|
-
|
|
19878
|
-
|
|
19879
|
-
|
|
19880
|
-
|
|
19881
|
-
|
|
19882
|
-
|
|
19883
|
-
|
|
19884
|
-
|
|
19885
|
-
|
|
19886
|
-
|
|
19887
|
-
|
|
19888
|
-
|
|
19889
|
-
|
|
19890
|
-
|
|
19891
|
-
|
|
19892
|
-
|
|
19893
|
-
|
|
19894
|
-
|
|
19895
|
-
|
|
19896
|
-
|
|
19897
|
-
|
|
19898
|
-
|
|
19899
|
-
|
|
19900
|
-
|
|
19901
|
-
|
|
19902
|
-
|
|
19903
|
-
|
|
19904
|
-
|
|
19871
|
+
var stringMethodLengths = {
|
|
19872
|
+
at: 1,
|
|
19873
|
+
charAt: 1,
|
|
19874
|
+
charCodeAt: 1,
|
|
19875
|
+
codePointAt: 1,
|
|
19876
|
+
concat: 1,
|
|
19877
|
+
endsWith: 1,
|
|
19878
|
+
includes: 1,
|
|
19879
|
+
indexOf: 1,
|
|
19880
|
+
isWellFormed: 0,
|
|
19881
|
+
lastIndexOf: 1,
|
|
19882
|
+
localeCompare: 1,
|
|
19883
|
+
match: 1,
|
|
19884
|
+
matchAll: 1,
|
|
19885
|
+
normalize: 0,
|
|
19886
|
+
padEnd: 1,
|
|
19887
|
+
padStart: 1,
|
|
19888
|
+
repeat: 1,
|
|
19889
|
+
replace: 2,
|
|
19890
|
+
replaceAll: 2,
|
|
19891
|
+
slice: 2,
|
|
19892
|
+
search: 1,
|
|
19893
|
+
split: 2,
|
|
19894
|
+
startsWith: 1,
|
|
19895
|
+
substr: 2,
|
|
19896
|
+
substring: 2,
|
|
19897
|
+
toLowerCase: 0,
|
|
19898
|
+
toUpperCase: 0,
|
|
19899
|
+
toLocaleLowerCase: 0,
|
|
19900
|
+
toLocaleUpperCase: 0,
|
|
19901
|
+
toWellFormed: 0,
|
|
19902
|
+
trim: 0,
|
|
19903
|
+
trimEnd: 0,
|
|
19904
|
+
trimStart: 0
|
|
19905
|
+
};
|
|
19906
|
+
var stringMethodNames = new Set(Object.keys(stringMethodLengths));
|
|
19905
19907
|
function getStringMember(value, property, budget) {
|
|
19906
19908
|
const index = getStringIndex(property);
|
|
19907
19909
|
if (index !== void 0) {
|
|
@@ -19915,10 +19917,9 @@ function getStringMember(value, property, budget) {
|
|
|
19915
19917
|
}
|
|
19916
19918
|
return createSandboxClosure({
|
|
19917
19919
|
sandbox: true,
|
|
19918
|
-
|
|
19919
|
-
|
|
19920
|
-
|
|
19921
|
-
...property === "isWellFormed" || property === "toWellFormed" ? { length: 0 } : {},
|
|
19920
|
+
guest: true,
|
|
19921
|
+
name: property,
|
|
19922
|
+
length: stringMethodLengths[property],
|
|
19922
19923
|
call: async (args, context) => {
|
|
19923
19924
|
const receiver = context?.thisValue;
|
|
19924
19925
|
if (receiver === null || receiver === void 0) {
|
|
@@ -20728,6 +20729,7 @@ function createPrimitiveConstructor(options, budget) {
|
|
|
20728
20729
|
"valueOf",
|
|
20729
20730
|
createSandboxClosure({
|
|
20730
20731
|
sandbox: true,
|
|
20732
|
+
guest: true,
|
|
20731
20733
|
name: "valueOf",
|
|
20732
20734
|
length: 0,
|
|
20733
20735
|
call: (_args, context) => primitiveReceiver(context?.thisValue, kind)
|
|
@@ -20741,13 +20743,17 @@ function createPrimitiveConstructor(options, budget) {
|
|
|
20741
20743
|
"toString",
|
|
20742
20744
|
createSandboxClosure({
|
|
20743
20745
|
sandbox: true,
|
|
20746
|
+
guest: true,
|
|
20744
20747
|
name: "toString",
|
|
20745
20748
|
length: 0,
|
|
20746
20749
|
call: (_args, context) => budget.allocateString(String(primitiveReceiver(context?.thisValue, kind)))
|
|
20747
20750
|
})
|
|
20748
20751
|
);
|
|
20749
|
-
if (kind === "string")
|
|
20752
|
+
if (kind === "string") {
|
|
20750
20753
|
for (const name of stringMethodNames) methods3.set(name, getStringMember("", name, budget));
|
|
20754
|
+
methods3.set("trimLeft", methods3.get("trimStart"));
|
|
20755
|
+
methods3.set("trimRight", methods3.get("trimEnd"));
|
|
20756
|
+
}
|
|
20751
20757
|
}
|
|
20752
20758
|
for (const [name, value] of methods3)
|
|
20753
20759
|
Object.defineProperty(prototype, name, { value, writable: true, configurable: true });
|
|
@@ -56299,4 +56305,4 @@ The above copyright notice and this permission notice shall be included in all c
|
|
|
56299
56305
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
56300
56306
|
|
|
56301
56307
|
*/
|
|
56302
|
-
//# sourceMappingURL=chunk-
|
|
56308
|
+
//# sourceMappingURL=chunk-BJWRB7U7.js.map
|