padurets / BuildString

build string by parameters

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BuildString

Example

function asyncFunction(callback) {
    setTimeout(function(){
        var x = 'async '
        callback(x) // to continue build
    }, 2000);
}


var parameters = [
    'simple string ',
    asyncFunction,
    {
        value: 'hello world',
        test: /world/
    }
]


var string = new BuildString(parameters);

string.build(function(generatedString, isvalid){
    // generatedString === "simple string async hello world",
    // isvalid === true
});

About

build string by parameters

License:MIT License


Languages

Language:JavaScript 100.0%