parse-columns-cli
Advanced tools
Comparing version 2.0.0 to 3.0.0
24
cli.js
#!/usr/bin/env node | ||
'use strict'; | ||
const getStdin = require('get-stdin'); | ||
const meow = require('meow'); | ||
const parseColumns = require('parse-columns'); | ||
import process from 'node:process'; | ||
import getStdin from 'get-stdin'; | ||
import meow from 'meow'; | ||
import parseColumns from 'parse-columns'; | ||
@@ -18,3 +18,5 @@ const cli = meow(` | ||
localhost:9050 (LISTEN) | ||
`); | ||
`, { | ||
importMeta: import.meta, | ||
}); | ||
@@ -32,6 +34,8 @@ const input = cli.input[0]; | ||
if (input) { | ||
init(input); | ||
} else { | ||
getStdin().then(init); | ||
} | ||
(async () => { | ||
if (input) { | ||
init(input); | ||
} else { | ||
init(await getStdin()); | ||
} | ||
})(); |
122
package.json
{ | ||
"name": "parse-columns-cli", | ||
"version": "2.0.0", | ||
"description": "Parse text columns, like the output of unix commands. Returns JSON that you can manipulate with tools like jq or underscore-cli.", | ||
"license": "MIT", | ||
"repository": "sindresorhus/parse-columns-cli", | ||
"author": { | ||
"name": "Sindre Sorhus", | ||
"email": "sindresorhus@gmail.com", | ||
"url": "sindresorhus.com" | ||
}, | ||
"bin": { | ||
"parse-columns": "cli.js" | ||
}, | ||
"engines": { | ||
"node": ">=4" | ||
}, | ||
"scripts": { | ||
"test": "xo && ava" | ||
}, | ||
"files": [ | ||
"cli.js" | ||
], | ||
"keywords": [ | ||
"cli-app", | ||
"cli", | ||
"json", | ||
"jq", | ||
"underscore", | ||
"parse", | ||
"parser", | ||
"columns", | ||
"column", | ||
"col", | ||
"row", | ||
"text", | ||
"string", | ||
"str", | ||
"unix", | ||
"command", | ||
"cmd", | ||
"output", | ||
"csv", | ||
"shell", | ||
"sh", | ||
"term", | ||
"table" | ||
], | ||
"dependencies": { | ||
"get-stdin": "^5.0.1", | ||
"meow": "^3.5.0", | ||
"parse-columns": "^1.1.0" | ||
}, | ||
"devDependencies": { | ||
"ava": "*", | ||
"pify": "^2.3.0", | ||
"xo": "*" | ||
}, | ||
"xo": { | ||
"ignores": [ | ||
"test.js" | ||
] | ||
} | ||
"name": "parse-columns-cli", | ||
"version": "3.0.0", | ||
"description": "Parse text columns, like the output of unix commands. Returns JSON that you can manipulate with tools like jq or underscore-cli.", | ||
"license": "MIT", | ||
"repository": "sindresorhus/parse-columns-cli", | ||
"funding": "https://github.com/sponsors/sindresorhus", | ||
"author": { | ||
"name": "Sindre Sorhus", | ||
"email": "sindresorhus@gmail.com", | ||
"url": "https://sindresorhus.com" | ||
}, | ||
"bin": { | ||
"parse-columns": "./cli.js" | ||
}, | ||
"type": "module", | ||
"exports": "./index.js", | ||
"engines": { | ||
"node": "^12.20.0 || ^14.13.1 || >=16.0.0" | ||
}, | ||
"scripts": { | ||
"test": "xo && ava" | ||
}, | ||
"files": [ | ||
"cli.js" | ||
], | ||
"keywords": [ | ||
"cli-app", | ||
"cli", | ||
"json", | ||
"jq", | ||
"underscore", | ||
"parse", | ||
"parser", | ||
"columns", | ||
"column", | ||
"col", | ||
"row", | ||
"text", | ||
"string", | ||
"str", | ||
"unix", | ||
"command", | ||
"cmd", | ||
"output", | ||
"csv", | ||
"shell", | ||
"sh", | ||
"term", | ||
"table" | ||
], | ||
"dependencies": { | ||
"get-stdin": "^9.0.0", | ||
"meow": "^10.1.1", | ||
"parse-columns": "^3.0.0" | ||
}, | ||
"devDependencies": { | ||
"ava": "^3.15.0", | ||
"pify": "^5.0.0", | ||
"xo": "^0.46.4" | ||
} | ||
} |
@@ -1,13 +0,11 @@ | ||
# parse-columns-cli [](https://travis-ci.org/sindresorhus/parse-columns-cli) | ||
# parse-columns-cli | ||
> Parse text columns, like the output of unix commands. Returns JSON that you can manipulate with tools like [jq](https://github.com/stedolan/jq) or [underscore-cli](https://github.com/ddopson/underscore-cli). | ||
## Install | ||
```sh | ||
npm install --global parse-columns-cli | ||
``` | ||
$ npm install --global parse-columns-cli | ||
``` | ||
## Usage | ||
@@ -30,10 +28,4 @@ | ||
## Related | ||
- [parse-columns](https://github.com/sindresorhus/parse-columns) - API for this module | ||
## License | ||
MIT © [Sindre Sorhus](http://sindresorhus.com) |
Sorry, the diff of this file is not supported yet
33
Yes
3565
31
+ Added@babel/code-frame@7.26.2(transitive)
+ Added@babel/helper-validator-identifier@7.25.9(transitive)
+ Added@types/minimist@1.2.5(transitive)
+ Added@types/normalize-package-data@2.4.4(transitive)
+ Addedarray-uniq@3.0.0(transitive)
+ Addedarrify@3.0.0(transitive)
+ Addedcamelcase@6.3.0(transitive)
+ Addedcamelcase-keys@7.0.2(transitive)
+ Addedclone-regexp@3.0.0(transitive)
+ Addeddecamelize@5.0.1(transitive)
+ Addeddecamelize-keys@1.1.1(transitive)
+ Addedescape-string-regexp@5.0.0(transitive)
+ Addedexecall@3.0.0(transitive)
+ Addedfind-up@5.0.0(transitive)
+ Addedget-stdin@9.0.0(transitive)
+ Addedhard-rejection@2.1.0(transitive)
+ Addedhosted-git-info@4.1.0(transitive)
+ Addedindent-string@5.0.0(transitive)
+ Addedis-plain-obj@1.1.0(transitive)
+ Addedis-regexp@3.1.0(transitive)
+ Addedjs-tokens@4.0.0(transitive)
+ Addedjson-parse-even-better-errors@2.3.1(transitive)
+ Addedkind-of@6.0.3(transitive)
+ Addedlines-and-columns@1.2.4(transitive)
+ Addedlocate-path@6.0.0(transitive)
+ Addedlru-cache@6.0.0(transitive)
+ Addedmap-obj@4.3.0(transitive)
+ Addedmeow@10.1.5(transitive)
+ Addedmin-indent@1.0.1(transitive)
+ Addedminimist-options@4.1.0(transitive)
+ Addednormalize-package-data@3.0.3(transitive)
+ Addednum-sort@3.0.0(transitive)
+ Addedp-limit@3.1.0(transitive)
+ Addedp-locate@5.0.0(transitive)
+ Addedparse-columns@3.0.0(transitive)
+ Addedparse-json@5.2.0(transitive)
+ Addedpath-exists@4.0.0(transitive)
+ Addedpicocolors@1.1.1(transitive)
+ Addedquick-lru@5.1.1(transitive)
+ Addedread-pkg@6.0.0(transitive)
+ Addedread-pkg-up@8.0.0(transitive)
+ Addedredent@4.0.0(transitive)
+ Addedsemver@7.7.1(transitive)
+ Addedsplit-at@3.0.0(transitive)
+ Addedstrip-indent@4.0.0(transitive)
+ Addedtrim-newlines@4.1.1(transitive)
+ Addedtype-fest@1.4.0(transitive)
+ Addedyallist@4.0.0(transitive)
+ Addedyargs-parser@20.2.9(transitive)
+ Addedyocto-queue@0.1.0(transitive)
- Removedarray-find-index@1.0.2(transitive)
- Removedarray-uniq@1.0.3(transitive)
- Removedcamelcase@2.1.1(transitive)
- Removedcamelcase-keys@2.1.0(transitive)
- Removedclone-regexp@1.0.1(transitive)
- Removedcurrently-unhandled@0.4.1(transitive)
- Removedescape-string-regexp@1.0.5(transitive)
- Removedexecall@1.0.0(transitive)
- Removedfind-up@1.1.2(transitive)
- Removedget-stdin@4.0.15.0.1(transitive)
- Removedgraceful-fs@4.2.11(transitive)
- Removedhosted-git-info@2.8.9(transitive)
- Removedindent-string@2.1.0(transitive)
- Removedis-finite@1.1.0(transitive)
- Removedis-regexp@1.0.0(transitive)
- Removedis-supported-regexp-flag@1.0.1(transitive)
- Removedis-utf8@0.2.1(transitive)
- Removedload-json-file@1.1.0(transitive)
- Removedloud-rejection@1.6.0(transitive)
- Removedmeow@3.7.0(transitive)
- Removedminimist@1.2.8(transitive)
- Removednormalize-package-data@2.5.0(transitive)
- Removednum-sort@1.0.0(transitive)
- Removednumber-is-nan@1.0.1(transitive)
- Removedobject-assign@4.1.1(transitive)
- Removedparse-columns@1.3.0(transitive)
- Removedparse-json@2.2.0(transitive)
- Removedpath-exists@2.1.0(transitive)
- Removedpath-parse@1.0.7(transitive)
- Removedpath-type@1.1.0(transitive)
- Removedpify@2.3.0(transitive)
- Removedpinkie@2.0.4(transitive)
- Removedpinkie-promise@2.0.1(transitive)
- Removedread-pkg@1.1.0(transitive)
- Removedread-pkg-up@1.0.1(transitive)
- Removedredent@1.0.0(transitive)
- Removedrepeating@2.0.1(transitive)
- Removedresolve@1.22.10(transitive)
- Removedsemver@5.7.2(transitive)
- Removedsignal-exit@3.0.7(transitive)
- Removedsplit-at@1.2.0(transitive)
- Removedstrip-bom@2.0.0(transitive)
- Removedstrip-indent@1.0.1(transitive)
- Removedsupports-preserve-symlinks-flag@1.0.0(transitive)
- Removedtrim-newlines@1.0.0(transitive)
Updatedget-stdin@^9.0.0
Updatedmeow@^10.1.1
Updatedparse-columns@^3.0.0