Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
tableify
Advanced tools
Readme
From any JavaScript object, HTML tables create.
Given any Javascript object including Object, Array, Number, Date, null, undefined, primitives,
etc, tableify
generates HTML tables that represent each object. In the case of Arrays containing
Objects (hash tables), it will generate a table with a header row containing the key names of the
object found in the first element of the array.
Every value to be output to the table is processed through tableify
recursively so objects containing
other objects will result in tables within tables.
For each td
cell that is created, a class is generated based on the constructor.name
of the value, or
null
if the value is null.
npm install tableify
var tableify = require('tableify');
var html = tableify({
someArrayOfObjects : [
{ a : 1, b : 2, c : 3 }
, { a : 2, b : 3, c : 4 }
, { a : 3, b : 4, c : 5 }
]
, someObject : {
key1 : 'value1'
, someArray : [
'value2'
, 'value3'
, 'value4'
, 'value5'
]
, someArrayOfObjects : [
{ key2 : 123 }
, { key2 : 234 }
, { key2 : 345 }
]
}
});
console.log(html);
When installed with npm install -g tableify
you get the tablify command line utility.
This is a simple command which accepts JSON from stdin and outputs html to stdout. I use
it for emailing json files in a nice format for debugging purposes.
The --style option prepends a <style> tag with some default css
cat datafile.json | tableify --style | mutt -e 'set content_type="text/html"' me@myaddress.com
MIT
FAQs
Create HTML tables from Javascript Objects
The npm package tableify receives a total of 2,821 weekly downloads. As such, tableify popularity was classified as popular.
We found that tableify demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.