Socket
Socket
Sign inDemoInstall

crelt

Package Overview
Dependencies
0
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    crelt

Tiny DOM-element-creation utility


Version published
Weekly downloads
1.7M
increased by3.9%
Maintainers
1
Install size
5.26 kB
Created
Weekly downloads
 

Readme

Source

CRELT

Tiny DOM-element creation utility. Exports a single (default) value, which is a function that you call with:

  • A tag name string or DOM element.

  • Optionally an attribute object mapping names to values. When the values are strings, they are added to the element with setAttribute. When they have another type, they are assigned as regular properties (mostly useful for event handlers via onclick and such). When an attribute's value is null or undefined, it is not assigned.

  • Any number of children, which may be null (ignored), strings (added as text nodes), DOM nodes (added), or arrays (each element is added separately).

The function returns a DOM element.

License

This software is licensed under an MIT license.

Keywords

FAQs

Last updated on 17 May 2023

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc