Skip to content

Commit

Permalink
Update build tools
Browse files Browse the repository at this point in the history
  • Loading branch information
fasttime committed Feb 13, 2025
1 parent cee45f1 commit 482a3d2
Show file tree
Hide file tree
Showing 20 changed files with 112 additions and 67 deletions.
2 changes: 1 addition & 1 deletion api-doc/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
**JScrewIt****Docs**
**JScrewIt**

***

Expand Down
10 changes: 7 additions & 3 deletions api-doc/functions/encode.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[**JScrewIt**](../README.md)**Docs**
[**JScrewIt**](../README.md)

***

Expand All @@ -10,11 +10,15 @@ Encodes a given string into JSFuck.

## Parameters

**input**: `string`
### input

`string`

The string to encode.

**options?**: [`EncodeOptions`](../interfaces/EncodeOptions.md)
### options?

[`EncodeOptions`](../interfaces/EncodeOptions.md)

An optional object specifying encoding options.

Expand Down
20 changes: 13 additions & 7 deletions api-doc/interfaces/CustomFeature.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[**JScrewIt**](../README.md)**Docs**
[**JScrewIt**](../README.md)

***

Expand All @@ -8,7 +8,7 @@ Objects of this type indicate which of the capabilities that JScrewIt can use to
length of its output are available in a particular JavaScript engine.

JScrewIt comes with a set of predefined feature objects exposed as property values of
`JScrewIt.Feature` or [`JScrewIt.Feature.ALL`](FeatureConstructor.md#all), where the property
`JScrewIt.Feature` or [\`JScrewIt.Feature.ALL\`](FeatureConstructor.md#all), where the property
name is the feature's name or alias.

Besides these predefined features, it is possible to construct custom features from the union or
Expand All @@ -20,8 +20,8 @@ they are different from such a union in that they exclude some other feature not
their elementary components.
All other features, called *composite* features, can be constructed as a union of zero or more
elementary features.
Two of the predefined composite features are particularly important: [`DEFAULT`](FeatureConstructor.md#default) is the empty feature, indicating that no elementary
feature is available at all; [`AUTO`](FeatureAll.md#auto) is the union of all
Two of the predefined composite features are particularly important: [\`DEFAULT\`](FeatureConstructor.md#default) is the empty feature, indicating that no elementary
feature is available at all; [\`AUTO\`](FeatureAll.md#auto) is the union of all
elementary features available in the current environment.

Not all features can be available at the same time: some features are necessarily incompatible,
Expand Down Expand Up @@ -93,7 +93,9 @@ Determines whether this feature object includes all of the specified features.

#### Parameters

• ...**features**: [`FeatureElementOrCompatibleArray`](../type-aliases/FeatureElementOrCompatibleArray.md)[]
##### features

...[`FeatureElementOrCompatibleArray`](../type-aliases/FeatureElementOrCompatibleArray.md)[]

#### Returns

Expand All @@ -120,7 +122,7 @@ that require strict mode code, or inside web workers.

#### Parameters

**environment**: `"forced-strict-mode"` \| `"web-worker"`
##### environment

The environment to which this feature should be restricted.
Two environments are currently supported.
Expand All @@ -137,7 +139,11 @@ Removes features that are not available in environments that require strict mode

</dl>

**engineFeatureObjs?**: readonly [`PredefinedFeature`](PredefinedFeature.md)[]
`"forced-strict-mode"` | `"web-worker"`

##### engineFeatureObjs?

readonly [`PredefinedFeature`](PredefinedFeature.md)[]

An array of predefined feature objects, each corresponding to a particular engine in which
the restriction should be enacted.
Expand Down
20 changes: 13 additions & 7 deletions api-doc/interfaces/ElementaryFeature.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[**JScrewIt**](../README.md)**Docs**
[**JScrewIt**](../README.md)

***

Expand All @@ -8,7 +8,7 @@ Objects of this type indicate which of the capabilities that JScrewIt can use to
length of its output are available in a particular JavaScript engine.

JScrewIt comes with a set of predefined feature objects exposed as property values of
`JScrewIt.Feature` or [`JScrewIt.Feature.ALL`](FeatureConstructor.md#all), where the property
`JScrewIt.Feature` or [\`JScrewIt.Feature.ALL\`](FeatureConstructor.md#all), where the property
name is the feature's name or alias.

Besides these predefined features, it is possible to construct custom features from the union or
Expand All @@ -20,8 +20,8 @@ they are different from such a union in that they exclude some other feature not
their elementary components.
All other features, called *composite* features, can be constructed as a union of zero or more
elementary features.
Two of the predefined composite features are particularly important: [`DEFAULT`](FeatureConstructor.md#default) is the empty feature, indicating that no elementary
feature is available at all; [`AUTO`](FeatureAll.md#auto) is the union of all
Two of the predefined composite features are particularly important: [\`DEFAULT\`](FeatureConstructor.md#default) is the empty feature, indicating that no elementary
feature is available at all; [\`AUTO\`](FeatureAll.md#auto) is the union of all
elementary features available in the current environment.

Not all features can be available at the same time: some features are necessarily incompatible,
Expand Down Expand Up @@ -93,7 +93,9 @@ Determines whether this feature object includes all of the specified features.

#### Parameters

• ...**features**: [`FeatureElementOrCompatibleArray`](../type-aliases/FeatureElementOrCompatibleArray.md)[]
##### features

...[`FeatureElementOrCompatibleArray`](../type-aliases/FeatureElementOrCompatibleArray.md)[]

#### Returns

Expand All @@ -120,7 +122,7 @@ that require strict mode code, or inside web workers.

#### Parameters

**environment**: `"forced-strict-mode"` \| `"web-worker"`
##### environment

The environment to which this feature should be restricted.
Two environments are currently supported.
Expand All @@ -137,7 +139,11 @@ Removes features that are not available in environments that require strict mode

</dl>

**engineFeatureObjs?**: readonly [`PredefinedFeature`](PredefinedFeature.md)[]
`"forced-strict-mode"` | `"web-worker"`

##### engineFeatureObjs?

readonly [`PredefinedFeature`](PredefinedFeature.md)[]

An array of predefined feature objects, each corresponding to a particular engine in which
the restriction should be enacted.
Expand Down
4 changes: 2 additions & 2 deletions api-doc/interfaces/EncodeOptions.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[**JScrewIt**](../README.md)**Docs**
[**JScrewIt**](../README.md)

***

Expand All @@ -12,7 +12,7 @@
Specifies the features available in the engines that evaluate the encoded output.

If this parameter is unspecified, [`JScrewIt.Feature.DEFAULT`](FeatureConstructor.md#default) is assumed: this ensures maximum compatibility but also generates
If this parameter is unspecified, [\`JScrewIt.Feature.DEFAULT\`](FeatureConstructor.md#default) is assumed: this ensures maximum compatibility but also generates
the largest code.
To generate shorter code, specify all features available in all target engines explicitly.

Expand Down
20 changes: 13 additions & 7 deletions api-doc/interfaces/Feature.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[**JScrewIt**](../README.md)**Docs**
[**JScrewIt**](../README.md)

***

Expand All @@ -8,7 +8,7 @@ Objects of this type indicate which of the capabilities that JScrewIt can use to
length of its output are available in a particular JavaScript engine.

JScrewIt comes with a set of predefined feature objects exposed as property values of
`JScrewIt.Feature` or [`JScrewIt.Feature.ALL`](FeatureConstructor.md#all), where the property
`JScrewIt.Feature` or [\`JScrewIt.Feature.ALL\`](FeatureConstructor.md#all), where the property
name is the feature's name or alias.

Besides these predefined features, it is possible to construct custom features from the union or
Expand All @@ -20,8 +20,8 @@ they are different from such a union in that they exclude some other feature not
their elementary components.
All other features, called *composite* features, can be constructed as a union of zero or more
elementary features.
Two of the predefined composite features are particularly important: [`DEFAULT`](FeatureConstructor.md#default) is the empty feature, indicating that no elementary
feature is available at all; [`AUTO`](FeatureAll.md#auto) is the union of all
Two of the predefined composite features are particularly important: [\`DEFAULT\`](FeatureConstructor.md#default) is the empty feature, indicating that no elementary
feature is available at all; [\`AUTO\`](FeatureAll.md#auto) is the union of all
elementary features available in the current environment.

Not all features can be available at the same time: some features are necessarily incompatible,
Expand Down Expand Up @@ -78,7 +78,9 @@ Determines whether this feature object includes all of the specified features.

#### Parameters

• ...**features**: [`FeatureElementOrCompatibleArray`](../type-aliases/FeatureElementOrCompatibleArray.md)[]
##### features

...[`FeatureElementOrCompatibleArray`](../type-aliases/FeatureElementOrCompatibleArray.md)[]

#### Returns

Expand All @@ -101,7 +103,7 @@ that require strict mode code, or inside web workers.

#### Parameters

**environment**: `"forced-strict-mode"` \| `"web-worker"`
##### environment

The environment to which this feature should be restricted.
Two environments are currently supported.
Expand All @@ -118,7 +120,11 @@ Removes features that are not available in environments that require strict mode

</dl>

**engineFeatureObjs?**: readonly [`PredefinedFeature`](PredefinedFeature.md)[]
`"forced-strict-mode"` | `"web-worker"`

##### engineFeatureObjs?

readonly [`PredefinedFeature`](PredefinedFeature.md)[]

An array of predefined feature objects, each corresponding to a particular engine in which
the restriction should be enacted.
Expand Down
2 changes: 1 addition & 1 deletion api-doc/interfaces/FeatureAll.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[**JScrewIt**](../README.md)**Docs**
[**JScrewIt**](../README.md)

***

Expand Down
40 changes: 26 additions & 14 deletions api-doc/interfaces/FeatureConstructor.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[**JScrewIt**](../README.md)**Docs**
[**JScrewIt**](../README.md)

***

Expand All @@ -15,11 +15,13 @@ Creates a new feature object from the union of the specified features.
The constructor can be used with or without the `new` operator, e.g.
`new JScrewIt.Feature(feature1, feature2)` or `JScrewIt.Feature(feature1, feature2)`.
If no arguments are specified, the new feature object will be equivalent to
[`DEFAULT`](FeatureAll.md#default).
[\`DEFAULT\`](FeatureAll.md#default).

## Parameters

• ...**features**: [`FeatureElementOrCompatibleArray`](../type-aliases/FeatureElementOrCompatibleArray.md)[]
### features

...[`FeatureElementOrCompatibleArray`](../type-aliases/FeatureElementOrCompatibleArray.md)[]

## Returns

Expand All @@ -28,7 +30,7 @@ If no arguments are specified, the new feature object will be equivalent to
## Example

The following statements are equivalent, and will all construct a new feature object
including both [`ANY_DOCUMENT`](FeatureAll.md#any_document) and [`ANY_WINDOW`](FeatureConstructor.md#any_window).
including both [\`ANY\_DOCUMENT\`](FeatureAll.md#any_document) and [\`ANY\_WINDOW\`](FeatureConstructor.md#any_window).

```js
new JScrewIt.Feature("ANY_DOCUMENT", "ANY_WINDOW");
Expand Down Expand Up @@ -57,11 +59,13 @@ Creates a new feature object from the union of the specified features.
The constructor can be used with or without the `new` operator, e.g.
`new JScrewIt.Feature(feature1, feature2)` or `JScrewIt.Feature(feature1, feature2)`.
If no arguments are specified, the new feature object will be equivalent to
[`DEFAULT`](FeatureAll.md#default).
[\`DEFAULT\`](FeatureAll.md#default).

#### Parameters

• ...**features**: [`FeatureElementOrCompatibleArray`](../type-aliases/FeatureElementOrCompatibleArray.md)[]
##### features

...[`FeatureElementOrCompatibleArray`](../type-aliases/FeatureElementOrCompatibleArray.md)[]

#### Returns

Expand All @@ -70,7 +74,7 @@ If no arguments are specified, the new feature object will be equivalent to
#### Example

The following statements are equivalent, and will all construct a new feature object
including both [`ANY_DOCUMENT`](FeatureAll.md#any_document) and [`ANY_WINDOW`](FeatureConstructor.md#any_window).
including both [\`ANY\_DOCUMENT\`](FeatureAll.md#any_document) and [\`ANY\_WINDOW\`](FeatureConstructor.md#any_window).

```js
JScrewIt.Feature("ANY_DOCUMENT", "ANY_WINDOW");
Expand Down Expand Up @@ -1712,7 +1716,9 @@ Determines whether the specified features are mutually compatible.

#### Parameters

• ...**features**: [`FeatureElement`](../type-aliases/FeatureElement.md)[]
##### features

...[`FeatureElement`](../type-aliases/FeatureElement.md)[]

#### Returns

Expand Down Expand Up @@ -1746,7 +1752,9 @@ features, regardless of any other difference.

#### Parameters

• ...**features**: [`FeatureElementOrCompatibleArray`](../type-aliases/FeatureElementOrCompatibleArray.md)[]
##### features

...[`FeatureElementOrCompatibleArray`](../type-aliases/FeatureElementOrCompatibleArray.md)[]

#### Returns

Expand Down Expand Up @@ -1777,7 +1785,9 @@ Creates a new feature object equivalent to the intersection of the specified fea

#### Parameters

• ...**features**: [`FeatureElementOrCompatibleArray`](../type-aliases/FeatureElementOrCompatibleArray.md)[]
##### features

...[`FeatureElementOrCompatibleArray`](../type-aliases/FeatureElementOrCompatibleArray.md)[]

#### Returns

Expand All @@ -1787,14 +1797,14 @@ A feature object, or `null` if no arguments are specified.

#### Example

This will create a new feature object equivalent to [`NAME`](FeatureAll.md#name).
This will create a new feature object equivalent to [\`NAME\`](FeatureAll.md#name).

```js
const newFeature = JScrewIt.Feature.commonOf(["ATOB", "NAME"], ["NAME", "SELF"]);
```

This will create a new feature object equivalent to [FeatureConstructor.ANY_WINDOW | `ANY_WINDOW`](FeatureAll.md#any_window).
This is because both [`DOMWINDOW`](FeatureAll.md#domwindow) and [`WINDOW`](FeatureConstructor.md#window) imply [FeatureConstructor.ANY_WINDOW | `ANY_WINDOW`](FeatureAll.md#any_window).
This will create a new feature object equivalent to [FeatureConstructor.ANY\_WINDOW \| \`ANY\_WINDOW\`](FeatureAll.md#any_window).
This is because both [\`DOMWINDOW\`](FeatureAll.md#domwindow) and [\`WINDOW\`](FeatureConstructor.md#window) imply [FeatureConstructor.ANY\_WINDOW \| \`ANY\_WINDOW\`](FeatureAll.md#any_window).

```js
const newFeature = JScrewIt.Feature.commonOf("DOMWINDOW", "WINDOW");
Expand All @@ -1810,7 +1820,9 @@ Returns a short description of a predefined feature in plain English.

#### Parameters

**name**: keyof [`FeatureAll`](FeatureAll.md)
##### name

keyof [`FeatureAll`](FeatureAll.md)

A name or alias of a predefined feature.

Expand Down
Loading

0 comments on commit 482a3d2

Please sign in to comment.