Borewit 86cd20a71e Improve API documentation
- Improve some sample code
- Improve `IOptions` documentation
2025-07-16 11:13:44 +02:00

15 lines
490 B
JavaScript

import { parseFile } from 'music-metadata';
import { inspect } from 'node:util';
(async () => {
try {
const filePath = '../../test/samples/MusicBrainz - Beth Hart - Sinner\'s Prayer [id3v2.3].V2.mp3';
const metadata = await parseFile(filePath);
// Output the parsed metadata to the console in a readable format
console.log(inspect(metadata, { showHidden: false, depth: null }));
} catch (error) {
console.error('Error parsing metadata:', error.message);
}
})();