mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-02-24 01:02:31 +01:00
22 lines
531 B
Markdown
22 lines
531 B
Markdown
|
|
||
|
# `Data`
|
||
|
|
||
|
```js
|
||
|
import { Data } from 'slate'
|
||
|
```
|
||
|
|
||
|
Data is simply a thin wrapper around [`Immutable.Map`](https://facebook.github.io/immutable-js/docs/#/Map), so that you don't need to ever depend on Immutable directly, and for future compatibility.
|
||
|
|
||
|
A data object can have any properties associated with it.
|
||
|
|
||
|
- [Static Methods](#static-methods)
|
||
|
- [`Data.create`](#data-create)
|
||
|
|
||
|
|
||
|
## Static Methods
|
||
|
|
||
|
### `Data.create`
|
||
|
`Data.create(properties: Object) => Data`
|
||
|
|
||
|
Create a data object from a plain Javascript object of `properties`.
|