Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,047 changes: 2,047 additions & 0 deletions src/reference/modules/caido/crypto.md

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions src/reference/modules/caido/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ A [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) encapsulates i

##### Constructor

> **new Blob**(`parts`: (`string` \| `ArrayBuffer` \| [`Blob`](#blob))[], `opts?`: [`BlobOpts`](#blobopts)): [`Blob`](#blob)
> **new Blob**(`parts`: (`string` \| [`Blob`](#blob) \| `ArrayBuffer`)[], `opts?`: [`BlobOpts`](#blobopts)): [`Blob`](#blob)

Creates a new `Blob` object containing a concatenation of the given sources.

Expand All @@ -29,7 +29,7 @@ String sources are also copied into the `Blob`.

| Parameter | Type |
| ------ | ------ |
| `parts` | (`string` \| `ArrayBuffer` \| [`Blob`](#blob))[] |
| `parts` | (`string` \| [`Blob`](#blob) \| `ArrayBuffer`)[] |
| `opts?` | [`BlobOpts`](#blobopts) |

###### Returns
Expand Down Expand Up @@ -116,15 +116,15 @@ A [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) encapsulates i

##### Constructor

> **new File**(`data`: (`string` \| `ArrayBuffer` \| [`Blob`](#blob))[], `fileName`: `string`, `opts?`: [`FileOpts`](#fileopts)): [`File`](#file)
> **new File**(`data`: (`string` \| [`Blob`](#blob) \| `ArrayBuffer`)[], `fileName`: `string`, `opts?`: [`FileOpts`](#fileopts)): [`File`](#file)

Returns a newly constructed File.

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `data` | (`string` \| `ArrayBuffer` \| [`Blob`](#blob))[] |
| `data` | (`string` \| [`Blob`](#blob) \| `ArrayBuffer`)[] |
| `fileName` | `string` |
| `opts?` | [`FileOpts`](#fileopts) |

Expand Down
48 changes: 30 additions & 18 deletions src/reference/modules/index.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,33 @@
# @caido/quickjs-types
# QuickJS Modules

Here is the reference of the modules available in our engine.

This documentation is auto-generated from the Typescript typing ([`@caido/quickjs-types`](https://www.npmjs.com/package/@caido/quickjs-types)) which is the source of truth.

Some elements are similar to `Node.JS`, but some imports will be different and start with `caido:`.

## Modules

| Module | Description |
| ------ | ------ |
| [caido/http](caido/http.md) | - |
| [extra/console](extra/console.md) | - |
| [extra/os](extra/os.md) | - |
| [extra/sqlite](extra/sqlite.md) | - |
| [extra/timers](extra/timers.md) | - |
| [llrt/abort](llrt/abort.md) | - |
| [llrt/buffer](llrt/buffer.md) | - |
| [llrt/child\_process](llrt/child_process.md) | - |
| [llrt/dom-events](llrt/dom-events.md) | - |
| [llrt/fs](llrt/fs/index.md) | - |
| [llrt/globals](llrt/globals/index.md) | - |
| [llrt/net](llrt/net.md) | - |
| [llrt/path](llrt/path/index.md) | - |
| [llrt/process](llrt/process/index.md) | - |
| [llrt/stream](llrt/stream/index.md) | - |
| Module | Description | Import | Global |
| ---------------------------------------- | ------------------------ | ------------------ | ------ |
| [abort](llrt/abort.md) | Abort signaling | N/A | ✔︎ |
| [buffer](llrt/buffer.md) | Buffers | `buffer` | ✔︎ |
| [child_process](llrt/child_process.md) | Process spawning | `child_process` | ✘ |
| [console](extra/console.md) | Console logging | N/A | ✔︎ |
| [crypto](caido/crypto.md) | Cryptographic primitives | `crypto` | ✘ |
| [dom-events](llrt/dom-events.md) | Event Listeners | N/A | ✔︎ |
| [dns](llrt/dns.md) | DNS | `dns` | ✘ |
| [events](llrt/events.md) | Event Emitter | `events` | ✘ |
| [fs](llrt/fs/index.md) | File system | `fs`, `fs/promise` | ✘ |
| [http](caido/http.md) | Fetch implementation | `caido:http` | ✘ |
| [https](llrt/https.md) | HTTPS | `https` | ✘ |
| [globals](llrt/globals/index.md) | Global classes | N/A | ✔︎ |
| [net](llrt/net.md) | Sockets | `net` | ✘ |
| [os](extra/os.md) | OS information | `os` | ✘ |
| [path](llrt/path/index.md) | Path transformation | `path` | ✘ |
| [sqlite](extra/sqlite.md) | SQlite access | `sqlite` | ✘ |
| [stream](llrt/stream/stream.md) | Streams (basic) | `stream` | ✔︎ |
| [stream/web](llrt/stream/web/index.md) | Streams Web | `stream/web` | ✘ |
| [string_decoder](llrt/string_decoder.md) | String Decoder | `string_decoder` | ✘ |
| [timers](extra/timers.md) | Timers | N/A | ✔︎ |
| [url](llrt/url/index.md) | URL utilities | `url` | ✔︎ |
4 changes: 2 additions & 2 deletions src/reference/modules/llrt/buffer.md
Original file line number Diff line number Diff line change
Expand Up @@ -1640,7 +1640,7 @@ A `TypeError` will be thrown if `size` is not a number.

##### byteLength()

> **byteLength**(`string`: `string` \| `ArrayBuffer` \| `SharedArrayBuffer` \| [`ArrayBufferView`](globals/namespaces/QuickJS.md#arraybufferview) \| [`Buffer`](#buffer), `encoding?`: [`BufferEncoding`](#bufferencoding)): `number`
> **byteLength**(`string`: `string` \| [`ArrayBufferView`](globals/namespaces/QuickJS.md#arraybufferview) \| [`Buffer`](#buffer) \| `ArrayBuffer` \| `SharedArrayBuffer`, `encoding?`: [`BufferEncoding`](#bufferencoding)): `number`

Returns the byte length of a string when encoded using `encoding`.
This is not the same as [`String.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/length), which does not account
Expand All @@ -1665,7 +1665,7 @@ er.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuf

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `string` | `string` \| `ArrayBuffer` \| `SharedArrayBuffer` \| [`ArrayBufferView`](globals/namespaces/QuickJS.md#arraybufferview) \| [`Buffer`](#buffer) | A value to calculate the length of. |
| `string` | `string` \| [`ArrayBufferView`](globals/namespaces/QuickJS.md#arraybufferview) \| [`Buffer`](#buffer) \| `ArrayBuffer` \| `SharedArrayBuffer` | A value to calculate the length of. |
| `encoding?` | [`BufferEncoding`](#bufferencoding) | If `string` is a string, this is its encoding. |

###### Returns
Expand Down
22 changes: 11 additions & 11 deletions src/reference/modules/llrt/child_process.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use the [spawn](#spawn) method to create instances of `ChildProcess`.

#### Extends

- [`EventEmitter`](globals/index.md#eventemitter)
- [`EventEmitter`](events.md#eventemitter)

#### Extended by

Expand All @@ -32,7 +32,7 @@ use the [spawn](#spawn) method to create instances of `ChildProcess`.

###### Inherited from

[`EventEmitter`](globals/index.md#eventemitter).[`constructor`](globals/index.md#constructor)
[`EventEmitter`](events.md#eventemitter).[`constructor`](events.md#constructor)

#### Properties

Expand Down Expand Up @@ -143,7 +143,7 @@ events.EventEmitter

###### Overrides

[`EventEmitter`](globals/index.md#eventemitter).[`addListener`](globals/index.md#addlistener)
[`EventEmitter`](events.md#eventemitter).[`addListener`](events.md#addlistener)

###### Call Signature

Expand Down Expand Up @@ -265,7 +265,7 @@ myEmitter.emit('event', 1, 2, 3, 4, 5);

###### Overrides

[`EventEmitter`](globals/index.md#eventemitter).[`emit`](globals/index.md#emit)
[`EventEmitter`](events.md#eventemitter).[`emit`](events.md#emit)

###### Call Signature

Expand Down Expand Up @@ -353,7 +353,7 @@ console.log(myEE.eventNames());

###### Inherited from

[`EventEmitter`](globals/index.md#eventemitter).[`eventNames`](globals/index.md#eventnames)
[`EventEmitter`](events.md#eventemitter).[`eventNames`](events.md#eventnames)

##### kill()

Expand Down Expand Up @@ -451,7 +451,7 @@ Alias for `emitter.removeListener()`.

###### Inherited from

[`EventEmitter`](globals/index.md#eventemitter).[`off`](globals/index.md#off)
[`EventEmitter`](events.md#eventemitter).[`off`](events.md#off)

##### on()

Expand Down Expand Up @@ -499,7 +499,7 @@ myEE.emit('foo');

###### Overrides

[`EventEmitter`](globals/index.md#eventemitter).[`on`](globals/index.md#on)
[`EventEmitter`](events.md#eventemitter).[`on`](events.md#on)

###### Call Signature

Expand Down Expand Up @@ -600,7 +600,7 @@ v0.3.0

###### Overrides

[`EventEmitter`](globals/index.md#eventemitter).[`once`](globals/index.md#once)
[`EventEmitter`](events.md#eventemitter).[`once`](events.md#once)

###### Call Signature

Expand Down Expand Up @@ -685,7 +685,7 @@ Returns a reference to the `EventEmitter`, so that calls can be chained.

###### Overrides

[`EventEmitter`](globals/index.md#eventemitter).[`prependListener`](globals/index.md#prependlistener)
[`EventEmitter`](events.md#eventemitter).[`prependListener`](events.md#prependlistener)

###### Call Signature

Expand Down Expand Up @@ -768,7 +768,7 @@ Returns a reference to the `EventEmitter`, so that calls can be chained.

###### Overrides

[`EventEmitter`](globals/index.md#eventemitter).[`prependOnceListener`](globals/index.md#prependoncelistener)
[`EventEmitter`](events.md#eventemitter).[`prependOnceListener`](events.md#prependoncelistener)

###### Call Signature

Expand Down Expand Up @@ -921,7 +921,7 @@ Returns a reference to the `EventEmitter`, so that calls can be chained.

###### Inherited from

[`EventEmitter`](globals/index.md#eventemitter).[`removeListener`](globals/index.md#removelistener)
[`EventEmitter`](events.md#eventemitter).[`removeListener`](events.md#removelistener)

## Interfaces

Expand Down
Loading
Loading