xspf-js

0.1.1 • Public • Published

xspf-js (“spiff”)

tests

XML format for sharing playlists (https://xspf.org/spec)

Usage

Install

npm i xspf-js

Parse

const { parse } = require("xspf-js")

const xml = `<?xml version="1.0" encoding="UTF-8"?>
<playlist version="1" xmlns="http://xspf.org/ns/0/">
<title>SpongeBob SquarePants Theme Song</title>
  <trackList>
    <track><location>file:///music/song\_2.flac</location></track>
  </trackList>
</playlist>
`

const result = parse(xml)

// result:
// {
//   "version": "1",
//   "xmlns": "http://xspf.org/ns/0/",
//   "playlist": {
//     "title": "SpongeBob SquarePants Theme Song",
//     "trackList": [
//       {
//         "location": "file:///music/song_2.flac"
//       }
//     ]
//   }
// }

/xspf-js/

    Package Sidebar

    Install

    npm i xspf-js

    Weekly Downloads

    1

    Version

    0.1.1

    License

    WTFPL

    Unpacked Size

    8.97 kB

    Total Files

    8

    Last publish

    Collaborators

    • hawyar