npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

node_tables

v1.0.1

Published

This is a simple project to treat tables easily.

Downloads

5

Readme

Table guide

This package can be installed in every node project as well as react-native-cli and expo-cli. The simple project comes from a personal need. Hope this will be useful!

This package allows you to use simple tables easily.

Installation

It's very easy to download, just run the following command: npm install node_tables

Simple demo (javascript)

The javascript code is very simple, first you need to import the package by using:

import Tables from "node_tables";

Then create the object Table:

let table = new Table(arg1,arg2,arg3,arg4,arg5);

Below there is the full table where you can understand the function of the five arguments.

|Name|Function| |---|---| |arg1|Number of rows| |arg2|Number of columns| |arg3|It's a boolean variable that allows you to use labels for columns and rows.| |arg4|If the third argument is true, you have to pass the array of labels (row names)| |arg5|If the third argument is true, you have to pass the array of labels (columns names)|

Tip

You will be able to point to a cell by passing the row number, and the column number or simply by the row's name,and the column's name.

Then, create the 2D array of data:

const values = [
    [64,59,56,51], [65, 60, 61, 55], [67,65,62,63], [67,65.6,62.7,63], [67,65,'k',63],
]

Now you can fill the table by passing the previous 2D array (this is an async function).

table.fill(values).then(() => {table.print(); console.log('The value selected is: ',table.getValue(1, 1))});

Warning

The indexes (row and column) start from 1 and not from 0 as usual in arrays (this way should be easier to read).

All the methods

Down below there the full table that shows you all the available methods.

|Name|Function| |---|---| |fill(array)|Fill the table by passing the 2D data array.| |getCell(row, column)| It returns the cell object at those indexes (you can also pass the row's name or the column's name).| |getValue(row, column)|It returns the cell value at those indexes (you can also pass the row's name or the column's name).| |set(val, row, column)|It overrides the value of a cell with a new one (you can also pass the row's name or the column's name). | |indexOf(val, allowStringConversion)|It returns an array containing all the row indexes and column indexes when it finds your value. In order to be able to search for an integer by passing a string with the same value (or the other way around) you have to pass a boolean as the second argument.| |print()|It is used mainly for debug and it prints the table in the console.|

Contact me

If you have any questions or suggestions please contact me at: [email protected]