object-tagger
Advanced tools
@@ -102,4 +102,6 @@ // @flow | ||
if (value === undefined || typeof value === 'number') { | ||
key = key.replace(new RegExp(tagSuffix + '$'), ''); | ||
if (tagKeys.has(key)) { | ||
// '' + tagSuffix is also potentially a valid tag | ||
// if the empty string was a key | ||
const match = key.match(new RegExp('(.*)' + tagSuffix + '$')); | ||
if (match && tagKeys.has(match[1])) { | ||
return true; | ||
@@ -106,0 +108,0 @@ } |
{ | ||
"name": "object-tagger", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Takes a POJO and tags specified keys with unique numbers.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
283674
0.04%7912
0.03%