nl_tokens: Given an optional cursor and a default offset returns the offset to use ; if the cursor contains a valid offset that will be used otherwise it will be the default .
pl_tokens: function getOffset ( cursor , defaultOffset ) { if ( typeof cursor === 'undefined' || cursor === null ) { return defaultOffset ; } let <mask> = cursorToOffset ( cursor ) ; if ( isNaN ( offset ) ) { return defaultOffset ; } return offset ; }