ixfx
    Preparing search index...

    Module @ixfx/core - v0.48.0

    Namespaces

    Maps

    Functions for working with map data structures

    Pathed

    A set of functions to work with plain objects using string paths to traverse the structure of an object

    Records

    Functions for working with simple objects

    Trackers

    Functions for tracking data over time

    Functions

    align

    Attempts to align prior data with new data, based on a provided similarity function.

    alignById

    Returns a function that attempts to align a series of data by its id. See also align for a version with no internal storage.

    compareIterableValuesShallow

    Compares the values of two iterables, returning a list of items they have in common and those unique in a or b. Ignores ordering of values, and is NOT recursive.

    comparerInverse

    Inverts the source comparer.

    continuously

    Returns a Continuously that continually executes callback at interval rate.

    defaultComparer

    Compares numbers by numeric value, otherwise uses the default logic of string comparison.

    defaultKeyer

    If values are strings, uses that as the key. Otherwise uses JSON.stringify.

    defaultToString

    Converts a value to string form. For simple objects, .toString() is used, other JSON.stringify is used. It is meant for creating debugging output or 'hash' versions of objects, and does not necessarily maintain full fidelity of the input

    elapsedInfinity

    Returns a function that reports an 'infinite' elapsed time. this can be useful as an initialiser for elapsedSince et al.

    elapsedInterval

    Returns the interval between the start and each subsequent call.

    elapsedOnce

    Returns elapsed time since initial call, however unlike elapsedSince, timer stops when first invoked.

    elapsedSince

    Returns elapsed time since the initial call.

    elapsedToHumanString

    Returns a human-readable representation of some elapsed milliseconds

    filterValue

    Returns v if predicate returns true, alternatively returning skipValue.

    hasLast

    Returns true if rx has a last value

    intervalToMs

    Return the millisecond value of an Interval.

    isEmptyEntries

    Returns true if Object.entries() is empty for value

    isEqualDefault

    Default comparer function is equiv to checking a === b. Use isEqualValueDefault to compare by value, via comparing JSON string representation.

    isEqualTrace

    Wraps the eq function, tracing the input data result

    isEqualValueDefault

    Comparer returns true if string representation of a and b are equal. Use isEqualDefault to compare using === semantics Uses toStringDefault to generate a string representation (via JSON.stringify).

    isEqualValueIgnoreOrder

    Comparer returns true if string representation of a and b are equal, regardless of field ordering. Uses toStringOrdered to generate a string representation (via JSON.stringify`).

    isEqualValuePartial

    Returns true if a contains the values of b. a may contain other values, but we only check against what is in b. a and b must both be simple objects.

    isInteger

    Returns true if value is an integer. Parses string input, but all other data types return false.

    isInterval

    Returns true if interval matches the Interval type.

    isMap

    Returns true if value is a Map type

    isPrimitive

    Returns true if value is number, string, bigint or boolean. Returns false if value is an object, null, undefined

    isPrimitiveOrObject

    Returns true if value is number, string, bigint, boolean or an object

    isReactive

    Returns true if rx is a Reactive

    isSet

    Returns true if value is a Set type

    jsComparer

    Default sort comparer, following same sematics as Array.sort. Consider using defaultComparer to get more logical sorting of numbers.

    keyValueSorter
    numericComparer

    Sort numbers in ascending order.

    promiseFromEvent
    resolve

    Resolves r to a value, where r is:

    • primitive value
    • a/sync function
    • a/sync generator/iterator
    • ReactiveNonInitial
    resolveFields

    Returns a copy of object, with the same properties. For each property that has a basic value (string, number, boolean, object), the value is set for the return object. If the property is a function or generator, its value is used instead. Async functions and generators are also usable.

    resolveFieldsSync

    'Resolves' all the fields of object in a synchronous manner. Uses resolveSync under-the-hood

    resolveSync

    For a given input r, attempts to 'resolve' it. See resolve for details.

    resolveWithFallback

    Resolves a value as per resolve, however If an error is thrown or the resolution results in undefined or NaN, fallbackValue is returned instead.

    resolveWithFallbackSync
    runningiOS

    Returns true if it seems like the code is running on iOS (iPad/iPhone)

    sleep

    Returns after timeout period.

    sleepWhile

    Delays until predicate returns true. Can be useful for synchronising with other async activities.

    toStringDefault

    A default converter to string that uses JSON.stringify if its an object, or the thing itself if it's a string

    toStringOrdered

    If input is a string, it is returned. Otherwise, it returns the result of JSON.stringify() with fields ordered.

    unique

    Tracks unique values. Returns true if value is unique. Alternatively: uniqueInstances

    uniqueInstances

    Tracks unique object instances. Returns true if value is unique. Alternatively: unique to track by value.

    Type Aliases

    AlignOpts

    Options for alignmnent

    ArrayItems

    Array items

    ArrayLengthMutationKeys

    Functions which modify an array

    BasicType
    ChangeKind

    Kind of change

    ChangeRecord

    Change record

    CompareChangeSet

    Result of compareObjectData

    Comparer
    CompareResult
    Continuously

    Runs a function continuously, returned by continuously

    ContinuouslyAsyncCallback
    ContinuouslyOpts

    Options for continuously

    ContinuouslySyncCallback
    DataWithId

    Some data with an id property.

    FixedLengthArray

    A fixed-length array

    HasCompletion
    HasCompletionRunStates
    IDictionary
    Interval

    Interval types allows for more expressive coding, rather than embedding millisecond values.

    IsEqual

    Function that returns true if a and b are considered equal

    IsEqualContext

    Return true if a and b ought to be considered equal at a given path

    IWithEntries
    KeyValue
    KeyValueSorter
    KeyValueSortSyles
    OnStartCalled
    Passed

    A message

    Primitive
    PrimitiveOrObject
    RankArrayOptions
    RankFunction

    A rank function that compares A and B. Returns the highest value, 'a' or 'b'. Returns 'eq' if values are equal

    RankOptions
    Reactive

    A Reactive

    ReactiveInitial

    A reactive with an initial value

    ReactiveNonInitial

    A reactive that does not have an initial value

    ReadonlyRemapObjectPropertyType
    RecursivePartial

    A type where every property is partial (recursive)

    RecursiveReplace

    Remaps TShape so each field has type TFieldValue. Recursive.

    RecursiveWriteable

    Removes readonly from all properties (recursive)

    RemapObjectPropertyType
    RequireOnlyOne

    Makes a type such that only one of the provided properties is required. RequireOnlyOne<someType, 'prop1'|'prop2'>

    ResolvedObject

    An object that can be 'resolved'.

    ResolveFallbackOpts
    ResolveToValue
    ResolveToValueAsync
    ResolveToValueSync

    Something that can resolve to a value

    Rest
    SignalKinds

    Signals

    Similarity

    Returns the similarity of a and b to each other, where higher similarity should be a higher number.

    Since
    SleepOpts
    StringOrNumber
    ToString
    TrackUnique
    Unsubscriber

    Unsubscribes from a reactive

    Writeable

    Removes readonly from all properties (non-recursive)

    Variables

    isEqualContextString

    Returns true if a and b are equal based on their JSON representations. path is ignored.