Comparing version
{ | ||
"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. | ||
[](https://www.npmjs.com/package/table) | ||
[](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
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
77799
134.99%48
33.33%0
-100%1475
372.76%1
-50%7
600%13
Infinity%33
-29.79%3
200%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed