Skip to content

Instantly share code, notes, and snippets.

View ljharb's full-sized avatar
🔜
working on that thing you asked about

Jordan Harband ljharb

🔜
working on that thing you asked about
View GitHub Profile
@ljharb
ljharb / grid.js
Last active August 29, 2015 14:15 — forked from getify/grid.js
function formatValue(x) {
var ret;
if (typeof x == "string") {
return "'" + x.replace(/\n/g,"\\n") + "'";
}
if (typeof x == "number" && x === 0 && (1/x === -Infinity)) {
return "-0";
}
if (Array.isArray(x)) {