pls-parser
v0.0.1
Published
PLS file parser
Downloads
3
Readme
pls-parser
Parse and create PLS playlist files
Usage
In JavaScript
const { parse, stringify } = require("pls-parser")
const { readFileSync, writeFileSync } = require("fs")
const raw = readFileSync("./playlist.pls", { encoding: "utf-8" })
const parsed = parse(raw)
const json = readFileSync("./playlist.json", { encoding: "utf-8" })
const pls = stringify(json)
Or in TypeScript
import { parse, stringify } from "pls-parser"
import { readFileSync } from "fs"
const raw = readFileSync("./playlist.pls", { encoding: "utf-8" })
const parsed = parse(raw)
const json = readFileSync("./playlist.json", { encoding: "utf-8" })
const pls = stringify(json)