UNPKG

limu

Version:

A fast js lib of immutable data, based on shallow copy on read and mark modified on write mechanism

16 lines (15 loc) 362 B
import { limuKey } from '../support/symbols'; /** * 方便 finishDraft 时 copy 对象也能够移除 limuData * @param copy * @param meta */ export function recordCopyRef(copy, meta) { if (copy[limuKey]) { copy[limuKey].c = meta.copy; } } export function assignCopyToMeta(copy, meta) { meta.copy = copy; recordCopyRef(copy, meta); }