NPM:
npm i @epubknowledge/entityverter
Yarn:
yarn add @epubknowledge/entityverter
const entityverter = require('@epubknowledge/entityverter)
Package has four parameters to operate:
entityverter(input, output, result, cli)
Breakdown of each:
input
: absolute file path to be worked on. Can take just the filename and it will build an absolute path.output
: absolute file path if not wanting the package to overwrite theinput
file.result
: JSON object that indicates what was replaced in the file. If set totrue
and nothing is replaced it will returnfalse
.cli
: This detects wether this is being used as a CLI or package, package default is set tofalse
.