1.0.5 • Published 4 years ago

read-file-to-array v1.0.5

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

Future

Reads the specified file into ar 2D array

Installation

npm install read-file-to-array

Used

/** txt file
ducmaster01|123456aa
ducmaster02|123456aa
*/
const { ReadFileToArray } = require("read-file-to-array");

ReadFileToArray(
  "./acc_test.txt",
  ["username", "password"],
  "|",
  (err, accounts) => {
    console.log({ accounts });
    /*
        {
          accounts: [
            { username: 'ducmaster01', password: '123456aa' },
            { username: 'ducmaster02', password: '123456aa' } 
          ]
        }
    */
  }
);

or

const { ReadFileToArraySync } = require("read-file-to-array");
1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago