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

as-table

Package Overview
Dependencies
Maintainers
2
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

as-table - npm Package Compare versions

Comparing version 1.0.49 to 1.0.50

2

package.json
{
"name": "as-table",
"version": "1.0.49",
"version": "1.0.50",
"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.",

@@ -5,0 +5,0 @@ "main": "build/as-table.js",

@@ -68,3 +68,3 @@ # as-table

```javascript
asTable.configure ({ print: obj => (typeof obj === 'boolean') ? (obj ? 'yes' : 'no') : String (obj) }) (data)
asTable.configure ({ print: x => (typeof x === 'boolean') ? (x ? 'yes' : 'no') : String (x) }) (data)
```

@@ -79,2 +79,16 @@ ```

The callback also receives a field name (in case of objects) or a column index (in case of arrays):
```javascript
asTable = require ('as-table').configure ({
print (x, k) {
if (k === 'timestamp') return new Date (obj).toGMTString()
return String (k)
}
})
asTable ([ { name: 'A', timestamp: 1561202591572 },
{ name: 'B', timestamp: 1558524240034 } ])
```
## Obtaining a pre-configured function

@@ -81,0 +95,0 @@

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