0.1.2 • Published 7 years ago

@fendy3002/string-tools v0.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
7 years ago

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);

Use cases

From excel spreadsheet to sql select

From newline delimited to be part of select in

From PHP Array to Object syntax