Options
All
  • Public
  • Public/Protected
  • All
Menu

Module core/storage/utils

Index

Functions

  • Deletes an entry in a given object on a given index.

    No-op in case the index is not found.

    throws

    In case the index is invalid i.e. doesn't contain an entry or doesn't exist.

    Parameters

    Returns JSONObject

    An updated copy of the object.

  • Gets an entry in a given object on a given index.

    throws

    In case the index is an empty array.

    Parameters

    Returns JSONValue | undefined

    The value of the entry if any was found and undefined otherwise.

  • Updates / Adds an entry in a given object on a given index.

    Important

    Any errors thrown on a transformation function are bubbled up.

    Remember to take in to account that storage may not contain the data we expect it to, so always validate the type of the value passed on to the transformation function.

    Parameters

    Returns JSONObject

    An updated copy of the object.

Generated using TypeDoc