🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

@bem/sdk.bemjson-to-jsx

Package Overview
Dependencies
Maintainers
6
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bem/sdk.bemjson-to-jsx

Transform BEMJSON to JSX

latest
Source
npmnpm
Version
0.2.9
Version published
Maintainers
6
Created
Source

bemjson-to-jsx

Transforms BEMJSON objects to JSX markup.

NPM Status

Install

$ npm install --save @bem/sdk.bemjson-to-jsx

Usage

const bemjsonToJSX = require('@bem/sdk.bemjson-to-jsx')();

const bemjson = {
    block: 'button2',
    mods: { theme: 'normal', size: 'm' },
    text: 'hello world'
};

const jsxTree = bemjsonToJSX.process(bemjson);

console.log(jsxTree.JSX);
// → "<Button2 theme={'normal'} size={'m'} text={'hello world'}/>"

Keywords

bemjson

FAQs

Package last updated on 03 Feb 2019

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