https://github.com/crystallizeapi/crystallize-content-transformer
Validation and parsing for CCC
https://github.com/crystallizeapi/crystallize-content-transformer
Last synced: about 1 month ago
JSON representation
Validation and parsing for CCC
- Host: GitHub
- URL: https://github.com/crystallizeapi/crystallize-content-transformer
- Owner: CrystallizeAPI
- License: mit
- Created: 2018-05-23T10:09:48.000Z (about 7 years ago)
- Default Branch: main
- Last Pushed: 2023-03-04T03:48:52.000Z (over 2 years ago)
- Last Synced: 2024-11-11T20:33:33.658Z (8 months ago)
- Language: JavaScript
- Homepage:
- Size: 1.32 MB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README

# Crystallize Content Transformer
Validation, parsing and transforming for [Crystallize Content](https://crystallize.com/developers/react-components/crystallize-content-transformer). Makes it easy to build React Commerce solutions with [Product Information Management](https://crystallize.com/product/product-information-management) powered by [Crystallize](https://crystallize.com) that enable [Fast Ecommerce API](https://crystallize.com/product/graphql-commerce-api).
## Install
```
yarn add @crystallize/content-transformer
```## Validate
```
import validator from '@crystallize/content-transformer';const isValid = validator.isModelValid(myModel);
const validationDetails = validator.isModelValidVerbose(myModel);
```## toHTML
```
import toHTML from '@crystallize/content-transformer/toHTML';toHtml(contentModel);
```## toText
```
import toText from '@crystallize/content-transformer/toText';toText(contentModel);
```## React
See [@crystallize/react-content-transformer](https://www.npmjs.com/package/@crystallize/react-content-transformer)