diff options
Diffstat (limited to 'examples/browser_test.html')
| -rw-r--r-- | examples/browser_test.html | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/examples/browser_test.html b/examples/browser_test.html deleted file mode 100644 index 01bd7be2..00000000 --- a/examples/browser_test.html +++ /dev/null @@ -1,40 +0,0 @@ -<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> - - - - - |
