mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-18 13:11:17 +02:00
Optimize isText
, isElement
, isNodeList
and isEditor
(#5859)
* Remove the `isPlainObject` check from `isText` and `isElement` for performance * Optimise `isElement`, `isNodeList` and `isText` further * Update changeset * Fix changeset * Refactor object check into `isObject`
This commit is contained in:
8
.changeset/tough-pianos-train.md
Normal file
8
.changeset/tough-pianos-train.md
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
'slate': patch
|
||||
'slate-history': patch
|
||||
'slate-hyperscript': patch
|
||||
'slate-react': patch
|
||||
---
|
||||
|
||||
Optimize `isElement`, `isText`, `isNodeList` and `isEditor` by removing dependency on `is-plain-object` and by performing shallow checks by default. To perform a full check, including all descendants, pass the `{ deep: true }` option to `isElement`, `isNodeList` or `isEditor`.
|
Reference in New Issue
Block a user