util.filelist
Reads a file list and returns it as an array of values.
Last updated 7 months ago by jmquigley .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install util.filelist 
SYNC missed versions from official npm registry.

util.filelist

Reads a file list and returns it as an array of values.

build analysis code style: prettier testing NPM coverage

Reads a given file list, stores each line in an array, and returns the array. It ignore blank lines and comments (# character). Each line is delimited by the newline characters.

Installation

This module uses yarn to manage dependencies and run scripts for development.

To install as a development dependency with cli:

$ yarn add --dev util.filelist

To build the app and run all tests:

$ yarn run all

Example Usage

const getFileList = require('util.filelist');
lines = getFileList("file.list");

lines.forEach(function(line) {
    console.log(line);
});

An example of the file.list above would be:

# This is a comment

    line 1

 line 2

This would result in an Array with only two lines (line 1 & line 2). The comment line and the blank line are removed and are not placed in the list. It also trims leading and trailing spaces.

Current Tags

  • 0.0.36                                ...           latest (7 months ago)

35 Versions

  • 0.0.36                                ...           7 months ago
  • 0.0.35                                ...           7 months ago
  • 0.0.34                                ...           7 months ago
  • 0.0.33                                ...           8 months ago
  • 0.0.32                                ...           9 months ago
  • 0.0.31                                ...           9 months ago
  • 0.0.30                                ...           9 months ago
  • 0.0.29                                ...           a year ago
  • 0.0.28                                ...           a year ago
  • 0.0.27                                ...           2 years ago
  • 0.0.26                                ...           2 years ago
  • 0.0.25                                ...           2 years ago
  • 0.0.24                                ...           2 years ago
  • 0.0.23                                ...           2 years ago
  • 0.0.22                                ...           2 years ago
  • 0.0.21                                ...           2 years ago
  • 0.0.20                                ...           2 years ago
  • 0.0.19                                ...           2 years ago
  • 0.0.18                                ...           3 years ago
  • 0.0.17                                ...           3 years ago
  • 0.0.16                                ...           3 years ago
  • 0.0.15                                ...           3 years ago
  • 0.0.14                                ...           3 years ago
  • 0.0.13                                ...           3 years ago
  • 0.0.12                                ...           3 years ago
  • 0.0.11                                ...           3 years ago
  • 0.0.10                                ...           3 years ago
  • 0.0.9                                ...           3 years ago
  • 0.0.8                                ...           3 years ago
  • 0.0.7                                ...           3 years ago
  • 0.0.6                                ...           3 years ago
  • 0.0.4                                ...           3 years ago
  • 0.0.3                                ...           3 years ago
  • 0.0.2                                ...           3 years ago
  • 0.0.1                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 36
Last Day 0
Last Week 35
Last Month 3
Dependencies (2)
Dev Dependencies (21)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |