Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

music-metadata-browser

Package Overview
Dependencies
Maintainers
1
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

music-metadata-browser - npm Package Compare versions

Comparing version 1.3.0 to 1.4.0

.github/FUNDING.yml

6

package.json
{
"name": "music-metadata-browser",
"version": "1.3.0",
"version": "1.4.0",
"description": "Browserifed version of music-metadata",

@@ -78,3 +78,3 @@ "main": "dist/index.js",

"coveralls": "^3.0.3",
"del-cli": "^2.0.0",
"del-cli": "^3.0.0",
"eslint": "^6.2.2",

@@ -103,3 +103,3 @@ "filereader-stream": "^2.0.0",

"debug": "^4.0.1",
"music-metadata": "^4.4.0",
"music-metadata": "^4.6.0",
"readable-stream": "^3.3.0",

@@ -106,0 +106,0 @@ "readable-web-to-node-stream": "^1.1.4",

@@ -76,12 +76,17 @@ [![Build Status](https://travis-ci.org/Borewit/music-metadata-browser.svg?branch=master)](https://travis-ci.org/Borewit/music-metadata-browser)

### Requirements
[music-metadata-browser](https://www.npmjs.com/package/music-metadata-browser) is a module designed for a module bundler like [webpack](https://webpack.js.org/).
A *module bundler* turns modules in static assets (typically one minified JavaScript file).
Those *static assets* are then prepared, made compatible and optimized for execution by a web browser.
### Import music-metadata
Import music-metadata in JavaScript
```JavaScript
const mm = require('music-metadata-browser');
```js
const musicMetadata = require('music-metadata-browser');
```
This is how it's done in TypeScript
```TypeScript
import * as mm from 'music-metadata-browser';
This is how it's done in [TypeScript](https://www.typescriptlang.org/docs/home.html)
```ts
import * as musicMetadata from 'music-metadata-browser';
```

@@ -103,3 +108,3 @@

```javascript
import * as mm from 'music-metadata-browser';
const musicMetadata = request('music-metadata-browser');

@@ -109,11 +114,22 @@ /**

*/
function readFromBlob(blob) {
async function readFromBlob(blob) {
// blob is a Web API Blob or File
mm.parseBlob(blob).then(metadata => {
musicMetadata.parseBlob(blob).then(musicMetadata => {
// metadata has all the metadata found in the blob or file
});
})
}
```
Or with async/await if you prefer:
```javascript
async function readFromBlob(blob) {
// blob is a Web API Blob or File
const metadata = await musicMetadata.parseBlob(blob);
// metadata has all the metadata found in the blob or file
}
```
#### parseReadableStream function

@@ -120,0 +136,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc