Socket
Socket
Sign inDemoInstall

jstransformer

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jstransformer

Normalize the API of any jstransformer


Version published
Weekly downloads
1.5M
increased by1.02%
Maintainers
1
Weekly downloads
 
Created

What is jstransformer?

The jstransformer npm package provides a standardized interface for handling different kinds of transformations on strings, such as compiling template languages, processing markdown, or minifying code. It allows developers to use a consistent API across various transformers.

What are jstransformer's main functionalities?

Template Compilation

Compile templates from languages like Jade/Pug to HTML.

const jstransformer = require('jstransformer');
const jade = require('jstransformer-jade');

const input = 'h1 Jade - node template engine';
const result = jstransformer(jade).render(input).body;
console.log(result);

Markdown Processing

Convert markdown syntax to HTML.

const jstransformer = require('jstransformer');
const markdown = require('jstransformer-markdown');

const input = '# Markdown Example\n\nSome *emphasis* and **strong** text.';
const result = jstransformer(markdown).render(input).body;
console.log(result);

Code Minification

Minify JavaScript code using UglifyJS.

const jstransformer = require('jstransformer');
const uglify = require('jstransformer-uglify-js');

const input = 'function add(x, y) {\n  return x + y;\n}';
const result = jstransformer(uglify).render(input).body;
console.log(result);

Other packages similar to jstransformer

Keywords

FAQs

Package last updated on 12 Apr 2015

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