fernando-bosso / snakelize

MIT License
1 stars 1 forks source link

Unsupported snakefy array #7

Open fyfirman opened 3 years ago

fyfirman commented 3 years ago

Nice library dude, but unfortunately i stopped use this because there are issue when convert array camelCase to snake_case.

Input

const data = {
  otherAttribute: 'some data',
  myArray: ["kdr", "bdn", "du", "dsp", "mommy"]
};

snakefy(data)

Output

{
  other_attribute: 'some data',
  my_arr: {
    0: {0: "k", 1: "d", 2: "r"},
    1: {0: "b", 1: "d", 2: "n"},
    2: {0: "d", 1: "u"},
    3: {0: "d", 1: "s", 2: "p"},
    4: {0: "m", 1: "o", 2: "m", 3: "m", 4: "y"},
  }
}

Expected Output

{
  other_attribute: 'some data',
  my_array: ["kdr", "bdn", "du", "dsp", "mommy"]
}
fyfirman commented 3 years ago

Ask for a PR #8 @fernando-bosso