jscrewit 2.37.0 → 2.39.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/Features.md +45 -28
- package/api-doc/README.md +15 -109
- package/api-doc/functions/encode.md +35 -0
- package/api-doc/interfaces/CustomFeature.md +47 -43
- package/api-doc/interfaces/ElementaryFeature.md +46 -42
- package/api-doc/interfaces/EncodeOptions.md +14 -19
- package/api-doc/interfaces/Feature.md +43 -40
- package/api-doc/interfaces/FeatureAll.md +434 -415
- package/api-doc/interfaces/FeatureConstructor.md +621 -585
- package/api-doc/interfaces/PredefinedFeature.md +48 -42
- package/api-doc/interfaces/default.md +8 -11
- package/api-doc/interfaces/encode.md +15 -18
- package/api-doc/type-aliases/ElementaryFeatureName.md +9 -0
- package/api-doc/type-aliases/FeatureElement.md +14 -0
- package/api-doc/type-aliases/FeatureElementOrCompatibleArray.md +16 -0
- package/api-doc/type-aliases/PredefinedFeatureName.md +9 -0
- package/api-doc/type-aliases/RunAs.md +10 -0
- package/api-doc/variables/Feature.md +7 -0
- package/api-doc/variables/default.md +7 -0
- package/lib/feature-all.d.ts +123 -36
- package/lib/feature.d.ts +6 -6
- package/lib/jscrewit.js +913 -191
- package/lib/jscrewit.min.js +2 -2
- package/package.json +6 -4
- package/readme.md +14 -17
- package/ui/ui.js +1 -1
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
[**JScrewIt**](../README.md) • **Docs**
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
1
5
|
# Interface: PredefinedFeature
|
|
2
6
|
|
|
3
7
|
Objects of this type indicate which of the capabilities that JScrewIt can use to minimize the
|
|
@@ -23,70 +27,56 @@ elementary features available in the current environment.
|
|
|
23
27
|
Not all features can be available at the same time: some features are necessarily incompatible,
|
|
24
28
|
meaning that they mutually exclude each other, and thus their union cannot be constructed.
|
|
25
29
|
|
|
26
|
-
##
|
|
30
|
+
## Extends
|
|
27
31
|
|
|
28
32
|
- [`Feature`](Feature.md)
|
|
29
33
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
↳↳ [`ElementaryFeature`](ElementaryFeature.md)
|
|
33
|
-
|
|
34
|
-
## Table of contents
|
|
35
|
-
|
|
36
|
-
### Properties
|
|
37
|
-
|
|
38
|
-
- [canonicalNames](PredefinedFeature.md#canonicalnames)
|
|
39
|
-
- [elementary](PredefinedFeature.md#elementary)
|
|
40
|
-
- [elementaryNames](PredefinedFeature.md#elementarynames)
|
|
41
|
-
- [name](PredefinedFeature.md#name)
|
|
42
|
-
|
|
43
|
-
### Methods
|
|
34
|
+
## Extended by
|
|
44
35
|
|
|
45
|
-
- [
|
|
46
|
-
- [restrict](PredefinedFeature.md#restrict)
|
|
36
|
+
- [`ElementaryFeature`](ElementaryFeature.md)
|
|
47
37
|
|
|
48
38
|
## Properties
|
|
49
39
|
|
|
50
40
|
### canonicalNames
|
|
51
41
|
|
|
52
|
-
|
|
42
|
+
> `readonly` **canonicalNames**: [`ElementaryFeatureName`](../type-aliases/ElementaryFeatureName.md)[]
|
|
53
43
|
|
|
54
44
|
An array of all elementary feature names included in this feature object, without aliases and
|
|
55
45
|
implied features.
|
|
56
46
|
|
|
57
47
|
#### Inherited from
|
|
58
48
|
|
|
59
|
-
[Feature](Feature.md).[canonicalNames](Feature.md#canonicalnames)
|
|
49
|
+
[`Feature`](Feature.md).[`canonicalNames`](Feature.md#canonicalnames)
|
|
60
50
|
|
|
61
|
-
|
|
51
|
+
***
|
|
62
52
|
|
|
63
53
|
### elementary
|
|
64
54
|
|
|
65
|
-
|
|
55
|
+
> `readonly` **elementary**: `boolean`
|
|
66
56
|
|
|
67
57
|
A boolean value indicating whether this is an elementary feature object.
|
|
68
58
|
|
|
69
59
|
#### Inherited from
|
|
70
60
|
|
|
71
|
-
[Feature](Feature.md).[elementary](Feature.md#elementary)
|
|
61
|
+
[`Feature`](Feature.md).[`elementary`](Feature.md#elementary)
|
|
72
62
|
|
|
73
|
-
|
|
63
|
+
***
|
|
74
64
|
|
|
75
65
|
### elementaryNames
|
|
76
66
|
|
|
77
|
-
|
|
67
|
+
> `readonly` **elementaryNames**: [`ElementaryFeatureName`](../type-aliases/ElementaryFeatureName.md)[]
|
|
78
68
|
|
|
79
69
|
An array of all elementary feature names included in this feature object, without aliases.
|
|
80
70
|
|
|
81
71
|
#### Inherited from
|
|
82
72
|
|
|
83
|
-
[Feature](Feature.md).[elementaryNames](Feature.md#elementarynames)
|
|
73
|
+
[`Feature`](Feature.md).[`elementaryNames`](Feature.md#elementarynames)
|
|
84
74
|
|
|
85
|
-
|
|
75
|
+
***
|
|
86
76
|
|
|
87
77
|
### name
|
|
88
78
|
|
|
89
|
-
|
|
79
|
+
> `readonly` **name**: [`PredefinedFeatureName`](../type-aliases/PredefinedFeatureName.md)
|
|
90
80
|
|
|
91
81
|
The primary name of this feature object, useful for identification purpose.
|
|
92
82
|
|
|
@@ -95,21 +85,19 @@ If a name is assigned, it will be used when the feature is converted into a stri
|
|
|
95
85
|
|
|
96
86
|
#### Overrides
|
|
97
87
|
|
|
98
|
-
[Feature](Feature.md).[name](Feature.md#name)
|
|
88
|
+
[`Feature`](Feature.md).[`name`](Feature.md#name)
|
|
99
89
|
|
|
100
90
|
## Methods
|
|
101
91
|
|
|
102
|
-
### includes
|
|
92
|
+
### includes()
|
|
103
93
|
|
|
104
|
-
|
|
94
|
+
> **includes**(...`features`): `boolean`
|
|
105
95
|
|
|
106
96
|
Determines whether this feature object includes all of the specified features.
|
|
107
97
|
|
|
108
98
|
#### Parameters
|
|
109
99
|
|
|
110
|
-
|
|
111
|
-
| :------ | :------ |
|
|
112
|
-
| `...features` | [`FeatureElementOrCompatibleArray`](../README.md#featureelementorcompatiblearray)[] |
|
|
100
|
+
• ...**features**: [`FeatureElementOrCompatibleArray`](../type-aliases/FeatureElementOrCompatibleArray.md)[]
|
|
113
101
|
|
|
114
102
|
#### Returns
|
|
115
103
|
|
|
@@ -120,13 +108,13 @@ If no arguments are specified, the return value is `true`.
|
|
|
120
108
|
|
|
121
109
|
#### Inherited from
|
|
122
110
|
|
|
123
|
-
[Feature](Feature.md).[includes](Feature.md#includes)
|
|
111
|
+
[`Feature`](Feature.md).[`includes`](Feature.md#includes)
|
|
124
112
|
|
|
125
|
-
|
|
113
|
+
***
|
|
126
114
|
|
|
127
|
-
### restrict
|
|
115
|
+
### restrict()
|
|
128
116
|
|
|
129
|
-
|
|
117
|
+
> **restrict**(`environment`, `engineFeatureObjs`?): [`CustomFeature`](CustomFeature.md)
|
|
130
118
|
|
|
131
119
|
Creates a new feature object from this feature by removing elementary features that are not
|
|
132
120
|
available inside a particular environment.
|
|
@@ -136,10 +124,28 @@ that require strict mode code, or inside web workers.
|
|
|
136
124
|
|
|
137
125
|
#### Parameters
|
|
138
126
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
127
|
+
• **environment**: `"forced-strict-mode"` \| `"web-worker"`
|
|
128
|
+
|
|
129
|
+
The environment to which this feature should be restricted.
|
|
130
|
+
Two environments are currently supported.
|
|
131
|
+
|
|
132
|
+
<dl>
|
|
133
|
+
|
|
134
|
+
<dt><code>"forced-strict-mode"</code></dt>
|
|
135
|
+
<dd>
|
|
136
|
+
Removes features that are not available in environments that require strict mode code.
|
|
137
|
+
</dd>
|
|
138
|
+
|
|
139
|
+
<dt><code>"web-worker"</code></dt>
|
|
140
|
+
<dd>Removes features that are not available inside web workers.</dd>
|
|
141
|
+
|
|
142
|
+
</dl>
|
|
143
|
+
|
|
144
|
+
• **engineFeatureObjs?**: readonly [`PredefinedFeature`](PredefinedFeature.md)[]
|
|
145
|
+
|
|
146
|
+
An array of predefined feature objects, each corresponding to a particular engine in which
|
|
147
|
+
the restriction should be enacted.
|
|
148
|
+
If this parameter is omitted, the restriction is enacted in all engines.
|
|
143
149
|
|
|
144
150
|
#### Returns
|
|
145
151
|
|
|
@@ -147,4 +153,4 @@ that require strict mode code, or inside web workers.
|
|
|
147
153
|
|
|
148
154
|
#### Inherited from
|
|
149
155
|
|
|
150
|
-
[Feature](Feature.md).[restrict](Feature.md#restrict)
|
|
156
|
+
[`Feature`](Feature.md).[`restrict`](Feature.md#restrict)
|
|
@@ -1,20 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
## Table of contents
|
|
1
|
+
[**JScrewIt**](../README.md) • **Docs**
|
|
4
2
|
|
|
5
|
-
|
|
3
|
+
***
|
|
6
4
|
|
|
7
|
-
|
|
8
|
-
- [encode](default.md#encode)
|
|
5
|
+
# Interface: default
|
|
9
6
|
|
|
10
7
|
## Properties
|
|
11
8
|
|
|
12
|
-
###
|
|
9
|
+
### encode
|
|
13
10
|
|
|
14
|
-
|
|
11
|
+
> **encode**: [`encode`](encode.md)
|
|
15
12
|
|
|
16
|
-
|
|
13
|
+
***
|
|
17
14
|
|
|
18
|
-
###
|
|
15
|
+
### Feature
|
|
19
16
|
|
|
20
|
-
|
|
17
|
+
> **Feature**: [`FeatureConstructor`](FeatureConstructor.md)
|
|
@@ -1,27 +1,30 @@
|
|
|
1
|
-
|
|
1
|
+
[**JScrewIt**](../README.md) • **Docs**
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
***
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
# Interface: encode()
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
> **encode**(`input`, `options`?): `string`
|
|
8
8
|
|
|
9
9
|
Encodes a given string into JSFuck.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
## Parameters
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
| :------ | :------ | :------ |
|
|
15
|
-
| `input` | `string` | The string to encode. |
|
|
16
|
-
| `options?` | [`EncodeOptions`](EncodeOptions.md) | An optional object specifying encoding options. |
|
|
13
|
+
• **input**: `string`
|
|
17
14
|
|
|
18
|
-
|
|
15
|
+
The string to encode.
|
|
16
|
+
|
|
17
|
+
• **options?**: [`EncodeOptions`](EncodeOptions.md)
|
|
18
|
+
|
|
19
|
+
An optional object specifying encoding options.
|
|
20
|
+
|
|
21
|
+
## Returns
|
|
19
22
|
|
|
20
23
|
`string`
|
|
21
24
|
|
|
22
25
|
The encoded string.
|
|
23
26
|
|
|
24
|
-
|
|
27
|
+
## Throws
|
|
25
28
|
|
|
26
29
|
An `Error` is thrown under the following circumstances.
|
|
27
30
|
- The specified string cannot be encoded with the specified options.
|
|
@@ -31,17 +34,11 @@ An `Error` is thrown under the following circumstances.
|
|
|
31
34
|
|
|
32
35
|
Also, an out of memory condition may occur when processing very large data.
|
|
33
36
|
|
|
34
|
-
## Table of contents
|
|
35
|
-
|
|
36
|
-
### Properties
|
|
37
|
-
|
|
38
|
-
- [permanentCaching](encode.md#permanentcaching)
|
|
39
|
-
|
|
40
37
|
## Properties
|
|
41
38
|
|
|
42
39
|
### permanentCaching
|
|
43
40
|
|
|
44
|
-
|
|
41
|
+
> **permanentCaching**: `boolean`
|
|
45
42
|
|
|
46
43
|
Determines whether all created encoders are cached permanently.
|
|
47
44
|
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
[**JScrewIt**](../README.md) • **Docs**
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
# Type Alias: ElementaryFeatureName
|
|
6
|
+
|
|
7
|
+
> **ElementaryFeatureName**: `"ANY_DOCUMENT"` \| `"ANY_WINDOW"` \| `"ARRAY_ITERATOR"` \| `"ARROW"` \| `"ASYNC_FUNCTION"` \| `"AT"` \| `"ATOB"` \| `"BARPROP"` \| `"CALL_ON_GLOBAL"` \| `"CAPITAL_HTML"` \| `"CONSOLE"` \| `"DOCUMENT"` \| `"DOMWINDOW"` \| `"ESC_HTML_ALL"` \| `"ESC_HTML_QUOT"` \| `"ESC_HTML_QUOT_ONLY"` \| `"ESC_REGEXP_LF"` \| `"ESC_REGEXP_SLASH"` \| `"FF_SRC"` \| `"FILL"` \| `"FLAT"` \| `"FROM_CODE_POINT"` \| `"FUNCTION_19_LF"` \| `"FUNCTION_22_LF"` \| `"GENERIC_ARRAY_TO_STRING"` \| `"GLOBAL_UNDEFINED"` \| `"GMT"` \| `"HISTORY"` \| `"HTMLAUDIOELEMENT"` \| `"IE_SRC"` \| `"INCR_CHAR"` \| `"INTL"` \| `"ITERATOR_HELPER"` \| `"JAPANESE_INFINITY"` \| `"LOCALE_INFINITY"` \| `"LOCALE_NUMERALS"` \| `"LOCALE_NUMERALS_EXT"` \| `"LOCATION"` \| `"MOZILLA"` \| `"NAME"` \| `"NODECONSTRUCTOR"` \| `"NO_FF_SRC"` \| `"NO_IE_SRC"` \| `"NO_OLD_SAFARI_ARRAY_ITERATOR"` \| `"NO_V8_SRC"` \| `"OBJECT_ARRAY_ENTRIES_CTOR"` \| `"OBJECT_L_LOCATION_CTOR"` \| `"OBJECT_UNDEFINED"` \| `"OBJECT_W_SELF"` \| `"OLD_SAFARI_LOCATION_CTOR"` \| `"PLAIN_INTL"` \| `"REGEXP_STRING_ITERATOR"` \| `"SELF_OBJ"` \| `"SHORT_LOCALES"` \| `"STATUS"` \| `"UNDEFINED"` \| `"V8_SRC"` \| `"WINDOW"`
|
|
8
|
+
|
|
9
|
+
Name of an elementary feature.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
[**JScrewIt**](../README.md) • **Docs**
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
# Type Alias: FeatureElement
|
|
6
|
+
|
|
7
|
+
> **FeatureElement**: [`Feature`](../interfaces/Feature.md) \| keyof [`FeatureAll`](../interfaces/FeatureAll.md)
|
|
8
|
+
|
|
9
|
+
A feature object or a name or alias of a predefined feature.
|
|
10
|
+
|
|
11
|
+
## Remarks
|
|
12
|
+
|
|
13
|
+
Methods that accept parameters of this type throw an error if the specified value is neither a
|
|
14
|
+
feature object nor a name or alias of a predefined feature.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
[**JScrewIt**](../README.md) • **Docs**
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
# Type Alias: FeatureElementOrCompatibleArray
|
|
6
|
+
|
|
7
|
+
> **FeatureElementOrCompatibleArray**: [`FeatureElement`](FeatureElement.md) \| readonly [`FeatureElement`](FeatureElement.md)[]
|
|
8
|
+
|
|
9
|
+
A feature object, a name or alias of a predefined feature, or an array of such values that
|
|
10
|
+
defines a union of mutually compatible features.
|
|
11
|
+
|
|
12
|
+
## Remarks
|
|
13
|
+
|
|
14
|
+
Methods that accept parameters of this type throw an error if the specified value is neither a
|
|
15
|
+
feature object nor a name or alias of a predefined feature, or if it is an array of values that
|
|
16
|
+
does not define a union of mutually compatible features.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
[**JScrewIt**](../README.md) • **Docs**
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
# Type Alias: PredefinedFeatureName
|
|
6
|
+
|
|
7
|
+
> **PredefinedFeatureName**: [`ElementaryFeatureName`](ElementaryFeatureName.md) \| `"ANDRO_4_0"` \| `"ANDRO_4_1"` \| `"ANDRO_4_4"` \| `"AUTO"` \| `"BROWSER"` \| `"CHROME_122"` \| `"COMPACT"` \| `"DEFAULT"` \| `"FF_131"` \| `"FF_90"` \| `"IE_10"` \| `"IE_11"` \| `"IE_11_WIN_10"` \| `"IE_9"` \| `"NODE_0_10"` \| `"NODE_0_12"` \| `"NODE_10"` \| `"NODE_11"` \| `"NODE_12"` \| `"NODE_13"` \| `"NODE_15"` \| `"NODE_16_0"` \| `"NODE_16_6"` \| `"NODE_22"` \| `"NODE_4"` \| `"NODE_5"` \| `"NODE_7_6"` \| `"SAFARI_10_0"` \| `"SAFARI_10_1"` \| `"SAFARI_12"` \| `"SAFARI_13"` \| `"SAFARI_14_0_1"` \| `"SAFARI_14_1"` \| `"SAFARI_15_4"` \| `"SAFARI_17_4"` \| `"SAFARI_18"` \| `"SAFARI_7_0"` \| `"SAFARI_7_1"` \| `"SAFARI_9"`
|
|
8
|
+
|
|
9
|
+
Name of a predefined feature.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
[**JScrewIt**](../README.md) • **Docs**
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
# Type Alias: RunAs
|
|
6
|
+
|
|
7
|
+
> **RunAs**: `"call"` \| `"eval"` \| `"express"` \| `"express-call"` \| `"express-eval"` \| `"none"`
|
|
8
|
+
|
|
9
|
+
Values of this type control the type of code generated from a given input.
|
|
10
|
+
See [`EncodeOptions.runAs`](../interfaces/EncodeOptions.md#runas) for the meaning of each possible value.
|