UNPKG

react-pivot

Version:

React-Pivot is a data-grid component with pivot-table-like functionality for data display, filtering, and exploration.

41 lines (35 loc) 1.26 kB
<html> <head> <script src = "../faker.js" type = "text/javascript"></script> <script> var card = faker.helpers.createCard(); if(typeof JSON == 'undefined'){ document.write('get a real browser that has JSON.stringify and JSON.parse built in <br/>'); // implement JSON.stringify serialization var JSON = {}; JSON.stringify = function (obj) { var t = typeof (obj); if (t != "object" || obj === null) { // simple data type if (t == "string") obj = '"'+obj+'"'; return String(obj); } else { // recurse array or object var n, v, json = [], arr = (obj && obj.constructor == Array); for (n in obj) { v = obj[n]; t = typeof(v); if (t == "string") v = '"'+v+'"'; else if (t == "object" && v !== null) v = JSON.stringify(v); json.push((arr ? "" : '"' + n + '":') + String(v)); } return (arr ? "[" : "{") + String(json) + (arr ? "]" : "}"); } }; } document.write(JSON.stringify(card)); </script> </head> <body> </body> </html>