Skip to content

Commit

Permalink
New unreturnable word await
Browse files Browse the repository at this point in the history
  • Loading branch information
fasttime committed Mar 22, 2024
1 parent 3ed279a commit 7291da1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 44 deletions.
50 changes: 6 additions & 44 deletions api-doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@

### Variables

- [Feature](README.md#feature)
- [default](README.md#default)

### Functions

- [Feature](README.md#feature)
- [encode](README.md#encode)

## Type Aliases
Expand Down Expand Up @@ -86,55 +86,17 @@ See [`EncodeOptions.runAs`](interfaces/EncodeOptions.md#runas) for the meaning o

## Variables

### default

**default**: [`default`](interfaces/default.md)

## Functions

### Feature

**Feature**(`...features`): [`CustomFeature`](interfaces/CustomFeature.md)

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`](interfaces/FeatureAll.md#default).

#### Parameters

| Name | Type |
| :------ | :------ |
| `...features` | [`FeatureElementOrCompatibleArray`](README.md#featureelementorcompatiblearray)[] |
**Feature**: [`FeatureConstructor`](interfaces/FeatureConstructor.md)

#### Returns

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

**`Example`**

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

```js
new JScrewIt.Feature("ANY_DOCUMENT", "ANY_WINDOW");
```

```js
new JScrewIt.Feature(JScrewIt.Feature.ANY_DOCUMENT, JScrewIt.Feature.ANY_WINDOW);
```

```js
new JScrewIt.Feature([JScrewIt.Feature.ANY_DOCUMENT, JScrewIt.Feature.ANY_WINDOW]);
```
___

**`Throws`**
### default

An error is thrown if any of the specified features are not mutually compatible.
**default**: [`default`](interfaces/default.md)

___
## Functions

### encode

Expand Down
1 change: 1 addition & 0 deletions src/lib/express-parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,7 @@ var INESCAPABLE_WORDS = ['false', 'null', 'true'];
var UNRETURNABLE_WORDS =
[
'arguments', // shadowed in function body
'await', // may be an identifier in non-strict mode
'debugger', // : debugger;
'delete', // : delete(x);
'if', // : if(x);
Expand Down

0 comments on commit 7291da1

Please sign in to comment.