New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

hyperscript-string-async

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

hyperscript-string-async

An async/promisified version of hyperscript-string

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

hyperscript-string-async

Build status NPM version XO code style

An async/promisified version of hyperscript-string

Installation

Install hyperscript-string-async using npm:

npm install --save hyperscript-string-async

Usage

Module usage

const h = require('hyperscript-string-async');

h('ul.list', [
	h('li.item', 'Lorem ipsum'),
	h('li.item', {title: 'Second item'}, 'Dolor sit'),
	h('li.item', 'Amet')
])
.then(html => {
	/*
	<ul class="list">
		<li class="item">Lorem ipsum</li>
		<li title="Second item" class="item">Dolor sit</li>
		<li class="item">Amet</li>
	</ul>
	*/
});
  • hyperscript-string - Create HTML strings with JavaScript
  • hyperscript-normalize-args - A hyperscript helper to normalize component arguments, for easier creation of reusable components
  • hyperscript-helpers - Terse syntax for hyperscript
  • hyperscript - Create HyperText with JavaScript, on client or server.

API

ha(selector[, attrs, children])

NameTypeDescription
selectorString or Promise<String>Contains at least the HTML tag name
attrsObject or Promise<Object> or Object<Promise>Attributes for the HTML tag
childrenString or Array or Promise<String> or Promise<Array> or Array<Promise>The children for the HTML tag

Returns: Promise<String>, the generated HTML.

License

MIT © Joakim Carlstein

Keywords

hyperscript

FAQs

Package last updated on 02 Mar 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