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

renderkid

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

renderkid

Stylish console.log for node

  • 3.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
11M
decreased by-6.59%
Maintainers
1
Weekly downloads
 
Created

What is renderkid?

RenderKid is a powerful HTML rendering engine designed for Node.js. It allows developers to create and manipulate HTML content programmatically with ease. The package is particularly useful for generating HTML for emails, reports, or any other content that needs to be dynamically created and styled.

What are renderkid's main functionalities?

HTML Rendering

RenderKid allows you to render HTML content. In this example, a simple HTML string is rendered and logged to the console.

const RenderKid = require('renderkid');
const kid = new RenderKid();
const html = kid.render('<div>Hello, <b>world</b>!</div>');
console.log(html);

CSS Styling

RenderKid supports CSS styling. In this example, the <b> tag is styled to have red text color.

const RenderKid = require('renderkid');
const kid = new RenderKid();
kid.style({
  'b': {
    'color': 'red'
  }
});
const html = kid.render('<div>Hello, <b>world</b>!</div>');
console.log(html);

Custom Tags

RenderKid allows you to define custom tags. In this example, a custom tag <custom> is defined and rendered as a <span> with a class of 'custom'.

const RenderKid = require('renderkid');
const kid = new RenderKid();
kid.addTag('custom', {
  render: function (node) {
    return `<span class='custom'>${node.innerHTML}</span>`;
  }
});
const html = kid.render('<div>Hello, <custom>world</custom>!</div>');
console.log(html);

Other packages similar to renderkid

FAQs

Package last updated on 23 Oct 2021

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