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

hyperrender

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hyperrender

Universal render helper for hyperHTML

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

hyperrender

Build Status Standard - JavaScript Style Guide

Universal render helper for hyperHTML :sparkles:

Usage

hyperrender is a drop in replacement for hyperHTML.wire(obj?), capable of rendering templates on both the client and server.

const render = require('hyperrender')

// hyperHTML.wire(obj?) shorthand
render.html`<div>Hello world!</div>`
// render.html shorthand
render`<div>Hello world!</div>`
// hyperHTML.wire({ class: 'test' }) shorthand exposing wire interface
render.html({ class: 'test' })`<div>Hello world!</div>`

// hyperHTML.wire(obj?, 'svg') shorthand
render.svg`
  <svg width="120" height="120" viewBox="0 0 120 120"
       xmlns="http://www.w3.org/2000/svg">
    <rect x="10" y="10" width="100" height="100"/>
  </svg>
`
// hyperHTML.wire({ points: [1,2] }, 'svg') shorthand exposing wire interface
render.svg({ points: [1,2] })`
  <svg width="120" height="120" viewBox="0 0 120 120"
       xmlns="http://www.w3.org/2000/svg">
    <rect x="10" y="10" width="100" height="100"/>
  </svg>
`

License

MIT

Keywords

FAQs

Package last updated on 01 Jun 2017

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