From 2bf500f6e70e9f86df953cfc6a734d778e3d3205 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Tue, 21 Aug 2018 02:30:15 +0300 Subject: [PATCH] unified a pice of code between object.js and core.js + npm update Signed-off-by: Alex A. Naanou --- ui (gen4)/features/core.js | 25 ++----------------------- ui (gen4)/package-lock.json | 6 +++--- ui (gen4)/package.json | 2 +- 3 files changed, 6 insertions(+), 27 deletions(-) diff --git a/ui (gen4)/features/core.js b/ui (gen4)/features/core.js index 5f61993a..c969f067 100755 --- a/ui (gen4)/features/core.js +++ b/ui (gen4)/features/core.js @@ -231,30 +231,9 @@ if(typeof(window) != 'undefined'){ var doc = module.doc = function(strings, ...values){ - var lines = strings + return object.normalizeIndent(strings .map(function(s, i){ return s + (values[i] || '') }) - .join('') - .split(/\n/g) - - // get the common whitespae offset... - var l = lines - .reduce(function(l, e, i){ - var indent = e.length - e.trimLeft().length - return ( - // ignore empty lines... - e.trim().length == 0 - // ignore 0 indent of first line... - || (i == 0 && indent == 0) ? l - : l < 0 ? - indent - : Math.min(l, indent)) - }, -1) - - return lines - .map(function(line, i){ - return i == 0 ? line : line.slice(l) }) - .join('\n') -} + .join('')) } // Indicate that an action is not intended for direct use... diff --git a/ui (gen4)/package-lock.json b/ui (gen4)/package-lock.json index e8c0c64e..4bcf5fbc 100755 --- a/ui (gen4)/package-lock.json +++ b/ui (gen4)/package-lock.json @@ -1158,9 +1158,9 @@ } }, "ig-object": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/ig-object/-/ig-object-1.0.6.tgz", - "integrity": "sha512-M6WkUMIhoPypsmgmMKl88vaHob7v3k9+tuEYuusYEWaRNVEeftZerFkj4Aby8vIiXCAilHup5FNepDPgfihNTw==" + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/ig-object/-/ig-object-1.0.7.tgz", + "integrity": "sha512-bBlxP0AE9oxjUEtIzgZN302nuUAYycAOeh2F2D/z3OSl4zUc+R0Cb9HMpwOO4gZfc6I4ZV9tr/Ax1lk4KkW/aQ==" }, "image-size": { "version": "0.5.5", diff --git a/ui (gen4)/package.json b/ui (gen4)/package.json index fe0f073d..5cc52b98 100755 --- a/ui (gen4)/package.json +++ b/ui (gen4)/package.json @@ -28,7 +28,7 @@ "guarantee-events": "^1.0.0", "ig-actions": "^3.19.3", "ig-features": "^3.3.4", - "ig-object": "^1.0.6", + "ig-object": "^1.0.7", "moment": "^2.22.2", "openseadragon": "^2.4.0", "requirejs": "^2.3.5",