@gjmcn/data-cube-print-console

0.2.0 • Public • Published

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.

/@gjmcn/data-cube-print-console/

    Package Sidebar

    Install

    npm i @gjmcn/data-cube-print-console

    Weekly Downloads

    0

    Version

    0.2.0

    License

    MIT

    Unpacked Size

    8.48 kB

    Total Files

    5

    Last publish

    Collaborators

    • gjmcn