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 2.3.0 to 2.4.0

lib/index.spec.d.ts

11

lib/index.js

@@ -7,3 +7,2 @@ "use strict";

const readable_web_to_node_stream_1 = require("readable-web-to-node-stream");
const toBuffer = require("typedarray-to-buffer");
const debug = initDebug('music-metadata-browser:main');

@@ -45,3 +44,3 @@ var core_1 = require("music-metadata/lib/core");

async function parseBlob(blob, options) {
const buf = await convertBlobToBuffer(blob);
const uint8Array = await convertBlobToUint8Array(blob);
const fileInfo = { mimeType: blob.type, size: blob.size };

@@ -51,3 +50,3 @@ if (blob.name) {

}
return mm.parseBuffer(buf, { mimeType: blob.type, size: blob.size }, options);
return mm.parseBuffer(uint8Array, { mimeType: blob.type, size: blob.size }, options);
}

@@ -90,5 +89,5 @@ exports.parseBlob = parseBlob;

* @param blob - Web API Blob
* @returns Metadata
* @returns Uint8Array
*/
function convertBlobToBuffer(blob) {
function convertBlobToUint8Array(blob) {
return new Promise((resolve, reject) => {

@@ -99,3 +98,3 @@ const fileReader = new FileReader();

if (data instanceof ArrayBuffer) {
data = toBuffer(new Uint8Array(event.target.result));
data = new Uint8Array(data);
}

@@ -102,0 +101,0 @@ resolve(data);

{
"name": "music-metadata-browser",
"version": "2.3.0",
"version": "2.4.0",
"description": "Browserifed version of music-metadata",

@@ -88,10 +88,11 @@ "main": "lib/index.js",

"devDependencies": {
"@tokenizer/token": "^0.3.0",
"@types/jasmine": "^3.8.1",
"@types/node": "^16.3.1",
"coveralls": "^3.1.0",
"@types/node": "^16.4.1",
"coveralls": "^3.1.1",
"del-cli": "^4.0.1",
"eslint": "^7.29.0",
"eslint": "^7.31.0",
"filereader-stream": "^2.0.0",
"istanbul-instrumenter-loader": "^3.0.1",
"jasmine-core": "^3.7.1",
"jasmine-core": "^3.8.0",
"karma": "^6.3.4",

@@ -103,5 +104,6 @@ "karma-browserstack-launcher": "^1.6.0",

"karma-jasmine": "^4.0.1",
"karma-jasmine-html-reporter": "^1.6.0",
"karma-jasmine-html-reporter": "^1.7.0",
"karma-spec-reporter": "^0.0.32",
"karma-webpack": "^4.0.2",
"karma-webpack": "^5.0.0",
"process": "^0.11.10",
"stream-http": "^3.2.0",

@@ -111,3 +113,5 @@ "ts-loader": "^8.0.17",

"typescript": "^4.3.5",
"webpack": "^4.46.0"
"url": "^0.11.0",
"webpack": "^5.46.0",
"webpack-cli": "^4.7.2"
},

@@ -117,7 +121,6 @@ "dependencies": {

"debug": "^4.3.2",
"music-metadata": "^7.8.8",
"music-metadata": "^7.11.0",
"readable-stream": "^3.6.0",
"readable-web-to-node-stream": "^3.0.2",
"typedarray-to-buffer": "^4.0.0"
"readable-web-to-node-stream": "^3.0.2"
}
}
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