jmsv / oaty

Object Array Transposer(y) - JS objects with multiple key/value structures
https://www.npmjs.com/package/oaty
MIT License
10 stars 0 forks source link

get/set internal array #8

Open jmsv opened 5 years ago

jmsv commented 5 years ago

get/set functions for internal array, this._original. something like:

get array(): object[] {
  return this._original
}

set array(input: object[]) {
  // same as constructor but without reassigning `this._keys`
  // should be moved to new function to avoid code duplication
  this._original = input.map((x) => Object.assign({}, x))
  this._transposed = transpose(this._keys, this._original)
}
j-m commented 5 years ago

Redesign adds getters for original and internal but no setters.