New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

music-metadata

Package Overview
Dependencies
Maintainers
0
Versions
268
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

music-metadata - npm Package Compare versions

Comparing version 10.8.3 to 10.9.0

8

lib/asf/AsfObject.d.ts

@@ -13,3 +13,9 @@ import type { IGetToken, ITokenizer } from 'strtok3';

captureStackTrace(targetObject: object, constructorOpt?: Function): void;
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite /**
* Specifies the amount of time to buffer data before starting to play the file, in millisecond units.
* If this value is nonzero, the Play Duration field and all of the payload Presentation Time fields have been offset
* by this amount. Therefore, player software must subtract the value in the preroll field from the play duration and
* presentation times to calculate their actual values. It follows that all payload Presentation Time fields need to
* be at least this value.
*/[]) => any) | undefined;
stackTraceLimit: number;

@@ -16,0 +22,0 @@ };

@@ -0,0 +0,0 @@ The MIT License (MIT)

4

package.json
{
"name": "music-metadata",
"description": "Music metadata parser for Node.js, supporting virtual any audio and tag format.",
"version": "10.8.3",
"version": "10.9.0",
"author": {

@@ -24,2 +24,3 @@ "name": "Borewit",

"import": "./lib/index.js",
"module-sync": "./lib/index.js",
"require": "./lib/node.cjs",

@@ -30,2 +31,3 @@ "types": "./lib/index.d.ts"

"import": "./lib/core.js",
"module-sync": "./lib/index.js",
"require": "./lib/default.cjs",

@@ -32,0 +34,0 @@ "types": "./lib/core.d.ts"

@@ -774,13 +774,26 @@ [![Node.js CI](https://github.com/Borewit/music-metadata/actions/workflows/nodejs-ci.yml/badge.svg?branch=master)](https://github.com/Borewit/music-metadata/actions?query=branch%3Amaster)

For legacy CommonJS projects needing to load the `music-metadata` ESM module, you can use the `loadMusicMetadata` function:
Using Node.js ≥ 22, which is support loading ESM module via require
```js
const { loadMusicMetadata } = require('music-metadata');
const mm = require('music-metadata');
```
For older Node.js version < 22, you need to dynamically import **music-metadata**:
```js
(async () => {
// Dynamically loads the ESM module in a CommonJS project
const mm = await loadMusicMetadata();
const mm = await import('music-metadata');
})();
```
const metadata = await mm.parseFile('/path/to/your/file');
For CommonJS TypeScript projects, using a Node.js version < 22, you can use [load-esm](https://github.com/Borewit/load-esm):
This method shall replace the embedded CJS loader `loadMusicMetadata()` function.
```js
import {loadEsm} from 'load-esm';
(async () => {
// Dynamically loads the ESM module in a CommonJS project
const mm = await loadEsm<typeof import('music-metadata')>('music-metadata');
})();
```

@@ -787,0 +800,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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