From 3a1fcf6d33c2281850badece1a96e8f03206e3c8 Mon Sep 17 00:00:00 2001 From: Omer Ganim Date: Mon, 2 May 2016 13:53:48 +0300 Subject: [PATCH] replace util.format with ES6 template strings --- src/reactTemplates.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/reactTemplates.js b/src/reactTemplates.js index 5a3902f..b002b7f 100644 --- a/src/reactTemplates.js +++ b/src/reactTemplates.js @@ -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) {