mirror of
https://github.com/bobwen-dev/react-templates
synced 2025-04-12 00:56:39 +02:00
replace util.format with ES6 template strings
This commit is contained in:
parent
232e0de5cf
commit
3a1fcf6d33
@ -11,7 +11,6 @@ const rtError = require('./RTCodeError');
|
||||
const reactSupport = require('./reactSupport');
|
||||
const templates = reactSupport.templates;
|
||||
const utils = require('./utils');
|
||||
const util = require('util');
|
||||
const validateJS = utils.validateJS;
|
||||
const RTCodeError = rtError.RTCodeError;
|
||||
|
||||
@ -214,7 +213,8 @@ function handleEventHandler(val, context, node, key) {
|
||||
}
|
||||
|
||||
function genBind(func, args) {
|
||||
return util.format('%s.bind(%s)', func, (['this'].concat(args)).join(','));
|
||||
const bindArgs = ['this'].concat(args);
|
||||
return `${func}.bind(${bindArgs.join(',')})`;
|
||||
}
|
||||
|
||||
function handleStyleProp(val, node, context) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user