split-tracklist

1.1.1 • Public • Published

split-tracklist

Build Status

split tracklist text to object contains artist and title of each track

Install

$ npm install split-tracklist --save

Usage

var splitTracklist = require('split-tracklist');
var tracklist = ['artist1 - title1', 'artist2 - title2 [label]'].join('\n');
var tracks = splitTracklist(tracklist);

/*
[
  {
    track: 'artist1 - title1',
    artist: 'artist1',
    title: 'title1'
  },
  {
    track: 'artist2 - title2'
    artist: 'artist2',
    title: 'title2',
    comment: 'label'
  }
]
 */

License

MIT © ewnd9

Package Sidebar

Install

npm i split-tracklist

Weekly Downloads

5

Version

1.1.1

License

MIT

Last publish

Collaborators

  • ewnd9