Comparing version 0.1.1 to 0.1.2
@@ -39,3 +39,10 @@ 'use strict'; | ||
if (maskString) { | ||
return maskString.slice(selection.start, selection.end); | ||
var res = []; | ||
for (var i = selection.start; i < selection.end; i++) { | ||
res.push({ | ||
char: maskString[i], | ||
type: _charTypesEnum2.default.MASK | ||
}); | ||
} | ||
return res; | ||
} | ||
@@ -42,0 +49,0 @@ |
{ | ||
"name": "input-core", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "Core abilities of masked-input. Usefull to create custom input processors", | ||
@@ -20,3 +20,3 @@ "main": "./lib/inputCore", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"devDependencies": { | ||
"babel-cli": "^6.24.1", | ||
@@ -23,0 +23,0 @@ "babel-core": "^6.24.0", |
@@ -29,2 +29,4 @@ # Set of input tools for formatting | ||
0.1.2 Fix bug with uncorrect removing symbols range | ||
0.1.1 Fix bug with removing static symbol | ||
@@ -31,0 +33,0 @@ |
@@ -5,3 +5,3 @@ import charTypes from '../constants/charTypesEnum'; | ||
const copyMaskChar = (count) => { | ||
let res = []; | ||
const res = []; | ||
for (let i = 0; i < count; i++) { | ||
@@ -22,3 +22,10 @@ res.push({ | ||
if (maskString) { | ||
return maskString.slice(selection.start, selection.end); | ||
const res = []; | ||
for (let i = selection.start; i < selection.end; i++) { | ||
res.push({ | ||
char: maskString[i], | ||
type: charTypes.MASK, | ||
}) | ||
} | ||
return res; | ||
} | ||
@@ -25,0 +32,0 @@ |
35566
948
44