New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

taki

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

taki - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

19

dist/taki.js

@@ -6,6 +6,7 @@ 'use strict';

var puppeteer = _interopDefault(require('puppeteer'));
var minifier = _interopDefault(require('html-minifier'));
function getHTML(browser, { url, wait = 50, manually, onFetch, onFetched }) {
function getHTML(browser, { url, wait = 50, manually, onFetch, onFetched, minify }) {
return new Promise(function ($return, $error) {
var page, html;
var page, html, minifyOptions;

@@ -45,3 +46,15 @@ onFetch && onFetch(url);

onFetched && onFetched(url);
return $return(html);
minifyOptions = typeof minify === 'object' ? minify : {
minifyCSS: true,
minifyJS: true,
collapseWhitespace: true,
decodeEntities: true,
removeComments: true,
removeAttributeQuotes: true,
removeScriptTypeAttributes: true,
removeRedundantAttributes: true,
removeStyleLinkTypeAttributes: true
};
return $return(minify ? minifier.minify(html, minifyOptions) : html);
} catch ($boundEx) {

@@ -48,0 +61,0 @@ return $error($boundEx);

3

package.json
{
"name": "taki",
"version": "1.0.4",
"version": "1.0.5",
"description": "Take a snapshot of any website.",

@@ -30,2 +30,3 @@ "repository": {

"dependencies": {
"html-minifier": "^3.5.8",
"puppeteer": "^0.13.0"

@@ -32,0 +33,0 @@ },

@@ -86,2 +86,13 @@ # taki

### Minify
Minify HTML.
```js
taki({
url,
minify: true
})
```
## Contributing

@@ -88,0 +99,0 @@

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