get-data-line
v1.0.2
Published
Read String Data Line By Line
Downloads
3
Maintainers
Readme
Read Data Line
Simple read strings line by line from your data
Install (global)
npm i get-data-line -g
Nodejs > ReadLine.js
require('get-data-line');
//you can use two different method (local string <or> File data)
//LOAD LOCAL STRING
var myvar = `Hello_line_1\nHello_line_2\nHello_line_3`;
//the (myvar) variable will not load if you use loadFile() - (auto Deactive)
//LOAD TEXT DATA
loadFile("./bigdata.txt");
All Line
//Read all line by line
String(myvar).read( function(data){
console.log( data )
});
Select Line
//only selected lines are (line 1 and line 3 loaded)
String(myvar).getline([1,3], function(data){
console.log( data )
});
Remove Line
//selected lines are (line 1 and line 3 removed)
String(myvar).remline ([1,3],function(data){
console.log( data )
});
Updates & Fixed
- Version 1.0.1-2
- Only Document(readme) Updates
MIT License
Copyright (c) 2018 Levent Inan, https://github.com/Nodeclient/
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.