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

bemjson-to-html

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bemjson-to-html

BEMJSON to HTML serializer

  • 0.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

bemjson-to-html NPM version Build Status Dependency Status

BEMJSON to HTML serializer

This is optimized part of jsot-bh for generation HTML from constructed BEMJSON.

API

new BEMJSON([options])

Creates serializer object.

Options:

  • jsAttrScheme Boolean - If js, attribute with js params will be prefixed with return (default: js).
  • jsAttrName String - Specifies name of attribute, that will contain jsParams (default: onclick).
  • defaultTag String - Default tag name for block without tag property (default: div).

BEMJSON.toHtml(bemjson)

Returns serialized HTML string.

Benchmark

trivial
4,133,717 op/s » bemjson-to-html
2,371,357 op/s » bh

simple
109,658 op/s » bemjson-to-html
78,604 op/s » bh

full
27,264 op/s » bemjson-to-html
23,367 op/s » bh

stringify
1,508,587 op/s » stringify (no escaping)
843,899 op/s » stringify (escaped with replace)
388,025 op/s » stringify (escaped)
312,156 op/s » bemjson-to-html
220,219 op/s » bh

License

MIT (c) Vesvolod Strukchinsky

Keywords

FAQs

Package last updated on 11 Nov 2015

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