TinyBase logoTinyBase β

Convenience functions

defaultSorter

The defaultSorter function is provided as a convenience to sort keys alphanumerically, and can be provided to the sliceIdSorter and rowIdSorter parameters of the setIndexDefinition method in the indexes module, for example. Read more.

getUniqueId

The getUniqueId function returns a unique string of a given length. Read more.

jsonParseWithUndefined

The jsonParseWithUndefined function parses JSON that was serialized with the jsonStringWithUndefined function, restoring the undefined values within it. Read more.

jsonStringWithUndefined

The jsonStringWithUndefined function serializes an object to JSON, keeping any undefined values within it, which plain JSON would otherwise drop or turn into null. Read more.