jscrewit 2.41.0 → 3.0.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.
@@ -128,6 +128,8 @@ that require strict mode code, or inside web workers.
128
128
 
129
129
  ##### environment
130
130
 
131
+ `"forced-strict-mode"` \| `"web-worker"`
132
+
131
133
  The environment to which this feature should be restricted.
132
134
  Two environments are currently supported.
133
135
 
@@ -143,8 +145,6 @@ Removes features that are not available in environments that require strict mode
143
145
 
144
146
  </dl>
145
147
 
146
- `"forced-strict-mode"` | `"web-worker"`
147
-
148
148
  ##### engineFeatureObjs?
149
149
 
150
150
  readonly `PredefinedFeature`[]
@@ -8,7 +8,7 @@
8
8
 
9
9
  ### encode
10
10
 
11
- > **encode**: [`encode`](encode.md)
11
+ > **encode**: [`EncodeInterface`](EncodeInterface.md)
12
12
 
13
13
  ***
14
14
 
@@ -4,6 +4,6 @@
4
4
 
5
5
  # Type Alias: ElementaryFeatureName
6
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_BN"` \| `"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"`
7
+ > **ElementaryFeatureName** = `"ARRAY_ITERATOR"` \| `"ARROW"` \| `"AT"` \| `"BARPROP"` \| `"CAPITAL_HTML"` \| `"CONSOLE"` \| `"DOCUMENT"` \| `"ESC_HTML_QUOT"` \| `"FF_SRC"` \| `"FILL"` \| `"FLAT"` \| `"FROM_CODE_POINT"` \| `"FUNCTION_19_LF"` \| `"FUNCTION_22_LF"` \| `"IE_SRC"` \| `"INCR_CHAR"` \| `"ITERATOR_HELPER"` \| `"LOCALE_INFINITY"` \| `"LOCALE_NUMERALS_BN"` \| `"LOCALE_NUMERALS_EXT"` \| `"NAME"` \| `"NO_FF_SRC"` \| `"NO_IE_SRC"` \| `"NO_V8_SRC"` \| `"OBJECT_ARRAY_ENTRIES_CTOR"` \| `"OBJECT_W_SELF"` \| `"PLAIN_INTL"` \| `"REGEXP_STRING_ITERATOR"` \| `"SELF"` \| `"SHORT_LOCALES"` \| `"STATUS"` \| `"V8_SRC"` \| `"WINDOW"`
8
8
 
9
9
  Name of an elementary feature.
@@ -4,6 +4,6 @@
4
4
 
5
5
  # Type Alias: PredefinedFeatureName
6
6
 
7
- > **PredefinedFeatureName** = [`ElementaryFeatureName`](ElementaryFeatureName.md) \| `"ANDRO_4_0"` \| `"ANDRO_4_1"` \| `"ANDRO_4_4"` \| `"AUTO"` \| `"BROWSER"` \| `"CHROME_122"` \| `"COMPACT"` \| `"DEFAULT"` \| `"FF_131"` \| `"FF_134"` \| `"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_22_12"` \| `"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_0"` \| `"SAFARI_18_4"` \| `"SAFARI_7_0"` \| `"SAFARI_7_1"` \| `"SAFARI_9"`
7
+ > **PredefinedFeatureName** = [`ElementaryFeatureName`](ElementaryFeatureName.md) \| `"AUTO"` \| `"BROWSER"` \| `"CHROME_122"` \| `"COMPACT"` \| `"DEFAULT"` \| `"FF_131"` \| `"FF_134"` \| `"FF_90"` \| `"IE_11"` \| `"IE_11_WIN_10"` \| `"NODE_20"` \| `"NODE_22"` \| `"NODE_22_12"` \| `"SAFARI_17_4"` \| `"SAFARI_18_0"` \| `"SAFARI_18_4"`
8
8
 
9
9
  Name of a predefined feature.
package/lib/encode.d.ts CHANGED
@@ -60,7 +60,7 @@ export interface EncodeOptions
60
60
  *
61
61
  * </dl>
62
62
  */
63
- runAs?: RunAs | undefined;
63
+ runAs?: EncodeOptions.RunAs | undefined;
64
64
 
65
65
  /**
66
66
  * If this parameter is truthy, lines in the beginning and in the end of the file containing
@@ -76,16 +76,20 @@ export interface EncodeOptions
76
76
  trimCode?: boolean | undefined;
77
77
 
78
78
  /** An alias for `runAs`. */
79
- wrapWith?: RunAs | undefined;
79
+ wrapWith?: EncodeOptions.RunAs | undefined;
80
80
  }
81
81
 
82
- /**
83
- * Values of this type control the type of code generated from a given input.
84
- * See {@link EncodeOptions.runAs | `EncodeOptions.runAs`} for the meaning of each possible value.
85
- */
86
- type RunAs = 'call' | 'eval' | 'express' | 'express-call' | 'express-eval' | 'none';
82
+ export namespace EncodeOptions
83
+ {
84
+ /**
85
+ * Values of this type control the type of code generated from a given input.
86
+ * See {@link EncodeOptions.runAs | `EncodeOptions.runAs`} for the meaning of each possible
87
+ * value.
88
+ */
89
+ type RunAs = 'call' | 'eval' | 'express' | 'express-call' | 'express-eval' | 'none';
90
+ }
87
91
 
88
- interface encode
92
+ export interface EncodeInterface
89
93
  {
90
94
  /**
91
95
  * Encodes a given string into JSFuck.
@@ -152,5 +156,3 @@ interface encode
152
156
  */
153
157
  permanentCaching: boolean;
154
158
  }
155
-
156
- export const encode: encode;