https://github.com/devsnek/to_cell
https://github.com/devsnek/to_cell
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/devsnek/to_cell
- Owner: devsnek
- Created: 2017-06-25T09:23:21.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-06-25T09:27:22.000Z (over 8 years ago)
- Last Synced: 2025-03-20T01:41:00.869Z (9 months ago)
- Language: JavaScript
- Size: 1000 Bytes
- Stars: 13
- Watchers: 2
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### convert structures to [cell](https://github.com/intercellular/cell)
```js
> const to_cell = require('to_cell')
undefined
> to_cell.jsx('
')
[ { '$type': 'h1', '$cell': true } ]
> to_cell.html('')
[ { '$type': 'h1', '$cell': true } ]
> to_cell.jsx(' {}}>
')
[ { '$type': 'h1', '$cell': true, onclick: [Function] } ]
> to_cell.jsx(' {}}>hi
')
[ { '$type': 'h1',
'$cell': true,
onclick: [Function],
'$text': 'hi' } ]
> to_cell.html('hi
')
[ { '$type': 'h1', '$cell': true, '$text': 'hi' } ]
```