@texting/translator
Advanced tools
Comparing version 0.0.10 to 0.0.11
@@ -8,3 +8,3 @@ 'use strict'; | ||
const makeReplaceable = function (dict) { | ||
if (this !== null && this !== void 0 && this.sort) sortKeysByLength(dict); | ||
if (this != null && this.sort) sortKeysByLength(dict); | ||
Object.defineProperty(dict, Symbol.replace, { | ||
@@ -11,0 +11,0 @@ value(word, after) { |
const sortKeysByLength = dict => dict.sort(([a], [b]) => String(b).length - String(a).length); | ||
const makeReplaceable = function (dict) { | ||
if (this !== null && this !== void 0 && this.sort) sortKeysByLength(dict); | ||
if (this != null && this.sort) sortKeysByLength(dict); | ||
Object.defineProperty(dict, Symbol.replace, { | ||
@@ -6,0 +6,0 @@ value(word, after) { |
{ | ||
"name": "@texting/translator", | ||
"version": "0.0.10", | ||
"version": "0.0.11", | ||
"description": "Translator, bulk replace string at a time", | ||
@@ -30,3 +30,3 @@ "main": "dist/index.cjs.js", | ||
"homepage": "https://github.com/gadge/spare#readme", | ||
"gitHead": "dc57cfa4c97ec9130bc54a0ca0644d47152bd242" | ||
"gitHead": "51e4340828860e5ae4cff91fd23764b6555cbfe4" | ||
} |
5950