replace util.format with ES6 template strings

This commit is contained in:
Omer Ganim 2016-05-02 13:53:48 +03:00
parent 232e0de5cf
commit 3a1fcf6d33
1 changed files with 2 additions and 2 deletions

View File

@ -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) {