mirror of
https://github.com/cudr/slate-collaborative.git
synced 2026-03-02 03:40:18 +00:00
feat: update
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import toSync from './toSync'
|
||||
import hexGen from './hexGen'
|
||||
|
||||
export const toJS = node => {
|
||||
const toJS = node => {
|
||||
try {
|
||||
return JSON.parse(JSON.stringify(node))
|
||||
} catch (e) {
|
||||
@@ -10,8 +10,8 @@ export const toJS = node => {
|
||||
}
|
||||
}
|
||||
|
||||
export const cloneNode = node => toSync(toJS(node))
|
||||
const cloneNode = node => toSync(toJS(node))
|
||||
|
||||
const toSlatePath = path => (path ? path.filter(d => Number.isInteger(d)) : [])
|
||||
|
||||
export { toSync, toSlatePath, hexGen }
|
||||
export { toSync, toJS, toSlatePath, hexGen, cloneNode }
|
||||
|
||||
Reference in New Issue
Block a user