1.7.0 • Published 6 years ago
startline v1.7.0
startline
Stream readline with starting and ending point for nodejs. You can even encode a file with rc4 cipher, or autokey.
Installation
Install through NPM
npm install startline
or
git clone git://github.com/hex7c0/startline.git
API
inside nodejs project
var readline = startline({
file: 'lorem.txt'
});
readline.on('line',function(line) {
console.log(line);
});
Methods
get head of string (bytes red)
readline.head
get tail of string
readline.tail
restart reading (building a new Class)
readline.read(start, end)
startline(options)
options
file
- String Path of file (required)arc4
- String Password for reading a encrypted file with rc4 (default "disabled")autokey
- String Password for reading a encrypted file with autokey (default "disabled")encoding
- utf8 | ascii | base64 | null File encoding (default "null")mode
- String File permission (default "444")start
- Integer Starting bytes (default "starting file")end
- Integer Ending bytes (default "entire file")autoClose
- Boolean If file descriptor will be closed automatically (default "true")lodash
- Boolean Use lodash library with encrypted file (default "disabled")
related to http://nodejs.org/api/fs.html#fs_fs_createreadstream_path_options
Examples
Take a look at my examples
License GPLv3
1.7.0
6 years ago
1.5.3
8 years ago
1.5.2
8 years ago
1.5.1
9 years ago
1.5.0
9 years ago
1.4.3
9 years ago
1.4.2
9 years ago
1.4.1
9 years ago
1.4.0
9 years ago
1.3.12
9 years ago
1.3.11
10 years ago
1.3.10
10 years ago
1.3.9
10 years ago
1.3.8
10 years ago
1.3.7
10 years ago
1.3.6
10 years ago
1.3.5
10 years ago
1.3.4
10 years ago
1.3.3
10 years ago
1.3.2
10 years ago
1.3.1
10 years ago
1.3.0
10 years ago
1.2.2
10 years ago
1.2.1
10 years ago
1.2.0
10 years ago
1.1.0
10 years ago
1.0.1
10 years ago
1.0.0
10 years ago
0.0.1
10 years ago