Socket
Socket
Sign inDemoInstall

printable

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    printable

print array like table into console


Version published
Weekly downloads
9.5K
decreased by-9.5%
Maintainers
1
Install size
7.07 kB
Created
Weekly downloads
 

Readme

Source

print array as a table into console.

Install

npm install printable

Usage

/**
 * print [['helloworld', '你好'], ['hello', 'world']] =>
 * helloworld  你好
 * hello       world
 * @param  {Array} lines    source array
 * @param  {String|Number}  string border or length of space border
 * @param  {Number} max     each word max length
 * @return {String}         
 */
pt.print(lines, border, max);
var pt = require('printable');
var source = [['hello', 'world'], ['你好', '世界'], ['foo', 'bar']];
pt.print(source, ' | ');
// hello | world
// 你好  | 世界
// foo   | bar

pt.print(source, 1, 4);
//hell worl
//你好 世界
//foo  bar 

License

MIT

Keywords

FAQs

Last updated on 10 Sep 2012

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc