-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
smartDereference
won't attempt to dereference a dereferenced value. For example,
let store = {};
const jon = {
id: 'user1',
name: 'jon'
};
const jonReference = createReference('users', jon.id);
store = resolveReference(store, jonReference, jon);
const comment = {
id: 'comment1',
author: jonReference,
comment: "something"
};
const commentReference = createReference('comments', comment.id);
store = resolveReference(store, commentReference, comment);
const blog = smartDereference(store, {
title: "Some blog",
comments: [commentReference]
});
// Should be jon, not jonReference
blog.comments[0].author === jonReference
User should be able to specify recursion depth. An infinite depth risks causing a stack overflow on a circular reference
Metadata
Metadata
Assignees
Labels
No labels