1.1.5 • Published 2 years ago

iptv-m3u v1.1.5

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

IpTv M3U

A simple module that allows you to convert M3U playlists to objects, and objects to M3U playlists. It basically can read and write M3U files.

Import

ES Modules (ESM)

import * as m3u from 'iptv-m3u';

CommonJS

const m3u = require('iptv-m3u');

Usage

Read external M3U file (async)

You can convert an external M3U file to an IptvPlaylist object.

await m3u.readExternalM3u('UrlToM3uFile');

Read string M3U playlist

You can convert a M3U string to an IptvPlaylist object.

await m3u.readStringM3u(stringToRead);

Read local M3U file

You can convert an local M3U file to an IptvPlaylist object.

m3u.readLocalM3u('PathToM3uFile');

You can also use path.join.

m3u.readLocalM3u(path.join(__dirname, 'PathToM3uFile'));

Create M3U String

You can convert an IptvPlaylist object to a M3U file to string.

m3u.createM3uString(iptvPlaylist);

Create M3U File

You can convert an IptvPlaylist object to a M3U file.

m3u.createM3uFile(iptvPlaylist, 'PathToM3uFile');

You can also use path.join.

m3u.createM3uFile(iptvPlaylist, path.join(__dirname, 'PathToM3uFile'));
1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago