Skip to content

Bug with keys with dot like "a.b" #11

Description

@mixalbl4-127

Example:

const diffs = diff({ x: "y" }, { "a.b": "c", x: "y" });
// {$set: {a.b: "c"}}
const result = apply({}, diffs);
// {a: {b: "c"}}

lib must escape dots in names because apply splices by dots :(
please help with it @mirek

------ Update ------
possible FAST problem solution: add new argument splitSymbol with default .
if sombody needs (like me) can change . to $=> for example and use it.
I think it’s almost impossible to find such a combination of characters in the key name.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions