josephg/ShareJS — Issue #42: use the last path component type to disambiguate OT types
Author: tilgovi
Created: 2011-10-28 23:27:59+00:00
State: open

Since objects cannot have integer keys in JS, it's sufficient to check the type of the last path component to disambiguate object operations from operations on lists and strings.

object[0] === object['0'] always.

To go deeper into pairing down the number of OTs, taking a bracketed list as an argument to list operations allows for changing multiple items and disambiguating the operation from a string operation, further removing the need for different OTs based on type.