Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tessellate-transform

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tessellate-transform

Tessellate JSX/JSON transformer.

  • 1.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

tessellate-transform

Library to transform content from JSX or JSON to JSON. The output format can be consumed by tessellate-bundler. For example:

{
  "type": "div",
  "props": {
    "id": 1
  },
  "children": []
}

Usage:

import transform from 'tessellate-transform'

const file = {
  content: '...', // content string
  extname: '...'  // .jsx | .json
}
const options = { ... }
const object = transform(file, options)

Command line use:

tessellate-transform [OPTIONS] FILE

Options:
  --type-prefix  Prefix for React class names.     [string]
  --json-map     JSON property mapping file.       [file]
  --root         Type of surrounding root element. [string]

Options

type-prefix – typePrefix

String to directly prepend before each type property. Can be used for Node module names.

root – root

If provided, wraps the resulting JSON in another node with the given string as type.

json-map – jsonMap

Mapping rules for JSON to Tessellate JSON:

{
  "typeKeys": [],
  "childrenKeys": [],
  "literalKeys": [],
  "ignoreKeys": [],
  "typeMap": {}
}
  • typeKeys: keys of properties to use as type
  • childrenKeys: keys of properties to use as children
  • literalKeys: keys of properties to use as literal children
  • ignoreKeys: keys of properties to ignore
  • typeMap: map of type property values to other type property values

FAQs

Package last updated on 29 Nov 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc