File: browser-iframe.html

package info (click to toggle)
node-is-plain-object 2.0.4%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 124 kB
  • sloc: javascript: 41; makefile: 2
file content (33 lines) | stat: -rw-r--r-- 477 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Cross-Realm isPlainObject()</title>
<script>

function Foo() {this.abc = {};};

// Should return true with isPlainObject()
var trues = [
  Object.create({}),
  Object.create(Object.prototype),
  {foo: 'bar'},
  {}
];

// Should return false with isPlainObject()
var falses = [
  /foo/,
  function() {},
  1,
  ['foo', 'bar'],
  [],
  new Foo,
  null,
  Object.create(null)
];

</script>
</head>
<body></body>
</html>