Skip to content
Open
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 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"parserOptions": {
"sourceType": "module"
},
"ignorePatterns": [ "/dist/**" ],
"ignorePatterns": [ "/lib/**" ],
"overrides": [
{
"files": ["**/*.ts"],
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
*.png
node_modules
dist
lib
temp
package-lock.json
.idea
.nyc_output
Expand Down
427 changes: 427 additions & 0 deletions config/api-extractor.jsonc

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions doc/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md)

## API Reference

## Packages

| Package | Description |
| --- | --- |
| [node-id3](./node-id3.md) | An ID3-Tag library written in Typescript. |

24 changes: 24 additions & 0 deletions doc/node-id3.create.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [node-id3](./node-id3.md) &gt; [create](./node-id3.create.md)

## create() function

Creates a buffer containing an ID3 Tag and returns it.

**Signature:**

```typescript
export declare function create(tags: WriteTags): Buffer;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| tags | [WriteTags](./node-id3.writetags.md) | |

**Returns:**

Buffer

25 changes: 25 additions & 0 deletions doc/node-id3.create_1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [node-id3](./node-id3.md) &gt; [create](./node-id3.create_1.md)

## create() function

Creates a buffer containing an ID3 Tag and returns it via the callback.

**Signature:**

```typescript
export declare function create(tags: WriteTags, callback: CreateCallback): void;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| tags | [WriteTags](./node-id3.writetags.md) | |
| callback | [CreateCallback](./node-id3.createcallback.md) | |

**Returns:**

void

13 changes: 13 additions & 0 deletions doc/node-id3.createcallback.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [node-id3](./node-id3.md) &gt; [CreateCallback](./node-id3.createcallback.md)

## CreateCallback type

Callback used to return a created ID Tag buffer.

**Signature:**

```typescript
export type CreateCallback = (data: Buffer) => void;
```
70 changes: 70 additions & 0 deletions doc/node-id3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [node-id3](./node-id3.md)

## node-id3 package

An ID3-Tag library written in Typescript.

## Remarks

Used specification: [id3.org v2.3.0](http://id3.org/id3v2.3.0)<!-- -->.

## Functions

| Function | Description |
| --- | --- |
| [create(tags)](./node-id3.create.md) | Creates a buffer containing an ID3 Tag and returns it. |
| [create(tags, callback)](./node-id3.create_1.md) | Creates a buffer containing an ID3 Tag and returns it via the callback. |
| [read(filebuffer, options)](./node-id3.read.md) | Reads ID3-Tags synchronously from passed buffer/filepath. |
| [read(filebuffer, callback)](./node-id3.read_1.md) | Reads ID3-Tags asynchronously from passed buffer/filepath. |
| [read(filebuffer, options, callback)](./node-id3.read_2.md) | Reads ID3-Tags asynchronously from passed buffer/filepath. |
| [removeTags(filepath)](./node-id3.removetags.md) | Removes synchronously any written ID3-Frames from the specified file. |
| [removeTags(filepath, callback)](./node-id3.removetags_1.md) | Removes asynchronously any written ID3-Frames from the specified file. |
| [removeTagsFromBuffer(data)](./node-id3.removetagsfrombuffer.md) | Remove already written ID3-Frames from a buffer |
| [update(tags, buffer, options)](./node-id3.update.md) | Updates ID3-Tags from the given buffer. |
| [update(tags, filepath, options)](./node-id3.update_1.md) | Updates ID3-Tags synchronously in the specified file. |
| [update(tags, filebuffer, callback)](./node-id3.update_2.md) | Updates ID3-Tags asynchronously in the specified file. |
| [update(tags, filebuffer, options, callback)](./node-id3.update_3.md) | Updates ID3-Tags asynchronously from the given buffer or specified file. |
| [write(tags, buffer)](./node-id3.write.md) | Replaces any existing tags with the given tags in the given buffer. |
| [write(tags, filepath)](./node-id3.write_1.md) | Replaces synchronously any existing tags with the given tags in the specified file. |
| [write(tags, filebuffer, callback)](./node-id3.write_2.md) | Replaces asynchronously any existing tags with the given tags in the given buffer or specified file. |

## Interfaces

| Interface | Description |
| --- | --- |
| [Options](./node-id3.options.md) | |
| [TagAliases](./node-id3.tagaliases.md) | |
| [TagIdentifiers](./node-id3.tagidentifiers.md) | |
| [Tags](./node-id3.tags.md) | |
| [WriteTags](./node-id3.writetags.md) | On write either a tag alias or tag identifier can be be specified. This is undefined behaviour when both are specified. |

## Namespaces

| Namespace | Description |
| --- | --- |
| [TagFrames](./node-id3.tagframes.md) | |

## Variables

| Variable | Description |
| --- | --- |
| [Promises](./node-id3.promises.md) | Asynchronous API for files and buffers operations using promises. |
| [TagConstants](./node-id3.tagconstants.md) | Constants documented in the id3 specifications used in tag frames. |

## Type Aliases

| Type Alias | Description |
| --- | --- |
| [CreateCallback](./node-id3.createcallback.md) | Callback used to return a created ID Tag buffer. |
| [ReadCallback](./node-id3.readcallback.md) | Callback signatures for asynchronous read operation. |
| [ReadErrorCallback](./node-id3.readerrorcallback.md) | Callback signatures for failing asynchronous read operation. |
| [ReadSuccessCallback](./node-id3.readsuccesscallback.md) | Callback signature for successful asynchronous read operation. |
| [RemoveCallback](./node-id3.removecallback.md) | Callback signatures for asynchronous remove operation. |
| [TagConstants](./node-id3.tagconstants.md) | |
| [TypeOrTypeArray](./node-id3.typeortypearray.md) | A utility to define an union of the given type or an array of the type. |
| [WriteCallback](./node-id3.writecallback.md) | Callback signatures for asynchronous update and write operations. |
| [WriteErrorCallback](./node-id3.writeerrorcallback.md) | Callback signature for failing asynchronous update and write operations. |
| [WriteSuccessCallback](./node-id3.writesuccesscallback.md) | Callback signature for successful asynchronous update and write operations. |

13 changes: 13 additions & 0 deletions doc/node-id3.options.exclude.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [node-id3](./node-id3.md) &gt; [Options](./node-id3.options.md) &gt; [exclude](./node-id3.options.exclude.md)

## Options.exclude property

Do not read the specified tag identifiers, defaults to none.

**Signature:**

```typescript
exclude?: string[];
```
13 changes: 13 additions & 0 deletions doc/node-id3.options.include.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [node-id3](./node-id3.md) &gt; [Options](./node-id3.options.md) &gt; [include](./node-id3.options.include.md)

## Options.include property

Only read the specified tag identifiers, defaults to all.

**Signature:**

```typescript
include?: string[];
```
22 changes: 22 additions & 0 deletions doc/node-id3.options.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [node-id3](./node-id3.md) &gt; [Options](./node-id3.options.md)

## Options interface


**Signature:**

```typescript
export interface Options
```

## Properties

| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [exclude?](./node-id3.options.exclude.md) | | string\[\] | _(Optional)_ Do not read the specified tag identifiers, defaults to none. |
| [include?](./node-id3.options.include.md) | | string\[\] | _(Optional)_ Only read the specified tag identifiers, defaults to all. |
| [noRaw?](./node-id3.options.noraw.md) | | boolean | _(Optional)_ Do not generate the <code>raw</code> object, defaults to false. |
| [onlyRaw?](./node-id3.options.onlyraw.md) | | boolean | _(Optional)_ Only return the <code>raw</code> object, defaults to false. |

13 changes: 13 additions & 0 deletions doc/node-id3.options.noraw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [node-id3](./node-id3.md) &gt; [Options](./node-id3.options.md) &gt; [noRaw](./node-id3.options.noraw.md)

## Options.noRaw property

Do not generate the `raw` object, defaults to false.

**Signature:**

```typescript
noRaw?: boolean;
```
13 changes: 13 additions & 0 deletions doc/node-id3.options.onlyraw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [node-id3](./node-id3.md) &gt; [Options](./node-id3.options.md) &gt; [onlyRaw](./node-id3.options.onlyraw.md)

## Options.onlyRaw property

Only return the `raw` object, defaults to false.

**Signature:**

```typescript
onlyRaw?: boolean;
```
19 changes: 19 additions & 0 deletions doc/node-id3.promises.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [node-id3](./node-id3.md) &gt; [Promises](./node-id3.promises.md)

## Promises variable

Asynchronous API for files and buffers operations using promises.

**Signature:**

```typescript
Promises: {
readonly create: (tags: WriteTags) => Promise<Buffer>;
readonly write: (tags: WriteTags, filebuffer: string | Buffer) => Promise<Buffer>;
readonly update: (tags: WriteTags, filebuffer: string | Buffer, options?: Options) => Promise<Buffer>;
readonly read: (file: string | Buffer, options?: Options) => Promise<Tags | TagIdentifiers>;
readonly removeTags: (filepath: string) => Promise<void>;
}
```
25 changes: 25 additions & 0 deletions doc/node-id3.read.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [node-id3](./node-id3.md) &gt; [read](./node-id3.read.md)

## read() function

Reads ID3-Tags synchronously from passed buffer/filepath.

**Signature:**

```typescript
export declare function read(filebuffer: string | Buffer, options?: Options): Tags;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| filebuffer | string \| Buffer | |
| options | [Options](./node-id3.options.md) | _(Optional)_ |

**Returns:**

[Tags](./node-id3.tags.md)

25 changes: 25 additions & 0 deletions doc/node-id3.read_1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [node-id3](./node-id3.md) &gt; [read](./node-id3.read_1.md)

## read() function

Reads ID3-Tags asynchronously from passed buffer/filepath.

**Signature:**

```typescript
export declare function read(filebuffer: string | Buffer, callback: ReadCallback): void;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| filebuffer | string \| Buffer | |
| callback | [ReadCallback](./node-id3.readcallback.md) | |

**Returns:**

void

26 changes: 26 additions & 0 deletions doc/node-id3.read_2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [node-id3](./node-id3.md) &gt; [read](./node-id3.read_2.md)

## read() function

Reads ID3-Tags asynchronously from passed buffer/filepath.

**Signature:**

```typescript
export declare function read(filebuffer: string | Buffer, options: Options, callback: ReadCallback): void;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| filebuffer | string \| Buffer | |
| options | [Options](./node-id3.options.md) | |
| callback | [ReadCallback](./node-id3.readcallback.md) | |

**Returns:**

void

15 changes: 15 additions & 0 deletions doc/node-id3.readcallback.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [node-id3](./node-id3.md) &gt; [ReadCallback](./node-id3.readcallback.md)

## ReadCallback type

Callback signatures for asynchronous read operation.

**Signature:**

```typescript
export type ReadCallback = ReadSuccessCallback & ReadErrorCallback;
```
**References:** [ReadSuccessCallback](./node-id3.readsuccesscallback.md)<!-- -->, [ReadErrorCallback](./node-id3.readerrorcallback.md)

13 changes: 13 additions & 0 deletions doc/node-id3.readerrorcallback.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [node-id3](./node-id3.md) &gt; [ReadErrorCallback](./node-id3.readerrorcallback.md)

## ReadErrorCallback type

Callback signatures for failing asynchronous read operation.

**Signature:**

```typescript
export type ReadErrorCallback = (error: NodeJS.ErrnoException | Error, tags: null) => void;
```
15 changes: 15 additions & 0 deletions doc/node-id3.readsuccesscallback.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [node-id3](./node-id3.md) &gt; [ReadSuccessCallback](./node-id3.readsuccesscallback.md)

## ReadSuccessCallback type

Callback signature for successful asynchronous read operation.

**Signature:**

```typescript
export type ReadSuccessCallback = (error: null, tags: Tags | TagIdentifiers) => void;
```
**References:** [Tags](./node-id3.tags.md)<!-- -->, [TagIdentifiers](./node-id3.tagidentifiers.md)

Loading