From 513920e5bfd2d462d736002a3cbcc0db9ecca204 Mon Sep 17 00:00:00 2001 From: Dmitry Fedyuk Date: Thu, 7 Sep 2017 07:54:26 +0300 Subject: [PATCH] 2.11.25 --- Core/view/base/web/my/string.js | 16 +++++++++++----- composer.json | 2 +- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/Core/view/base/web/my/string.js b/Core/view/base/web/my/string.js index d9d62f49c..508633522 100644 --- a/Core/view/base/web/my/string.js +++ b/Core/view/base/web/my/string.js @@ -36,20 +36,20 @@ define(['df-lodash', 'df-uniform', 'jquery'], function(_, uniform, $) {return { /** * 2015-11-02 * http://stackoverflow.com/a/7616484 - * @param {String} string + * @param {String} s * @returns {Number} */ - hash: function(string) { + hash: function(s) { /** @type {Number} */ var result = 0; - if (string.length) { + if (s.length) { /** @type {Number} */ var i; /** @type {Number} */ var len; - for (i = 0, len = string.length; i < len; i++) { + for (i = 0, len = s.length; i < len; i++) { /** @type {Number} */ - var chr = string.charCodeAt (i); + var chr = s.charCodeAt (i); result = ((result << 5) - result) + chr; result |= 0; // Convert to 32bit integer } @@ -65,6 +65,12 @@ define(['df-lodash', 'df-uniform', 'jquery'], function(_, uniform, $) {return { * @returns {String|String[]} */ lcFirst: uniform(function(s) {return s.charAt(0).toLowerCase() + s.slice(1);}), + /** + * 2017-09-07 + * @param {String} s + * @returns {String} + */ + normalizePhone(s) {return '+' + s.replace(/\D/g, '');}, /** * 2015-11-04 * Вставляет подстроку newChunk в заданное место position строки string. diff --git a/composer.json b/composer.json index 801d9a2e3..0ca74e414 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "mage2pro/core" - ,"version": "2.11.24" + ,"version": "2.11.25" ,"description": "Mage2.PRO core package." ,"type": "magento2-module" ,"homepage": "https://mage2.pro"