mod-meta
v1.0.0
Published
Tracker mod metadata for .mod .xm .s3m .it
Maintainers
Readme
mod-meta
Tracker mod metadata parser for .mod .xm .s3m .it
Returns title, trackerType, and message (when present in the module data).
Why
I created this package in 2016 for the needs of my keygenmusic.tk project.
Installation
$ npm install mod-meta
Usage
const mm = require('mod-meta');
// sync
const mdata = mm.getModMetaSync('pathToMod');
if (mdata) {
console.log('Mod title: ', mdata.title);
console.log('Tracker type: ', mdata.trackerType);
console.log('Message: ', mdata.message);
} else {
console.log('Error');
}
// sync (skip message parsing)
const mdataNoMsg = mm.getModMetaSync('pathToMod', {includeMessage: false});
// async (promise)
mm.getModMeta('pathToMod')
.then((mdata) => {
console.log('Mod title: ', mdata.title);
})
.catch((error) => {
console.log(error);
});
// async (promise, skip message parsing)
mm.getModMeta('pathToMod', {includeMessage: false})
.then((mdata) => {
console.log('Mod title: ', mdata.title);
})
.catch((error) => {
console.log(error);
});Tests
$ npm test
