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

hyperpug

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hyperpug

Pug for browser, based on Hyperscript

  • 1.5.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

HyperPug

npm version Website shields.io

Lighter Pug for browser/Electron. With Pug filters' support.

Usage

import HyperPug from 'hyperpug'
const hp = new HyperPug()

console.log(hp.parse(HYPERPUG_STRING))

Usage with filters

Filters are normalized for Markdown and other indented languages are well.

import HyperPug from 'hyperpug'
const hp = new HyperPug({
  markdown: (s) => {
    return markdownMaker(s)
  }
})

console.log(hp.parse(HYPERPUG_STRING))

Usage on the browser

<div id="hyperpug"></div>
<script src="https://unpkg.com/hyperpug"></script>
<script>
const hp = new HyperPug({
  markdown: (s) => {
    return markdownMaker(s)
  }
})

document.getElementById("hyperpug").innerHTML = hp.parse(`
style.
  .red {
    color: red;
  }

  section {
    margin-bottom: 1rem;
  }

section(class="x")
  div hello
  blockquote
    .red goodbye
  :markdown
    # This is some heading
br
small Yes, this is a good idea.
`)
</script>

Keywords

FAQs

Package last updated on 17 Jul 2020

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