dot-notes v1.0.0 DotNotes.Keys

Module containing key parsing actions for DotNotes.

This is easily the most complicated part of DotNotes and backs almost every action available in the main interface. All key parsing is done via recursive actions using Regex matching. Certain places use pattern matching where possible for the performance benefits.

Summary

Functions

Parses a dot notation binary into a list of keys

Functions

execute(position, input, keys)

Specs

execute(position :: number, input :: binary, keys :: [binary]) :: keys :: [binary]

Parses a dot notation binary into a list of keys.

Array style keys are transformed into numbers, any others into binary. We do this using an internal recursion on the input. We prepend any new keys to the list and then reverse the list at the end to maintain order.