music-metadata
Advanced tools
Comparing version 0.6.3 to 0.6.5
'use strict'; | ||
var __extends = (this && this.__extends) || function (d, b) { | ||
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
return function (d, b) { | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var equal = require("deep-equal"); | ||
@@ -8,0 +14,0 @@ var strtok = require("strtok2"); |
'use strict'; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/*jslint browser: true*/ | ||
var through = require('through'); | ||
var musicMetadata = require('./index'); | ||
var readStream = require('filereader-stream'); | ||
var isStream = require('is-stream'); | ||
var through = require("through"); | ||
var musicMetadata = require("./index"); | ||
var readStream = require("filereader-stream"); | ||
var isStream = require("is-stream"); | ||
module.exports = function (stream, opts, callback) { | ||
@@ -8,0 +9,0 @@ return musicMetadata.parseStream(wrapFileWithStream(stream), opts, callback); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var equal = require("deep-equal"); | ||
@@ -243,4 +244,3 @@ var windows1252decoder_1 = require("./windows1252decoder"); | ||
]; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = Common; | ||
//# sourceMappingURL=common.js.map |
'use strict'; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var strtok = require("strtok2"); | ||
@@ -3,0 +4,0 @@ var common_1 = require("./common"); |
'use strict'; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var strtok = require("strtok2"); | ||
@@ -3,0 +4,0 @@ var common_1 = require("./common"); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var strtok = require("strtok2"); | ||
@@ -168,5 +169,4 @@ var common_1 = require("./common"); | ||
}()); | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = FrameParser; | ||
// exports.readData = function readData (b, type, flags, major) { | ||
//# sourceMappingURL=id3v2_frames.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var strtok = require("strtok2"); | ||
@@ -3,0 +4,0 @@ var util_1 = require("util"); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var strtok = require("strtok2"); | ||
@@ -3,0 +4,0 @@ var common_1 = require("./common"); |
@@ -130,3 +130,3 @@ import { HeaderType } from './tagmap'; | ||
} | ||
export declare type ICallbackType = (error?: Error, metadata?: IAudioMetadata) => void; | ||
export declare type ICallbackType = (error?: Error, metadata?: IAudioMetadata, underlayingAudioStream?: ReadableStream) => void; | ||
export interface IOptions { | ||
@@ -133,0 +133,0 @@ path?: string; |
/* jshint maxlen: 300 */ | ||
'use strict'; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var events = require("events"); | ||
@@ -169,3 +170,3 @@ var fs = require("fs"); | ||
if (callback) { | ||
callback(err, metadata); | ||
callback(err, metadata, stream); | ||
} | ||
@@ -244,3 +245,3 @@ return strtok.DONE; | ||
case 'barcode': | ||
comTags.barcode = typeof value === 'string' ? parseInt(value, 10) : value; | ||
value = typeof value === 'string' ? parseInt(value, 10) : value; | ||
break; | ||
@@ -247,0 +248,0 @@ case 'picture': |
'use strict'; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var strtok = require("strtok2"); | ||
@@ -3,0 +4,0 @@ var common_1 = require("./common"); |
'use strict'; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var strtok = require("strtok2"); | ||
@@ -3,0 +4,0 @@ var common_1 = require("./common"); |
'use strict'; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var events = require("events"); | ||
@@ -3,0 +4,0 @@ var strtok = require("strtok2"); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=parser.js.map |
@@ -151,3 +151,3 @@ 'use strict'; | ||
*/ | ||
MpegAudioLayer.InfoTag = { | ||
MpegAudioLayer.XingInfoTag = { | ||
len: 140, | ||
@@ -318,5 +318,5 @@ get: function (buf, off) { | ||
case State.side_information: | ||
this.offset += MpegAudioLayer.InfoTag.len; // 12 | ||
this.offset += MpegAudioLayer.XingInfoTag.len; // 12 | ||
this.state = State.xtra_info_header; | ||
return MpegAudioLayer.InfoTag; | ||
return MpegAudioLayer.XingInfoTag; | ||
case State.xtra_info_header: | ||
@@ -323,0 +323,0 @@ this.state = State.skip_frame_data; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/** | ||
@@ -563,4 +564,3 @@ * tagmap maps native meta tags to generic common types | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = TagMap; | ||
//# sourceMappingURL=tagmap.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var strtok = require("strtok2"); | ||
@@ -55,4 +56,3 @@ var VorbisPictureType; | ||
}()); | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = Vorbis; | ||
//# sourceMappingURL=vorbis.js.map |
@@ -8,3 +8,3 @@ export declare class Windows1292Decoder { | ||
} | ||
declare var _default: typeof Windows1292Decoder.decode; | ||
declare const _default: typeof Windows1292Decoder.decode; | ||
export default _default; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var Windows1292Decoder = (function () { | ||
@@ -48,4 +49,3 @@ function Windows1292Decoder() { | ||
exports.Windows1292Decoder = Windows1292Decoder; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = Windows1292Decoder.decode; | ||
//# sourceMappingURL=windows1252decoder.js.map |
{ | ||
"name": "music-metadata", | ||
"description": "Streaming music metadata parser for node and the browser.", | ||
"version": "0.6.3", | ||
"version": "0.6.5", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Borewit", |
@@ -45,5 +45,5 @@ [![Build Status][travis-image]][travis-url] [![NPM version][npm-image]][npm-url] [![npm downloads][npm-downloads-image]][npm-url] | ||
// create a new music-metadata from a node ReadStream | ||
mm.parseStream(audioStream, {native: true}, function (err, metadata) { | ||
mm.parseStream(audioStream, {native: true}, function (err, metadata, underlayingAudioStream) { | ||
// important note, the stream is not closed by default. To prevent leaks, you must close it yourself | ||
audioStream.close(); | ||
underlayingAudioStream.close(); | ||
if (err) throw err; | ||
@@ -64,5 +64,5 @@ | ||
// create a new music-metadata parser from a node ReadStream | ||
mm.parseStream(audioStream, {native: true}, (err, metadata) => { | ||
mm.parseStream(audioStream, {native: true}, (err, metadata, underlayingAudioStream) => { | ||
// important note, the stream is not closed by default. To prevent leaks, you must close it yourself | ||
audioStream.close(); | ||
underlayingAudioStream.close(); | ||
if (err) throw err; | ||
@@ -69,0 +69,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
1149708
107
16684
9