digitallinguistics/javascript

Model.defineArrayProp

dwhieb opened this issue · 1 comments

Add the Model.defineArrayProp() utility method, which defines an array property on an object where each item in the array is expected to be an instance of a particular class/model. When the user sets this property to a new array, each item in the array is transformed into an instance of the provided class/model.