js-remapped icon indicating copy to clipboard operation
js-remapped copied to clipboard

Undefined when converting array with strings

Open ivan133 opened this issue 7 years ago • 0 comments

Here is the code

var remapped = require('remapped');
var source = {
  arr: ["0", "1", "2"],
};
var mapping = {
  myarr: 'arr',
};
remapped(source, mapping);

The result is

Object
myarr: Array[3]
0: undefined
1: undefined
2: undefined

It work is array consists of integers

ivan133 avatar Jul 07 '17 09:07 ivan133