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


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

@return {string} Target string with injected parameters
@param { string } str The target string @param { object } params The params to be injected into the target string @return { string } Target string with injected parameters
injectParamsObject(str, params) {
        return str.replace(/\:+(?!\d)(\w+)/g, (value, key) => {
            if (params[key] !== undefined) {
                return params[key];
            }
            throw new Error('[1438415385] Named parameter "' + value + '" has no value in the given object.');
        });
    }
injectParamsObject ( str , params ) { return str . replace ( / \:+(?!\d)(\w+) / g , ( value , key ) => { if ( params [ key ] !== undefined ) { return params [ key ] ; } throw new Error ( '[1438415385] Named parameter "' + value + '" has no value in the given object.' ) ; } ) ; }
Injects object of parameters into the target string
 @private
 @source https://github.com/sequelize/sequelize/blob/master/lib/sql-string.js -> SqlString.formatNamedParameters
Injects object of parameters into the target string @private @source https : // github . com / sequelize / sequelize / blob / master / lib / sql - string . js - > SqlString . formatNamedParameters