derbyjs / racer

Realtime model synchronization engine for Node.js
1.18k stars 116 forks source link

add support for multiple arguments to model.scope() & model.at() #269

Closed nateps closed 4 years ago

nateps commented 4 years ago

The arguments are effectively joined by dots. This will be helpful for adding typescript types to models while maintaining backwards compatibility.

Later, we probably want to maintain scope internally as an array rather than a string. Not solving that problem yet, but creating an array from multiple string arguments should be more efficient than splitting a string.

Alternative would be to accept array of strings as input, but that should probably be thought about across the board. Don't want to commit to it yet.