UNPKG

@atlaskit/adf-schema

Version:

Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs

8 lines 257 B
export const copyPrivateAttributes = (from, to, attributes, map) => { const attrs = attributes || {}; Object.keys(attrs).forEach(key => { if (key[0] === '_' && key[1] === '_' && from[key]) { to[map ? map(key) : key] = from[key]; } }); };