cudr_slate-collaborative/packages/bridge/src/utils/index.ts
2019-10-07 00:14:14 +03:00

11 lines
296 B
TypeScript

import toSync from './toSync'
import hexGen from './hexGen'
export const toJS = node => JSON.parse(JSON.stringify(node))
export const cloneNode = node => toSync(toJS(node))
const toSlatePath = path => (path ? path.filter(d => Number.isInteger(d)) : [])
export { toSync, toSlatePath, hexGen }