New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

sealine-transform

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sealine-transform

``` const Transform = require('saeline.transform'); const transform = new Transform({ minify: true });

latest
Source
npmnpm
Version
0.0.2
Version published
Maintainers
1
Created
Source

Parse less and es6 in html, then transform them

const Transform = require('saeline.transform');
const transform = new Transform({
  minify: true
});


transform.compile(html).then(ret => {
  console.log('html: ' + ret)
}).catch(e => {
  console.log(e)
});

before

  <!DOCTYPE html>
  <html>
  <head>
    <meta charset="UTF-8">
    <title>test</title>
    <style>
      @color: #f00;
      body {
        color: @color;
      }
    </style>
  </head>
  <body>
  <script>
    let a = 10;
    alert(a);
  </script>
  </body>
  </html>

after

  <!DOCTYPE html>
  <html>
  <head>
    <meta charset="UTF-8">
    <title>test</title>
    <style>
      body {
        color: #f00;
      }
    </style>
  </head>
  <body>
  <script>
    var a = 10;
    alert(a);
  </script>
  </body>
  </html>

FAQs

Package last updated on 24 Apr 2016

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