🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

blessed

Package Overview
Dependencies
Maintainers
1
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

blessed - npm Package Compare versions

Comparing version

to
0.0.4

bin/tput.js

8

package.json

@@ -5,10 +5,12 @@ {

"author": "Christopher Jeffrey",
"version": "0.0.3",
"version": "0.0.4",
"main": "./lib/program.js",
"bin": "./bin/tput.js",
"preferGlobal": false,
"repository": "git://github.com/chjj/blessed.git",
"homepage": "https://github.com/chjj/blessed",
"bugs": { "url": "http://github.com/chjj/blessed/issues" },
"keywords": ["curses", "tui"],
"tags": ["curses", "tui"],
"keywords": ["curses", "tui", "tput"],
"tags": ["curses", "tui", "tput"],
"scripts": { "test": "node test", "bench": "node test --bench" }
}

@@ -5,6 +5,5 @@ # blessed

As of right now, it does not read all terminfo. It was designed for one
terminal's terminfo: **xterm**, but if you understand the differences between
the three popular vt100-based terminals (xterm, screen, rxvt), you should be
able to use it for any terminal.
Blessed was originally written to only support the xterm terminfo, but can
now parse and compile any terminfo to be completely portable accross all
terminals. See the `tput` example below.

@@ -16,3 +15,23 @@ I want this library to eventually become a high-level library for terminal

This will actually parse the xterm terminfo and compile every
string capability to a javascript function:
``` js
var Tput = require('blessed').Tput
, tput = Tput('xterm');
console.log(tput.setaf(4) + 'hello' + tput.sgr0());
```
To play around with it on the command line, it works just like tput:
``` bash
$ tput.js setaf 2
$ tput.js sgr0
$ echo "$(tput.js setaf 2)hello world$(tput.js sgr0)"
```
The higher level functionality is exposed in the main `blessed` module:
``` js
var blessed = require('blessed')

@@ -19,0 +38,0 @@ , program = blessed();

Sorry, the diff of this file is too big to display