txtrafo

0.0.3 • Public • Published

txtrafo

Easily apply other module's string transform functions to stdio and text files.

Usage

from test/2nd-letter.js:

require('txtrafo')({
  sourceFilename: module.filename,
  trafoFunc: function (text) { return text.replace(/\w(\w)\w*/g, '$1'); },
  guessOutputFilename: function (fn) { return fn.slice(0, -3) + '.txt'; },
});

Known issues

  • CLI isn't implemented yet
  • needs more/better tests and docs

 

License

ISC

Package Sidebar

Install

npm i txtrafo

Weekly Downloads

22

Version

0.0.3

License

ISC

Unpacked Size

4.74 kB

Total Files

6

Last publish

Collaborators

  • mk-pmb