diff --git a/src/utils/index.js b/src/utils/index.js index 13b878a..9b4fa4d 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -2,8 +2,6 @@ import { buildSearch } from './data' import stringFromCodePoint from '../polyfills/stringFromCodePoint' import { uncompress } from './data' -const _JSON = JSON - const COLONS_REGEX = /^(?:\:([^\:]+)\:)(?:\:skin-tone-(\d)\:)?$/ const SKINS = ['1F3FA', '1F3FB', '1F3FC', '1F3FD', '1F3FE', '1F3FF'] @@ -109,7 +107,7 @@ function getData(emoji, skin, set, data) { emojiData.variations || (emojiData.variations = []) if (emojiData.skin_variations && skin > 1) { - emojiData = JSON.parse(_JSON.stringify(emojiData)) + emojiData = JSON.parse(JSON.stringify(emojiData)) var skinKey = SKINS[skin - 1], variationData = emojiData.skin_variations[skinKey] @@ -134,7 +132,7 @@ function getData(emoji, skin, set, data) { } if (emojiData.variations && emojiData.variations.length) { - emojiData = JSON.parse(_JSON.stringify(emojiData)) + emojiData = JSON.parse(JSON.stringify(emojiData)) emojiData.unified = emojiData.variations.shift() } diff --git a/src/utils/store.js b/src/utils/store.js index 6d04d23..763476e 100644 --- a/src/utils/store.js +++ b/src/utils/store.js @@ -1,7 +1,5 @@ var NAMESPACE = 'emoji-mart' -const _JSON = JSON - var isLocalStorageSupported = typeof window !== 'undefined' && 'localStorage' in window @@ -32,7 +30,7 @@ function set(key, value) { } else { if (!isLocalStorageSupported) return try { - window.localStorage[`${NAMESPACE}.${key}`] = _JSON.stringify(value) + window.localStorage[`${NAMESPACE}.${key}`] = JSON.stringify(value) } catch (e) {} } }