mirror of
https://github.com/cudr/slate-collaborative.git
synced 2024-10-27 20:34:06 +00:00
11 lines
296 B
TypeScript
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 }
|