metadata-detector-streams 3.0.18 → 3.0.19

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.
Files changed (2) hide show
  1. package/README.md +40 -8
  2. package/package.json +12 -12
package/README.md CHANGED
@@ -1,13 +1,45 @@
1
1
  # metadata-detector-streams
2
2
 
3
- **A simple tool to locate and strip metadata from files.**
3
+ **A tool to locate and strip metadata from files.**
4
4
 
5
- [![dependencies](https://img.shields.io/david/chrisguttandin/metadata-detector-streams.svg?style=flat-square)](https://github.com/chrisguttandin/metadata-detector-streams/network/dependencies)
6
5
  [![version](https://img.shields.io/npm/v/metadata-detector-streams.svg?style=flat-square)](https://www.npmjs.com/package/metadata-detector-streams)
7
6
 
8
- This module is currently capable of handling [ID3](http://id3.org/Home) tags within MP3s and
9
- metadata of FLAC files as described in the official
10
- [FLAC format specification](http://xiph.org/flac/format.html). It can also parse
11
- [Vorbis Comments](https://xiph.org/vorbis/doc/v-comment.html) within
12
- [OGG Containers](https://xiph.org/ogg). In addition to that it can also parse MPEG-4 files which are
13
- nicely explained on the homepage of [AtomicParsley](http://atomicparsley.sourceforge.net).
7
+ This package is currently capable of handling [ID3](http://id3.org/Home) tags within MP3s and metadata of FLAC files as described in the official [FLAC format specification](http://xiph.org/flac/format.html). It can also parse [Vorbis Comments](https://xiph.org/vorbis/doc/v-comment.html) within [OGG Containers](https://xiph.org/ogg). In addition to that it can also parse MPEG-4 files which are nicely explained on the homepage of [AtomicParsley](http://atomicparsley.sourceforge.net).
8
+
9
+ ## Usage
10
+
11
+ This package is intended to be used with Node.js. Please take a look at [`metadata-detector`](https://github.com/chrisguttandin/metadata-detector) if you look for a package that works in the browser.
12
+
13
+ `metadata-detector-streams` is available as a package on npm. You can use the following command to install it:
14
+
15
+ ```shell
16
+ npm install metadata-detector-streams
17
+ ```
18
+
19
+ The package exports two functions to create streams which eather locate or strip metadata from a readable stream.
20
+
21
+ ### createLocateStream()
22
+
23
+ `createLocateStream()` can be used to create a stream to locate metadata in another stream. It will emit tuples which consist of two values. These values are marking the start and end in bytes of any detected metadata.
24
+
25
+ ```js
26
+ import { createLocateStream } from 'metadata-detector-streams';
27
+
28
+ const locateStream = createLocateStream();
29
+
30
+ readable.pipe(locateStream);
31
+ // a stream of tuples
32
+ ```
33
+
34
+ ### createStripStream()
35
+
36
+ `createStripStream()` can be used to create a stream which removes all detected metadata from a readable stream. It will emit only those bytes which are not detected as metadata.
37
+
38
+ ```js
39
+ import { createStripStream } from 'metadata-detector-streams';
40
+
41
+ const stripStream = createStripStream();
42
+
43
+ readable.pipe(stripStream);
44
+ // a stream of the same data but without metadata
45
+ ```
package/package.json CHANGED
@@ -9,22 +9,22 @@
9
9
  }
10
10
  },
11
11
  "dependencies": {
12
- "synchsafe": "^6.0.17",
12
+ "synchsafe": "^6.0.18",
13
13
  "tslib": "^2.4.0"
14
14
  },
15
- "description": "A simple tool to locate and strip metadata from files.",
15
+ "description": "A tool to locate and strip metadata from files.",
16
16
  "devDependencies": {
17
17
  "@babel/cli": "^7.18.10",
18
- "@babel/core": "^7.18.10",
19
- "@babel/preset-env": "^7.18.10",
18
+ "@babel/core": "^7.19.0",
19
+ "@babel/preset-env": "^7.19.0",
20
20
  "@babel/register": "^7.18.9",
21
- "@commitlint/cli": "^17.0.3",
22
- "@commitlint/config-angular": "^17.0.3",
21
+ "@commitlint/cli": "^17.1.2",
22
+ "@commitlint/config-angular": "^17.1.0",
23
23
  "chai": "^4.3.6",
24
24
  "commitizen": "^4.2.5",
25
25
  "cz-conventional-changelog": "^3.3.0",
26
- "eslint": "^8.21.0",
27
- "eslint-config-holy-grail": "^52.0.24",
26
+ "eslint": "^8.23.0",
27
+ "eslint-config-holy-grail": "^52.0.33",
28
28
  "grunt": "^1.5.3",
29
29
  "grunt-cli": "^1.4.3",
30
30
  "grunt-sh": "^0.2.0",
@@ -36,10 +36,10 @@
36
36
  "rimraf": "^3.0.2",
37
37
  "sinon": "^14.0.0",
38
38
  "sinon-chai": "^3.7.0",
39
- "tsconfig-holy-grail": "^11.1.34",
39
+ "tsconfig-holy-grail": "^11.1.36",
40
40
  "tslint": "^6.1.3",
41
- "tslint-config-holy-grail": "^53.2.30",
42
- "typescript": "^4.7.4"
41
+ "tslint-config-holy-grail": "^53.2.33",
42
+ "typescript": "^4.8.3"
43
43
  },
44
44
  "engines": {
45
45
  "node": ">=12.20.1"
@@ -63,5 +63,5 @@
63
63
  "test": "grunt lint && grunt test"
64
64
  },
65
65
  "types": "build/es2019/module.d.ts",
66
- "version": "3.0.18"
66
+ "version": "3.0.19"
67
67
  }