Skip to content

add backlinks for each property (automatic inverse) #6

Description

@vsimko

For example:

id2obj.Gordon.calls.$id // -> Alyx
id2obj.Gordon.calls.$$calls.$id // -> Gordon

It would also be nice to allow replacement of certain "inverse" and maybe also "symmetric properties:

const invPropMap = {
  calls: 'calledBy',
  knows: 'knows' // symmetric property
}
mutateInverseProperties(invPropMap)(id2obj)

id2obj.Gordon.calls.calledBy.$id // -> Gordon
id2obj.Gordon.knows.$id // -> Alyx
id2obj.Gordon.knows.knows.$id // -> Gordon

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions