lib/simple-parameter-injector.js
/**
     * Injects array of parameters into the target string
     *
     * @private
     * @source https://github.com/sequelize/sequelize/blob/master/lib/sql-string.js -> SqlString.format
     *
     * @param {string} str The target string
     * @param {array} params The params to be injected into the target string
     *
     * @return {string} Target string with injected parameters
     */


@param {string} str The target string
@param {array} params The params to be injected into the target string

@return {string} Target string with injected parameters
@param { string } str The target string @param { array } params The params to be injected into the target string @return { string } Target string with injected parameters
injectParamsArray(str, params) {
        return str.replace(/\?/g, (match) => {
            if (!params.length) {
                return match;
            }
            return params.shift();
        });
    }
injectParamsArray ( str , params ) { return str . replace ( / \? / g , ( match ) => { if ( ! params . length ) { return match ; } return params . shift ( ) ; } ) ; }
Injects array of parameters into the target string
 @private
 @source https://github.com/sequelize/sequelize/blob/master/lib/sql-string.js -> SqlString.format
Injects array of parameters into the target string @private @source https : // github . com / sequelize / sequelize / blob / master / lib / sql - string . js - > SqlString . format