table
Advanced tools
Comparing version 0.0.5 to 1.0.0
{ | ||
"name": "table", | ||
"description": "Node Tables", | ||
"version": "0.0.5", | ||
"author": "Jan Gorman <gorman.jan@gmail.com>", | ||
"keywords": ["table", "cli", "text"], | ||
"dependencies": { "vows": ">=0.5.3"}, | ||
"repository" : {"type": "git" , "url": "https://github.com/JanGorman/node-table" }, | ||
"directories": { | ||
"lib": "./lib" | ||
"version": "1.0.0", | ||
"description": "Formats data into a string table.", | ||
"main": "./dist/index.js", | ||
"author": { | ||
"name": "Gajus Kuizinas", | ||
"email": "gk@anuary.com", | ||
"url": "http://gajus.com" | ||
}, | ||
"engines": { "node": ">= 0.2.0" } | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/gajus/table" | ||
}, | ||
"keywords": [ | ||
"ascii", | ||
"text", | ||
"table" | ||
], | ||
"scripts": { | ||
"test": "babel-node ./node_modules/.bin/gulp lint", | ||
"build": "babel-node ./node_modules/.bin/gulp build", | ||
"watch": "babel-node ./node_modules/.bin/gulp watch" | ||
}, | ||
"devDependencies": { | ||
"babel-core": "^5.8.24", | ||
"babel-loader": "^5.3.2", | ||
"babel-plugin-lodash": "^0.2.0", | ||
"canonical": "^1.0.1", | ||
"chai": "^3.2.0", | ||
"chalk": "^1.1.1", | ||
"del": "^2.0.2", | ||
"globby": "^3.0.1", | ||
"gulp": "^3.9.0", | ||
"gulp-babel": "^5.2.1", | ||
"gulp-mocha": "^2.1.3", | ||
"gulp-sourcemaps": "^1.5.2", | ||
"gulp-util": "^3.0.6" | ||
}, | ||
"dependencies": { | ||
"ansi-slice": "^1.0.3", | ||
"bluebird": "^2.10.0", | ||
"lodash": "^3.10.1", | ||
"string-length": "^1.0.1", | ||
"string-width": "^1.0.1", | ||
"strip-ansi": "^3.0.0", | ||
"xregexp": "slevithan/xregexp#baef6b6429fbd6f9aeb3c2c86a41b5422b023e18" | ||
} | ||
} |
@@ -1,47 +0,32 @@ | ||
## About | ||
# Table | ||
table is a component to create text based tables. This might be useful for text emails or to display tables in the CLI. | ||
[![NPM version](http://img.shields.io/npm/v/table.svg?style=flat)](https://www.npmjs.com/package/table) | ||
[![js-canonical-style](https://img.shields.io/badge/code%20style-canonical-brightgreen.svg?style=flat)](https://github.com/gajus/canonical) | ||
## Install | ||
(This library is work in progress. The working library will be released in 2.0.0.) | ||
npm install table | ||
Formats data into a string table. | ||
## Example | ||
* Works with strings containing [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) characters. | ||
* Works with strings containing [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code). | ||
* Supports `minWidth`, `maxWidth` properties per column. | ||
* Supports expanding long cell values into multiple rows. | ||
var sys = require('sys'), Table = require('table'); | ||
## Usage | ||
var table = new Table( [15, 20] ); | ||
table | ||
.setDefaultColumnAlignment(['left', 'center']) | ||
.appendRow(['Node', 'Table']) | ||
.appendRow(['Second', 'Row']) | ||
.appendRow(['Third', 'Row']) | ||
.appendRow(["Fourth\nsecond line", 'Row']); | ||
sys.puts(table.render()); | ||
will result in a nice looking table: | ||
### Basic Table | ||
+---------------+--------------------+ | ||
|Node | Table | | ||
|---------------+--------------------| | ||
|Second | Row | | ||
|---------------+--------------------| | ||
|Third | Row | | ||
|---------------+--------------------| | ||
|Fourth | Row | | ||
|second line | | | ||
+---------------+--------------------+ | ||
Valid alignments are 'left', 'center' and 'right'. | ||
Table data is described using an array of arrays. | ||
## Build | ||
```js | ||
let table = require('table'), | ||
data; | ||
To build the project call | ||
data = [ | ||
['0A', '0B', '0C'], | ||
['1A', '1B', '1C'], | ||
['2A', '2B', '2C'] | ||
]; | ||
cake build | ||
## Test | ||
To run the test simply call | ||
cake test | ||
console.log(table(data)); | ||
``` |
GitHub dependency
Supply chain riskContains a dependency which resolves to a GitHub URL. Dependencies fetched from GitHub specifiers are not immutable can be used to inject untrusted code or reduce the likelihood of a reproducible install.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
SPDX disjunction
LicenseSPDX disjunction for an artifact's license information
Found 1 instance in 1 package
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
SPDX disjunction
LicenseSPDX disjunction for an artifact's license information
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
77799
48
1475
1
7
13
33
3
+ Addedansi-slice@^1.0.3
+ Addedbluebird@^2.10.0
+ Addedlodash@^3.10.1
+ Addedstring-length@^1.0.1
+ Addedstring-width@^1.0.1
+ Addedstrip-ansi@^3.0.0
+ Addedxregexp@slevithan/xregexp#baef6b6429fbd6f9aeb3c2c86a41b5422b023e18
+ Addedansi-regex@2.1.1(transitive)
+ Addedansi-slice@1.2.0(transitive)
+ Addedbluebird@2.11.0(transitive)
+ Addedcode-point-at@1.1.0(transitive)
+ Addedis-fullwidth-code-point@1.0.0(transitive)
+ Addedlodash@3.10.1(transitive)
+ Addednumber-is-nan@1.0.1(transitive)
+ Addedsplice-string@1.0.0(transitive)
+ Addedstring-length@1.0.1(transitive)
+ Addedstring-width@1.0.2(transitive)
+ Addedstrip-ansi@3.0.1(transitive)
- Removedvows@>=0.5.3
- Removedbalanced-match@1.0.2(transitive)
- Removedbrace-expansion@1.1.11(transitive)
- Removedconcat-map@0.0.1(transitive)
- Removeddiff@4.0.2(transitive)
- Removedeyes@0.1.8(transitive)
- Removedfs.realpath@1.0.0(transitive)
- Removedglob@7.2.3(transitive)
- Removedinflight@1.0.6(transitive)
- Removedinherits@2.0.4(transitive)
- Removedminimatch@3.1.2(transitive)
- Removedonce@1.4.0(transitive)
- Removedpath-is-absolute@1.0.1(transitive)
- Removedvows@0.8.3(transitive)
- Removedwrappy@1.0.2(transitive)