From 0cea45164e278975a7bfa2e722b9c7a580c24c53 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 19 Jan 2018 15:07:09 +0200 Subject: [PATCH] chore(polyfill) es2015-ify --- client/modules/polyfill.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/client/modules/polyfill.js b/client/modules/polyfill.js index 9fbcb401..bc85cb29 100644 --- a/client/modules/polyfill.js +++ b/client/modules/polyfill.js @@ -14,7 +14,7 @@ if (!Array.isArray) * https://gist.github.com/2581101 */ DOM.scrollIntoViewIfNeeded = function(element, centerIfNeeded) { - var parent, + let parent, topWidth, leftWidth, parentComputedStyle, @@ -87,13 +87,14 @@ if (!window.JSON) { /* https://gist.github.com/754454 */ window.JSON.stringify = function(obj) { - var n, v, has, + let n, v, has, ret = '', value = '', - json = [], - isStr = itype.string(obj), - isObj = itype.object(obj), - isArray = itype.array(obj); + json = []; + + let isStr = itype.string(obj); + let isObj = itype.object(obj); + let isArray = itype.array(obj); if (!isObj || obj === null) { // simple data type