# folder-playlist

> Create and manage a Playlist from files in a folder

Latest version **0.1.3** (published 2016-12-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install folder-playlist
pnpm add folder-playlist
yarn add folder-playlist
bun add folder-playlist
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2016-12-06 |
| First published | 2016-08-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | winstonwp |
| Maintainers | winstonwp |
| Keywords | music, playlist |

## Links

- npm: https://www.npmjs.com/package/folder-playlist
- Repository: https://github.com/winstonwp/folder-playlist
- Homepage: https://github.com/winstonwp/folder-playlist#readme
- Issues: https://github.com/winstonwp/folder-playlist/issues
- npm.io page: https://npm.io/package/folder-playlist

## Dependencies (1)

- [lodash](https://npm.io/package/lodash.md) ^4.15.0

## Recent versions

- 0.1.3 (latest) — 2016-12-06
- 0.1.2 — 2016-12-06
- 0.1.1 — 2016-12-06
- 0.1.0 — 2016-12-03
- 0.0.2 — 2016-08-16
- 0.0.1 — 2016-08-13

## README

# folder-playlist
Create and manage a simple play list from files in a folder or an array

## Instalation
```shell
npm install folder-playlist [--save]
```
## Usage
Short example

```js
var fpl = require('folder-playlist')({
    song_src: 'path_to_folder',
    //Could be [{src:path_to_file1,attr:'GOOD SONG'}, {src:path_to_file2, attr:'GREAT SONG'}]
    shuffle: true, // true or false
    song_types: ['mp3'] // array of file valid extensions
});

var fpl_songs = fpl.getSongs();
console.log(flp_songs);

var fpl_playlist = fpl.getPlayList();
console.log(flp_playlist);

fpl.shuffleOn() //Modifies Playlist

fpl_playlist = fpl.getPlayList();
console.log(flp_playlist);

var next_song = fpl.getNextSong();
// open_your_player_using(next_song);
console.log(next_song);

```


### Forced playlist example
Short example

```js
var fpl = require('folder-playlist')({
    song_src: 'path_to_folder',
    //Could be [{src:path_to_file1,attr:'GOOD SONG'}, {src:path_to_file2, attr:'GREAT SONG'}]
    shuffle: true, // true or false
    song_types: ['mp3'], // array of file valid extensions
    forced: {
        force: true, // true or false
        expression: /^.*song_suffix\..*$/g, // use valid regex expressions
        every: 2, // integer every how many songs to play one in forced mode
        count: 2 // play integer amount of songs every time
    }
});

var fpl_songs = fpl.getSongs();
console.log(flp_songs);

var fpl_playlist = fpl.getPlayList();
console.log(flp_playlist);

fpl.shuffleOn() //Modifies Playlist

fpl_playlist = fpl.getPlayList();
console.log(flp_playlist);

var next_song = fpl.getNextSong();
// open_your_player_using(next_song);
console.log(next_song);

```

---
_Source: https://npm.io/package/folder-playlist · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
