@zkochan/pnpm
Version:
Fast, disk space efficient package manager
138 lines (137 loc) • 6.9 kB
JSON
{
"_args": [
[
{
"raw": "as-table@^1.0.31",
"scope": null,
"escapedName": "as-table",
"name": "as-table",
"rawSpec": "^1.0.31",
"spec": ">=1.0.31 <2.0.0",
"type": "range"
},
"/home/zkochan/src/pnpm/packages/pnpm/node_modules/stacktracey"
]
],
"_from": "as-table@>=1.0.31 <2.0.0",
"_id": "as-table@1.0.36",
"_inCache": true,
"_location": "/as-table",
"_nodeVersion": "4.9.1",
"_npmOperationalInternal": {
"host": "s3://npm-registry-packages",
"tmp": "tmp/as-table_1.0.36_1531778745875_0.910462242436503"
},
"_npmUser": {
"name": "xpl",
"email": "rocket.mind@gmail.com"
},
"_npmVersion": "2.15.11",
"_phantomChildren": {},
"_requested": {
"raw": "as-table@^1.0.31",
"scope": null,
"escapedName": "as-table",
"name": "as-table",
"rawSpec": "^1.0.31",
"spec": ">=1.0.31 <2.0.0",
"type": "range"
},
"_requiredBy": [
"/stacktracey"
],
"_resolved": "https://registry.npmjs.org/as-table/-/as-table-1.0.36.tgz",
"_shasum": "e38f5c85e184cd7f6efe2885d8dbc80c2b731ec4",
"_shrinkwrap": null,
"_spec": "as-table@^1.0.31",
"_where": "/home/zkochan/src/pnpm/packages/pnpm/node_modules/stacktracey",
"author": {
"name": "Vitaly Gordon",
"email": "rocket.mind@gmail.com"
},
"bugs": {
"url": "https://github.com/xpl/as-table/issues"
},
"dependencies": {
"printable-characters": "^1.0.37"
},
"description": "A simple function that print objects / arrays as ASCII tables. Handles ANSI styling and weird 💩 Unicode emoji symbols – they won't break the layout.",
"devDependencies": {
"ansicolor": "^1.1.71",
"babel-cli": "^6.26.0",
"babel-plugin-transform-es2015-destructuring": "^6.23.0",
"babel-plugin-transform-es2015-spread": "^6.22.0",
"coveralls": "^2.13.3",
"eslint": "^4.8.0",
"istanbul": "^0.4.5",
"mocha": "^3.5.3",
"nyc": "^11.2.1"
},
"directories": {},
"dist": {
"shasum": "e38f5c85e184cd7f6efe2885d8dbc80c2b731ec4",
"tarball": "https://registry.npmjs.org/as-table/-/as-table-1.0.36.tgz",
"fileCount": 13,
"unpackedSize": 264613
},
"gitHead": "ca3c56179dcb23aeb6fb16721b5386d57caedc73",
"homepage": "https://github.com/xpl/as-table",
"keywords": [
"ASCII",
"table",
"sheet",
"grid",
"print",
"log",
"print table",
"object as table",
"array as table",
"text table",
"array table",
"object table",
"array format",
"columns",
"as table",
"tablefy",
"columns",
"stringify",
"print object",
"grid",
"tty",
"terminal",
"console",
"text",
"layout"
],
"license": "MIT",
"main": "build/as-table.js",
"maintainers": [
{
"name": "x84",
"email": "igor.kroitor@gmail.com"
},
{
"name": "xpl",
"email": "rocket.mind@gmail.com"
}
],
"name": "as-table",
"optionalDependencies": {},
"readme": "# as-table\n\n[](https://travis-ci.org/xpl/as-table) [](https://coveralls.io/github/xpl/as-table) [](https://npmjs.com/package/as-table) [](https://david-dm.org/xpl/as-table) [](https://scrutinizer-ci.com/g/xpl/as-table/?branch=master)\n\nA simple function that print objects and arrays as ASCII tables. Supports ANSI styling and weird 💩 Unicode emoji symbols (they won't break the layout), thanks to [`printable-characters`](https://github.com/xpl/printable-characters).\n\n```bash\nnpm install as-table\n```\n\n## Printing objects\n\n```javascript\nasTable = require ('as-table')\n\nasTable ([ { foo: true, string: 'abcde', num: 42 },\n { foo: false, string: 'qwertyuiop', num: 43 },\n { string: null, num: 44 } ])\n```\n```\nfoo string num\n----------------------\ntrue abcde 42 \nfalse qwertyuiop 43 \n null 44 \n```\n\n## Printing arrays\n\n```javascript\nasTable ([['qwe', '123456789', 'zxcvbnm'],\n ['qwerty', '12', 'zxcvb'],\n ['qwertyiop', '1234567', 'z']])\n```\n```\nqwe 123456789 zxcvbnm\nqwerty 12 zxcvb\nqwertyiop 1234567 z\n```\n\n## Limiting total width by proportionally trimming cells + setting columns delimiter\n\n```javascript\nasTable.configure ({ maxTotalWidth: 22, delimiter: ' | ' }) (data)\n```\n```\nqwe | 1234… | zxc…\nqwer… | 12 | zxc…\nqwer… | 1234… | z \n```\n\n## Right align\n\n```javascript\nasTable.configure ({ right: true }) (data)\n```\n```\n foo bar baz\n-----------------------------\n qwe 123456789 zxcvbnm\n qwerty 12 zxcvb\nqwertyiop 1234567 z\n```\n\n## Providing a custom object printer\n\n```javascript\nasTable.configure ({ print: obj => (typeof obj === 'boolean') ? (obj ? 'yes' : 'no') : String (obj) }) (data)\n```\n```\nfoo string num\n--------------------\nyes abcde 42 \nno qwertyuiop 43 \n null 44 \n```\n\n## Obtaining a pre-configured function\n\n```javascript\nasTable = require ('as-table').configure ({ maxTotalWidth: 25, delimiter: ' | ' })\n\nasTable (data)\n```\n\n## Customizing the title rendering and the header separator\n\nWith string coloring by [`ansicolor`](https://github.com/xpl/ansicolor) (just for the demo purposes, any library will fit):\n\n```javascript\nasTable = require ('as-table').configure ({ title: x => x.bright, delimiter: ' | '.dim.cyan, dash: '-'.bright.cyan })\n\nconsole.log (\n asTable ([ { foo: true, string: 'abcde', num: 42 },\n { foo: false, string: 'qwertyuiop'.bgMagenta.green.bright, num: 43 } ])\n```\n\n<img width=\"179\" alt=\"screen shot 2017-07-21 at 23 46 14\" src=\"https://user-images.githubusercontent.com/1707/28481945-dcb0f8d6-6e6e-11e7-896e-dfad40662daf.png\">\n\n",
"readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git+https://github.com/xpl/as-table.git"
},
"scripts": {
"autotest": "env AS_TABLE_TEST_FILE='./as-table' mocha --reporter spec --watch",
"babel": "babel as-table.js --source-maps inline --out-file ./build/as-table.js",
"build": "npm run lint && npm run lint-test && npm run babel",
"coveralls": "nyc report --reporter=text-lcov | coveralls",
"lint": "eslint as-table.js",
"lint-test": "eslint test.js",
"test": "npm run build && env AS_TABLE_TEST_FILE='./build/as-table' nyc --reporter=html --reporter=text mocha --reporter spec"
},
"typings": "./as-table.d.ts",
"version": "1.0.36"
}