@fendy3002/string-tools
v0.1.2
Published
A simple application to help converting some text with specific format to desired format using configurable commands.
Downloads
11
Readme
QzStringTools
A simple application to help converting some text with specific format to desired format using configurable commands.
Running app
This repo comes with app server, run in http://localhost:3000.
git clone https://github.com/fendy3002/QzStringTools.git;
cd QzStringTools;
npm install;
npm start;
Installing
When you want to use this library in your own node project, you can install it via npm install.
npm install --save @fendy3002/string-tools
Basic usage
var StringTools = require('@fendy3002/string-tools');
var Config = StringTools.defaultConfig;
var input = 'Hello, world \n' +
'how, are, you?';
var selectedCommand = null;
for(var i = 0; i < Config.command.length; i++){
selectedCommand = Config.command[i];
if(selectedCommand.code == 'sql-single-quote'){ break; }
}
var result = StringTools.convert(input, selectedCommand, Config);
console.log('result', result);