0.2.0 • Published 6 years ago

@gjmcn/data-cube-print-console v0.2.0

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

Print Data-Cubes in the terminal.

See the Data-Cube plugins page for loading instructions.

The module adds two methods to Array.prototype:

  • print: print a cube (or a standard array)

  • info: print summary information about a cube (or a standard array)

The methods call console.log and return the cube/array.

Currently, the only formatting option is whether to draw lines between rows:

const setOps = require('@gjmcn/data-cube-print-console');
setOps({compact: false});   //draw lines

Notes

  • Since print and info return the calling array, they can be used to print intermediate results. For example, x.sum().print().sqrt().

  • print and info do not convert a standard array to a cube like core Data-Cube methods do.

  • This module cannot be used in the browser; see data-cube-print-html.