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

hermit

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hermit - npm Package Compare versions

Comparing version 0.1.3 to 0.2.0

bin/hermit.js

1

hermit.js

@@ -7,3 +7,2 @@ var parse = require('./lib/parse')

var hermit = module.exports = function hermit(html, opts, cb) {
console.log('running hermit');
if (!cb) {

@@ -10,0 +9,0 @@ cb = opts;

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

[ 'p', 'dl', 'dt', 'dd', 'ol', 'ul', 'li', 'address', 'blockquote', 'center', 'del', 'div', 'hr', 'pre' ]
[ 'p', 'dl', 'dt', 'dd', 'ol', 'ul', 'li', 'address', 'blockquote', 'center', 'del', 'div', 'hr', 'pre', 'tr' ]
.forEach(function (k) { blocks[k] = { prefix: '\n', suffix: '\n' }; });

@@ -20,3 +20,3 @@

opts.listIndent = opts.listIndent || ' ';
opts.listStyle = opts.listStyle || colors.red('\u25b8 ');
opts.listStyle = opts.listStyle || colors.red('\u25aa ');

@@ -23,0 +23,0 @@ function processNode(node) {

{
"name": "hermit",
"version": "0.1.3",
"version": "0.2.0",
"description": "Prints html in the terminal using colors and simple layout to reflect the document structure.",
"main": "hermit.js",
"bin": {
"hermit": "./bin/hermit.js"
},
"scripts": {

@@ -7,0 +10,0 @@ "test": "node test/runner.js"

@@ -5,2 +5,10 @@ # hermit [![build status](https://secure.travis-ci.org/thlorenz/hermit.png)](http://next.travis-ci.org/thlorenz/hermit)

## Objective
Provide a simple tool to render html in the terminal in a readable format. It is not supposed to replace your browser.
The main indended use is to render html snippets, e.g., the ones contained in the descriptions of the [json version of
the nodejs documentation](http://nodejs.org/api/assert.json).
If you want a terminal browser, try [lynx](http://lynx.browser.org/) instead.
## Installation

@@ -12,4 +20,22 @@

### As Library
### From the Command Line
To use hermit from the command line, you should install it globally:
npm -g install hermit
#### Rendering a File
hermit filename.html
#### Piping an Html String
You can pipe the output of any program that produces an html string into hermit.
**Example:**
curl http://nodejs.org/api/assert.html | hermit
### From Your Code
```js

@@ -16,0 +42,0 @@ var hermit = require('hermit');

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