diff options
| author | Marak <[email protected]> | 2015-07-08 15:47:55 -0700 |
|---|---|---|
| committer | Marak <[email protected]> | 2015-07-08 15:47:55 -0700 |
| commit | 85ade36275c9f8394ecd0e44fc0f400ffccc5696 (patch) | |
| tree | f5ccc47dcb66180f6592f683273701ad9986d9b7 /examples/browser_test.html | |
| parent | b0765aea125e9d89991d382e46c758860dc866aa (diff) | |
| download | faker-85ade36275c9f8394ecd0e44fc0f400ffccc5696.tar.xz faker-85ade36275c9f8394ecd0e44fc0f400ffccc5696.zip | |
[dist] Update examples
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> - - - - - |
