New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

create-element-ts

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

create-element-ts

Very simple DOM generator with types declaration

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-71.43%
Maintainers
1
Weekly downloads
 
Created
Source

DOM Generator

Very simple DOM generator with types declaration.

Installation

From NPM

# Via npm
npm install create-element-ts
# Or pnpm
pnpm add create-element-ts
# Yarn? sure
yarn add create-element-ts

Then import it to your project.

// ESM
import { h } from 'create-element-ts'
// CJS
const { h } = require('create-element-ts')

In browser

<script src="https://unpkg.com/create-element-ts/dist/index.umd.js"></script>
<script>
  const { h } = window.CreateElement
  // ...
</script>

Or... Why not ESM?

import { h } from 'https://unpkg.com/create-element-ts?module'
// ...

Usage

// step-1  - create element
const block = h('div', { class: 'foo' }, [h('span', 'bar'), 'baz'])
// step-2? - no more steps!
console.info(block.outerHTML) // <div class="foo"><span>bar</span>baz</div>

Keywords

FAQs

Package last updated on 15 Feb 2023

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