```javascript

sql.replace(/:(\w+)/g, function (w, i) {
    return params[i] || '';
});
```