Package Exports
- dota2-api
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (dota2-api) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Readlines
Read file line as array.
Install
npm install readlines
or
npm install -g readlines
Example:
var fd = require('readlines');
var lines = fd.readlinesSync('example.txt');
for(var line in lines){
console.log(lines[line]);
};
API
readlinesSync(filename, [options])
Sync read file by line return an array.
var lines = fd.readlinesSync(filePath);
readlines(filename, [options], callback)
Async read file by line return an array.
fd.readlines(filePath, function(err, lines){
console.log(lines);
});
readlineSync(filename, [options], lineNum)
Sync read file by line return specific line.
var line = fd.readlineSync(filePath, 3);
readline(filename, [options], lineNum, callback)
Async read file by line return specific line.
fd.readline(filePath, 3, function(err, line){
console.log(line);
});