Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@webpod/ingrid

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@webpod/ingrid

A shell-printed tables parser

  • 0.0.0-beta.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
361
decreased by-67.27%
Maintainers
2
Weekly downloads
 
Created
Source

@webpod/ingrid

A shell-printed tables parser

Usage

There are so many tools for printing tables in the shell, but much less to parse them back.

import { parse } from '@webpod/ingrid'

const table = `
foo bar baz
1 2 3
`
const result = parse(table.trim())
// {foo: ['1'], bar: ['2'], baz: ['3']}

To parse wmic grids, set the format option:

const table = `
foo  bar  baz
1

  2  3

a

  b  c

  d  e
`

const result = parse(table.trim(), {format: 'win'})
/**
 [
   { foo: ['1'], bar: ['2'], baz: ['3'] },
   { foo: ['a'], bar: ['b'], baz: ['c'] },
   { foo: ['a'], bar: ['d'], baz: ['e'] }
 ]
 */

License

MIT

FAQs

Package last updated on 29 Mar 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc