Skip to content

Commit

Permalink
Add new native object properties and functions (#1330)
Browse files Browse the repository at this point in the history
* Add new native object properties

* Update lib/compress/native-objects.js

* Update lib/compress/native-objects.js

Co-authored-by: F谩bio Santos <fabiosantosart@gmail.com>
  • Loading branch information
LeoDog896 and fabiosantoscode committed Jan 12, 2023
1 parent 78e60a2 commit 8b966d6
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions lib/compress/native-objects.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ const object_methods = [

export const is_pure_native_method = make_nested_lookup({
Array: [
"at",
"flat",
"includes",
"indexOf",
"join",
"lastIndexOf",
Expand All @@ -99,22 +102,41 @@ export const is_pure_native_method = make_nested_lookup({
...object_methods,
],
String: [
"at",
"charAt",
"charCodeAt",
"charPointAt",
"concat",
"endsWith",
"fromCharCode",
"fromCodePoint",
"includes",
"indexOf",
"italics",
"lastIndexOf",
"localeCompare",
"match",
"matchAll",
"normalize",
"padStart",
"padEnd",
"repeat",
"replace",
"replaceAll",
"search",
"slice",
"split",
"startsWith",
"substr",
"substring",
"repeat",
"toLocaleLowerCase",
"toLocaleUpperCase",
"toLowerCase",
"toUpperCase",
"trim",
"trimEnd",
"trimStart",
...object_methods,
],
});
Expand Down

0 comments on commit 8b966d6

Please sign in to comment.