Skip to content

How to you propose to change the __id__ value ? #4

@cadesalaberry

Description

@cadesalaberry

In my use of xdiff, I need to deduce uniqueness from the "id" field, not __id__. I have seen it was one of your next amelioration.

How do you propose to go about it ?

I was thinking about:

var x = require('xdiff').withIdField('id')
var x = require('xdiff')
x.setIdField('id')

A bit uglier, add an idField parameter to all the functions defaulting to __id__ if not specified:

function shallowEqual (a, b, idField) {
...

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