@@ -1,6 +1,12 @@
setImmediate(function () {
try {
- console.log([typeof process, typeof setImmediate, typeof global, typeof Buffer].join(' '))
+ const types = {
+ process: typeof process,
+ setImmediate: typeof setImmediate,
+ global: typeof global,
+ Buffer: typeof Buffer
+ }
+ console.log(JSON.stringify(types))
} catch (e) {
console.log(e.message)
}
@@ -1,5 +1,12 @@
- console.log([typeof process, typeof setImmediate, typeof global, typeof Buffer, typeof global.Buffer].join(' '))
+ Buffer: typeof Buffer,
+ 'global.Buffer': typeof global.Buffer
@@ -1 +1,7 @@
-console.log([typeof require, typeof module, typeof process, typeof Buffer].join(' '))
+const types = {
+ require: typeof require,
+ module: typeof module,
+}
+console.log(JSON.stringify(types))
@@ -1,7 +1,13 @@
<html>
<body>
<script type="text/javascript" charset="utf-8">
- console.log([typeof require, typeof module, typeof process, typeof global].join(' '));
+ global: typeof global
+ console.log(JSON.stringify(types));
</script>
</body>
</html>
@@ -1,7 +1,12 @@
- console.log([typeof require, typeof module, typeof process].join(' '));
+ process: typeof process
@@ -1,4 +1,6 @@
<script>
-const item = window.localStorage.getItem('test');
-console.log([item, window.localStorage.length].join(' '));
+console.log(JSON.stringify({
+ numberOfEntries: window.localStorage.length,
+ testValue: window.localStorage.getItem('test')
+}));