
Security News
/Company News
Socket Is Sponsoring Composer and Packagist
Socket has joined the new Composer and Packagist sponsorship program as a launch sponsor, supporting the team that keeps PHP's package ecosystem secure.
TBoneTBone is an small JavaScript library for generating valid HTML. It is based on an article by Jason Grosman, "Behind the Code: Avoiding Spaghetti". As of version 0.2.x it has been re-written as a YUI module (mostly so I can learn YUI's toolchain :-)
var YUI = require("yui").YUI;
YUI().use("tbone", function (Y) {
var TBone = Y.TBone,
markup = new TBone.HTML();
// Displaying an HTML 5 valid HTML page.
Y.log(markup.html(
markup.head(
markup.title("Hello World")
),
markup.body(
markup.h1("Hello World")
)
));
});
YUI().use("tbone", function (Y) {
var TBone = Y.TBone,
markup = new TBone.HTML();
//
// Generate a simple HTML page.
//
var markup = new TBone.HTML(),
page_source = tbone.html(
markup.head(
"<!-- Test comment -->",
markup.title("Simple 0")
),
markup.body(
markup.h1("Sample 0"),
markup.p("Hello World")
)
);
// Display it
Y.log(page_source);
});
YUI().use("tbone", function (Y) {
var TBone = require("tbone");
//
// Generate a simple HTML page.
//
var markup = new TBone.HTML(),
page_source = markup.html(
markup.head(
markup.title("Simple 1")
),
markup.body(
markup.h1("Sample 1").attr({"class": "banner"}),
markup.p("Hello Again World").attr({"class": "content"})
)
);
// Display it
Y.log(page_source);
FAQs
A simple library to generate valid HTML markup.
The npm package tbone receives a total of 9 weekly downloads. As such, tbone popularity was classified as not popular.
We found that tbone 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
/Company News
Socket has joined the new Composer and Packagist sponsorship program as a launch sponsor, supporting the team that keeps PHP's package ecosystem secure.

Research
/Security News
Benign-looking npm packages split malicious functionality across a dependency chain that deploys a cross-platform RAT targeting Alibaba developers.

Research
/Security News
Two Joyfill npm beta releases contain an import-time implant that uses blockchain transactions to retrieve a remote-access trojan.