{"id":15792729,"url":"https://github.com/mikeralphson/node-green-analysis","last_synced_at":"2026-04-28T11:31:58.208Z","repository":{"id":66094139,"uuid":"125031691","full_name":"MikeRalphson/node-green-analysis","owner":"MikeRalphson","description":"What JS features you can use when you drop support for Node.js 4","archived":false,"fork":false,"pushed_at":"2018-03-21T20:02:10.000Z","size":116,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-11T23:16:15.141Z","etag":null,"topics":["compat","compatibility","es2017","es6","javascript","js","node","nodejs"],"latest_commit_sha":null,"homepage":"https://node.green","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MikeRalphson.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-13T10:11:34.000Z","updated_at":"2018-03-21T20:02:11.000Z","dependencies_parsed_at":"2023-05-09T19:32:40.388Z","dependency_job_id":null,"html_url":"https://github.com/MikeRalphson/node-green-analysis","commit_stats":{"total_commits":8,"total_committers":1,"mean_commits":8.0,"dds":0.0,"last_synced_commit":"78c79b610030e45ce825854ca49052d18795b4ed"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MikeRalphson%2Fnode-green-analysis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MikeRalphson%2Fnode-green-analysis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MikeRalphson%2Fnode-green-analysis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MikeRalphson%2Fnode-green-analysis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MikeRalphson","download_url":"https://codeload.github.com/MikeRalphson/node-green-analysis/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246523896,"owners_count":20791444,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["compat","compatibility","es2017","es6","javascript","js","node","nodejs"],"created_at":"2024-10-04T23:03:19.852Z","updated_at":"2026-04-28T11:31:58.110Z","avatar_url":"https://github.com/MikeRalphson.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Comparison of 6.13.1 4.8.7\n\n:toc: macro\n:toc-title:\n:toclevels: 99\n\n# Table of Contents\ntoc::[]\n\n## Node.js ES2015 Support\n\n### syntax\n\n#### undefined\n\n##### default function parameters\n\n###### basic functionality\n\n```js\nreturn (function (a = 1, b = 2) { return a === 3 \u0026\u0026 b === 2; }(3));\n```\n\n###### explicit undefined defers to the default\n\n```js\nreturn (function (a = 1, b = 2) { return a === 1 \u0026\u0026 b === 3; }(undefined, 3));\n```\n\n###### defaults can refer to previous params\n\n```js\nreturn (function (a, b = a) { return b === 5; }(5));\n```\n\n###### arguments object interaction\n\n```js\nreturn (function (a = \"baz\", b = \"qux\", c = \"quux\") {\n  a = \"corge\";\n  // The arguments object is not mapped to the\n  // parameters, even outside of strict mode.\n  return arguments.length === 2\n    \u0026\u0026 arguments[0] === \"foo\"\n    \u0026\u0026 arguments[1] === \"bar\";\n}(\"foo\", \"bar\"));\n```\n\n###### temporal dead zone\n\n```js\nreturn (function(x = 1) {\n  try {\n    eval(\"(function(a=a){}())\");\n    return false;\n  } catch(e) {}\n  try {\n    eval(\"(function(a=b,b){}())\");\n    return false;\n  } catch(e) {}\n  return true;\n}());\n```\n\n###### separate scope\n\n```js\nreturn (function(a=function(){\n  return typeof b === 'undefined';\n}){\n  var b = 1;\n  return a();\n}());\n```\n\n###### new Function() support\n\n```js\nreturn new Function(\"a = 1\", \"b = 2\",\n  \"return a === 3 \u0026\u0026 b === 2;\"\n)(3);\n```\n\n##### rest parameters\n\n###### basic functionality\n\n```js\nreturn (function (foo, ...args) {\n  return args instanceof Array \u0026\u0026 args + \"\" === \"bar,baz\";\n}(\"foo\", \"bar\", \"baz\"));\n```\n\n###### function 'length' property\n\n```js\nreturn function(a, ...b){}.length === 1 \u0026\u0026 function(...c){}.length === 0;\n```\n\n###### arguments object interaction\n\n```js\nreturn (function (foo, ...args) {\n  foo = \"qux\";\n  // The arguments object is not mapped to the\n  // parameters, even outside of strict mode.\n  return arguments.length === 3\n    \u0026\u0026 arguments[0] === \"foo\"\n    \u0026\u0026 arguments[1] === \"bar\"\n    \u0026\u0026 arguments[2] === \"baz\";\n}(\"foo\", \"bar\", \"baz\"));\n```\n\n###### can't be used in setters\n\n```js\nreturn (function (...args) {\n  try {\n    eval(\"({set e(...args){}})\");\n  } catch(e) {\n    return true;\n  }\n}());\n```\n\n###### new Function() support\n\n```js\nreturn new Function(\"a\", \"...b\",\n  \"return b instanceof Array \u0026\u0026 a+b === 'foobar,baz';\"\n)('foo','bar','baz');\n```\n\n##### RegExp \"y\" and \"u\" flags\n\n###### \"y\" flag\n\n```js\nvar re = new RegExp('\\\\w', 'y');\nre.exec('xy');\nreturn (re.exec('xy')[0] === 'y');\n```\n\n###### \"y\" flag, lastIndex\n\n```js\nvar re = new RegExp('yy', 'y');\nre.lastIndex = 3;\nvar result = re.exec('xxxyyxx')[0];\nreturn result === 'yy' \u0026\u0026 re.lastIndex === 5;\n```\n\n###### \"u\" flag\n\n```js\nreturn \"𠮷\".match(/^.$/u)[0].length === 2;\n```\n\n###### \"u\" flag, Unicode code point escapes\n\n```js\nreturn \"𝌆\".match(/\\u{1d306}/u)[0].length === 2;\n```\n\n###### \"u\" flag, case folding\n\n```js\nreturn \"ſ\".match(/S/iu) \u0026\u0026 \"S\".match(/ſ/iu);\n```\n\n##### destructuring, declarations\n\n###### with arrays\n\n```js\nvar [a, , [b], c] = [5, null, [6]];\nreturn a === 5 \u0026\u0026 b === 6 \u0026\u0026 c === undefined;\n```\n\n###### with sparse arrays\n\n```js\nvar [a, , b] = [,,,];\nreturn a === undefined \u0026\u0026 b === undefined;\n```\n\n###### with strings\n\n```js\nvar [a, b, c] = \"ab\";\nreturn a === \"a\" \u0026\u0026 b === \"b\" \u0026\u0026 c === undefined;\n```\n\n###### with astral plane strings\n\n```js\nvar [c] = \"𠮷𠮶\";\nreturn c === \"𠮷\";\n```\n\n###### with generator instances\n\n```js\nvar [a, b, c] = (function*(){ yield 1; yield 2; }());\nreturn a === 1 \u0026\u0026 b === 2 \u0026\u0026 c === undefined;\n```\n\n###### with generic iterables\n\n```js\nvar [a, b, c] = global.__createIterableObject([1, 2]);\nreturn a === 1 \u0026\u0026 b === 2 \u0026\u0026 c === undefined;\n```\n\n###### with instances of generic iterables\n\n```js\nvar [a, b, c] = Object.create(global.__createIterableObject([1, 2]));\nreturn a === 1 \u0026\u0026 b === 2 \u0026\u0026 c === undefined;\n```\n\n###### iterator closing\n\n```js\nvar closed = false;\nvar iter = global.__createIterableObject([1, 2, 3], {\n  'return': function(){ closed = true; return {}; }\n});\nvar [a, b] = iter;\nreturn closed;\n```\n\n###### trailing commas in iterable patterns\n\n```js\nvar [a,] = [1];\nreturn a === 1;\n```\n\n###### with objects\n\n```js\nvar {c, x:d, e} = {c:7, x:8};\nreturn c === 7 \u0026\u0026 d === 8 \u0026\u0026 e === undefined;\n```\n\n###### object destructuring with primitives\n\n```js\nvar {toFixed} = 2;\nvar {slice} = '';\nreturn toFixed === Number.prototype.toFixed\n  \u0026\u0026 slice === String.prototype.slice;\n```\n\n###### trailing commas in object patterns\n\n```js\nvar {a,} = {a:1};\nreturn a === 1;\n```\n\n###### throws on null and undefined\n\n```js\ntry {\n  var {a} = null;\n  return false;\n} catch(e) {\n  if (!(e instanceof TypeError))\n    return false;\n}\ntry {\n  var {b} = undefined;\n  return false;\n} catch(e) {\n  if (!(e instanceof TypeError))\n    return false;\n}\nreturn true;\n```\n\n###### computed properties\n\n```js\nvar qux = \"corge\";\nvar { [qux]: grault } = { corge: \"garply\" };\nreturn grault === \"garply\";\n```\n\n###### multiples in a single var statement\n\n```js\nvar [a,b] = [5,6], {c,d} = {c:7,d:8};\nreturn a === 5 \u0026\u0026 b === 6 \u0026\u0026 c === 7 \u0026\u0026 d === 8;\n```\n\n###### nested\n\n```js\nvar [e, {x:f, g}] = [9, {x:10}];\nvar {h, x:[i]} = {h:11, x:[12]};\nreturn e === 9 \u0026\u0026 f === 10 \u0026\u0026 g === undefined\n  \u0026\u0026 h === 11 \u0026\u0026 i === 12;\n```\n\n###### in for-in loop heads\n\n```js\nfor(var [i, j, k] in { qux: 1 }) {\n  return i === \"q\" \u0026\u0026 j === \"u\" \u0026\u0026 k === \"x\";\n}\n```\n\n###### in for-of loop heads\n\n```js\nfor(var [i, j, k] of [[1,2,3]]) {\n  return i === 1 \u0026\u0026 j === 2 \u0026\u0026 k === 3;\n}\n```\n\n###### in catch heads\n\n```js\ntry {\n  throw [1,2];\n} catch([i,j]) {\n  try {\n    throw { k: 3, l: 4 };\n  } catch({k, l}) {\n    return i === 1 \u0026\u0026 j === 2 \u0026\u0026 k === 3 \u0026\u0026 l === 4;\n  }\n}\n```\n\n###### rest\n\n```js\nvar [a, ...b] = [3, 4, 5];\nvar [c, ...d] = [6];\nreturn a === 3 \u0026\u0026 b instanceof Array \u0026\u0026 (b + \"\") === \"4,5\" \u0026\u0026\n   c === 6 \u0026\u0026 d instanceof Array \u0026\u0026 d.length === 0;\n```\n\n###### defaults\n\n```js\nvar {a = 1, b = 0, z:c = 3} = {b:2, z:undefined};\nvar [d = 0, e = 5, f = 6] = [4,,undefined];\nreturn a === 1 \u0026\u0026 b === 2 \u0026\u0026 c === 3\n  \u0026\u0026 d === 4 \u0026\u0026 e === 5 \u0026\u0026 f === 6;\n```\n\n###### defaults, let temporal dead zone\n\n```js\nvar {a, b = 2} = {a:1};\ntry {\n  eval(\"let {c = c} = {};\");\n  return false;\n} catch(e){}\ntry {\n  eval(\"let {c = d, d} = {d:1};\");\n  return false;\n} catch(e){}\nreturn a === 1 \u0026\u0026 b === 2;\n```\n\n##### destructuring, assignment\n\n###### with arrays\n\n```js\nvar a,b,c;\n[a, , [b], c] = [5, null, [6]];\nreturn a === 5 \u0026\u0026 b === 6 \u0026\u0026 c === undefined;\n```\n\n###### with sparse arrays\n\n```js\nvar a, b;\n[a, , b] = [,,,];\nreturn a === undefined \u0026\u0026 b === undefined;\n```\n\n###### with strings\n\n```js\nvar a,b,c;\n[a, b, c] = \"ab\";\nreturn a === \"a\" \u0026\u0026 b === \"b\" \u0026\u0026 c === undefined;\n```\n\n###### with astral plane strings\n\n```js\nvar c;\n[c] = \"𠮷𠮶\";\nreturn c === \"𠮷\";\n```\n\n###### with generator instances\n\n```js\nvar a,b,c;\n[a, b, c] = (function*(){ yield 1; yield 2; }());\nreturn a === 1 \u0026\u0026 b === 2 \u0026\u0026 c === undefined;\n```\n\n###### with generic iterables\n\n```js\nvar a,b,c;\n[a, b, c] = global.__createIterableObject([1, 2]);\nreturn a === 1 \u0026\u0026 b === 2 \u0026\u0026 c === undefined;\n```\n\n###### with instances of generic iterables\n\n```js\nvar a,b,c;\n[a, b, c] = Object.create(global.__createIterableObject([1, 2]));\nreturn a === 1 \u0026\u0026 b === 2 \u0026\u0026 c === undefined;\n```\n\n###### iterator closing\n\n```js\nvar closed = false;\nvar iter = global.__createIterableObject([1, 2, 3], {\n  'return': function(){ closed = true; return {}; }\n});\nvar a,b;\n[a, b] = iter;\nreturn closed;\n```\n\n###### iterable destructuring expression\n\n```js\nvar a, b, iterable = [1,2];\nreturn ([a, b] = iterable) === iterable;\n```\n\n###### chained iterable destructuring\n\n```js\nvar a,b,c,d;\n[a,b] = [c,d] = [1,2];\nreturn a === 1 \u0026\u0026 b === 2 \u0026\u0026 c === 1 \u0026\u0026 d === 2;\n```\n\n###### trailing commas in iterable patterns\n\n```js\nvar a;\n[a,] = [1];\nreturn a === 1;\n```\n\n###### with objects\n\n```js\nvar c,d,e;\n({c, x:d, e} = {c:7, x:8});\nreturn c === 7 \u0026\u0026 d === 8 \u0026\u0026 e === undefined;\n```\n\n###### object destructuring with primitives\n\n```js\nvar toFixed, slice;\n({toFixed} = 2);\n({slice} = '');\nreturn toFixed === Number.prototype.toFixed\n  \u0026\u0026 slice === String.prototype.slice;\n```\n\n###### trailing commas in object patterns\n\n```js\nvar a;\n({a,} = {a:1});\nreturn a === 1;\n```\n\n###### object destructuring expression\n\n```js\nvar a, b, obj = { a:1, b:2 };\nreturn ({a,b} = obj) === obj;\n```\n\n###### parenthesised left-hand-side is a syntax error\n\n```js\nvar a, b;\n({a,b} = {a:1,b:2});\ntry {\n  eval(\"({a,b}) = {a:3,b:4};\");\n}\ncatch(e) {\n  return a === 1 \u0026\u0026 b === 2;\n}\n```\n\n###### chained object destructuring\n\n```js\nvar a,b,c,d;\n({a,b} = {c,d} = {a:1,b:2,c:3,d:4});\nreturn a === 1 \u0026\u0026 b === 2 \u0026\u0026 c === 3 \u0026\u0026 d === 4;\n```\n\n###### throws on null and undefined\n\n```js\nvar a,b;\ntry {\n  ({a} = null);\n  return false;\n} catch(e) {\n  if (!(e instanceof TypeError))\n    return false;\n}\ntry {\n  ({b} = undefined);\n  return false;\n} catch(e) {\n  if (!(e instanceof TypeError))\n    return false;\n}\nreturn true;\n```\n\n###### computed properties\n\n```js\nvar grault, qux = \"corge\";\n({ [qux]: grault } = { corge: \"garply\" });\nreturn grault === \"garply\";\n```\n\n###### nested\n\n```js\nvar e,f,g,h,i;\n[e, {x:f, g}] = [9, {x:10}];\n({h, x:[i]} = {h:11, x:[12]});\nreturn e === 9 \u0026\u0026 f === 10 \u0026\u0026 g === undefined\n  \u0026\u0026 h === 11 \u0026\u0026 i === 12;\n```\n\n###### rest\n\n```js\nvar a,b,c,d;\n[a, ...b] = [3, 4, 5];\n[c, ...d] = [6];\nreturn a === 3 \u0026\u0026 b instanceof Array \u0026\u0026 (b + \"\") === \"4,5\" \u0026\u0026\n   c === 6 \u0026\u0026 d instanceof Array \u0026\u0026 d.length === 0;\n```\n\n###### nested rest\n\n```js\nvar a = [1, 2, 3], first, last;\n[first, ...[a[2], last]] = a;\nreturn first === 1 \u0026\u0026 last === 3 \u0026\u0026 (a + \"\") === \"1,2,2\";\n```\n\n###### empty patterns\n\n```js\n[] = [1,2];\n({} = {a:1,b:2});\nreturn true;\n```\n\n###### defaults\n\n```js\nvar a,b,c,d,e,f;\n({a = 1, b = 0, z:c = 3} = {b:2, z:undefined});\n[d = 0, e = 5, f = 6] = [4,,undefined];\nreturn a === 1 \u0026\u0026 b === 2 \u0026\u0026 c === 3\n  \u0026\u0026 d === 4 \u0026\u0026 e === 5 \u0026\u0026 f === 6;\n```\n\n##### destructuring, parameters\n\n###### with arrays\n\n```js\nreturn function([a, , [b], c]) {\n  return a === 5 \u0026\u0026 b === 6 \u0026\u0026 c === undefined;\n}([5, null, [6]]);\n```\n\n###### with sparse arrays\n\n```js\nreturn function([a, , b]) {\n  return a === undefined \u0026\u0026 b === undefined;\n}([,,,]);\n```\n\n###### with strings\n\n```js\nreturn function([a, b, c]) {\n  return a === \"a\" \u0026\u0026 b === \"b\" \u0026\u0026 c === undefined;\n}(\"ab\");\n```\n\n###### with astral plane strings\n\n```js\nreturn function([c]) {\n  return c === \"𠮷\";\n}(\"𠮷𠮶\");\n```\n\n###### with generator instances\n\n```js\nreturn function([a, b, c]) {\n  return a === 1 \u0026\u0026 b === 2 \u0026\u0026 c === undefined;\n}(function*(){ yield 1; yield 2; }());\n```\n\n###### with generic iterables\n\n```js\nreturn function([a, b, c]) {\n  return a === 1 \u0026\u0026 b === 2 \u0026\u0026 c === undefined;\n}(global.__createIterableObject([1, 2]));\n```\n\n###### with instances of generic iterables\n\n```js\nreturn function([a, b, c]) {\n  return a === 1 \u0026\u0026 b === 2 \u0026\u0026 c === undefined;\n}(Object.create(global.__createIterableObject([1, 2])));\n```\n\n###### iterator closing\n\n```js\nvar closed = false;\nvar iter = global.__createIterableObject([1, 2, 3], {\n  'return': function(){ closed = true; return {}; }\n});\n(function([a,b]) {}(iter));\nreturn closed;\n```\n\n###### trailing commas in iterable patterns\n\n```js\nreturn function([a,]) {\n  return a === 1;\n}([1]);\n```\n\n###### with objects\n\n```js\nreturn function({c, x:d, e}) {\n  return c === 7 \u0026\u0026 d === 8 \u0026\u0026 e === undefined;\n}({c:7, x:8});\n```\n\n###### object destructuring with primitives\n\n```js\nreturn function({toFixed}, {slice}) {\n  return toFixed === Number.prototype.toFixed\n    \u0026\u0026 slice === String.prototype.slice;\n}(2,'');\n```\n\n###### trailing commas in object patterns\n\n```js\nreturn function({a,}) {\n  return a === 1;\n}({a:1});\n```\n\n###### throws on null and undefined\n\n```js\ntry {\n  (function({a}){}(null));\n  return false;\n} catch(e) {}\ntry {\n  (function({b}){}(undefined));\n  return false;\n} catch(e) {}\nreturn true;\n```\n\n###### computed properties\n\n```js\nvar qux = \"corge\";\nreturn function({ [qux]: grault }) {\n  return grault === \"garply\";\n}({ corge: \"garply\" });\n```\n\n###### nested\n\n```js\nreturn function([e, {x:f, g}], {h, x:[i]}) {\n  return e === 9 \u0026\u0026 f === 10 \u0026\u0026 g === undefined\n    \u0026\u0026 h === 11 \u0026\u0026 i === 12;\n}([9, {x:10}],{h:11, x:[12]});\n```\n\n###### 'arguments' interaction\n\n```js\nreturn (function({a, x:b, y:e}, [c, d]) {\n  return arguments[0].a === 1 \u0026\u0026 arguments[0].x === 2\n    \u0026\u0026 !(\"y\" in arguments[0]) \u0026\u0026 arguments[1] + '' === \"3,4\";\n}({a:1, x:2}, [3, 4]));\n```\n\n###### new Function() support\n\n```js\nreturn new Function(\"{a, x:b, y:e}\",\"[c, d]\",\n  \"return a === 1 \u0026\u0026 b === 2 \u0026\u0026 c === 3 \u0026\u0026 \"\n  + \"d === 4 \u0026\u0026 e === undefined;\"\n)({a:1, x:2}, [3, 4]);\n```\n\n###### in parameters, function 'length' property\n\n```js\nreturn function({a, b}, [c, d]){}.length === 2;\n```\n\n###### rest\n\n```js\nreturn function([a, ...b], [c, ...d]) {\n  return a === 3 \u0026\u0026 b instanceof Array \u0026\u0026 (b + \"\") === \"4,5\" \u0026\u0026\n     c === 6 \u0026\u0026 d instanceof Array \u0026\u0026 d.length === 0;\n}([3, 4, 5], [6]);\n```\n\n###### empty patterns\n\n```js\nreturn function ([],{}){\n  return arguments[0] + '' === \"3,4\" \u0026\u0026 arguments[1].x === \"foo\";\n}([3,4],{x:\"foo\"});\n```\n\n###### defaults\n\n```js\nreturn (function({a = 1, b = 0, c = 3, x:d = 0, y:e = 5},\n    [f = 6, g = 0, h = 8]) {\n  return a === 1 \u0026\u0026 b === 2 \u0026\u0026 c === 3 \u0026\u0026 d === 4 \u0026\u0026\n    e === 5 \u0026\u0026 f === 6 \u0026\u0026 g === 7 \u0026\u0026 h === 8;\n}({b:2, c:undefined, x:4},[, 7, undefined]));\n```\n\n###### defaults, separate scope\n\n```js\nreturn (function({a=function(){\n  return typeof b === 'undefined';\n}}){\n  var b = 1;\n  return a();\n}({}));\n```\n\n###### defaults, new Function() support\n\n```js\nreturn new Function(\"{a = 1, b = 0, c = 3, x:d = 0, y:e = 5}\",\n  \"return a === 1 \u0026\u0026 b === 2 \u0026\u0026 c === 3 \u0026\u0026 d === 4 \u0026\u0026 e === 5;\"\n)({b:2, c:undefined, x:4});\n```\n\n###### defaults, arrow function\n\n```js\nreturn ((a, {b = 0, c = 3}) =\u003e {\n  return a === 1 \u0026\u0026 b === 2 \u0026\u0026 c === 3;\n})(1, {b: 2});\n```\n\n#### undefined\n\n##### generators\n\n###### %GeneratorPrototype%.return\n\n```js\nfunction * generator(){\n  yield 5; yield 6;\n};\nvar iterator = generator();\nvar item = iterator.next();\nvar passed = item.value === 5 \u0026\u0026 item.done === false;\nitem = iterator.return(\"quxquux\");\npassed    \u0026= item.value === \"quxquux\" \u0026\u0026 item.done === true;\nitem = iterator.next();\npassed    \u0026= item.value === undefined \u0026\u0026 item.done === true;\nreturn passed;\n```\n\n###### yield *, iterator closing\n\n```js\nvar closed = '';\nvar iter = __createIterableObject([1, 2, 3], {\n  'return': function(){\n    closed += 'a';\n    return {done: true};\n  }\n});\nvar gen = (function* generator(){\n  try {\n    yield *iter;\n  } finally {\n    closed += 'b';\n  }\n})();\ngen.next();\ngen['return']();\nreturn closed === 'ab';\n```\n\n#### undefined\n\n##### Map\n\n###### Map[Symbol.species]\n\n```js\nvar prop = Object.getOwnPropertyDescriptor(Map, Symbol.species);\nreturn 'get' in prop \u0026\u0026 Map[Symbol.species] === Map;\n```\n\n##### Set\n\n###### Set[Symbol.species]\n\n```js\nvar prop = Object.getOwnPropertyDescriptor(Set, Symbol.species);\nreturn 'get' in prop \u0026\u0026 Set[Symbol.species] === Set;\n```\n\n##### Proxy\n\n###### constructor requires new\n\n```js\nnew Proxy({}, {});\ntry {\n  Proxy({}, {});\n  return false;\n} catch(e) {\n  return true;\n}\n```\n\n###### no \"prototype\" property\n\n```js\nnew Proxy({}, {});\nreturn !Proxy.hasOwnProperty('prototype');\n```\n\n###### \"get\" handler\n\n```js\nvar proxied = { };\nvar proxy = new Proxy(proxied, {\n  get: function (t, k, r) {\n    return t === proxied \u0026\u0026 k === \"foo\" \u0026\u0026 r === proxy \u0026\u0026 5;\n  }\n});\nreturn proxy.foo === 5;\n```\n\n###### \"get\" handler, instances of proxies\n\n```js\nvar proxied = { };\nvar proxy = Object.create(new Proxy(proxied, {\n  get: function (t, k, r) {\n    return t === proxied \u0026\u0026 k === \"foo\" \u0026\u0026 r === proxy \u0026\u0026 5;\n  }\n}));\nreturn proxy.foo === 5;\n```\n\n###### \"get\" handler invariants\n\n```js\nvar passed = false;\nvar proxied = { };\nvar proxy = new Proxy(proxied, {\n  get: function () {\n    passed = true;\n    return 4;\n  }\n});\n// The value reported for a property must be the same as the value of the corresponding\n// target object property if the target object property is a non-writable,\n// non-configurable own data property.\nObject.defineProperty(proxied, \"foo\", { value: 5, enumerable: true });\ntry {\n  proxy.foo;\n  return false;\n}\ncatch(e) {}\n// The value reported for a property must be undefined if the corresponding target\n// object property is a non-configurable own accessor property that has undefined\n// as its [[Get]] attribute.\nObject.defineProperty(proxied, \"bar\",\n  { set: function(){}, enumerable: true });\ntry {\n  proxy.bar;\n  return false;\n}\ncatch(e) {}\nreturn passed;\n```\n\n###### \"set\" handler\n\n```js\nvar proxied = { };\nvar passed = false;\nvar proxy = new Proxy(proxied, {\n  set: function (t, k, v, r) {\n    passed = t === proxied \u0026\u0026 k + v === \"foobar\" \u0026\u0026 r === proxy;\n  }\n});\nproxy.foo = \"bar\";\nreturn passed;\n```\n\n###### \"set\" handler, instances of proxies\n\n```js\nvar proxied = { };\nvar passed = false;\nvar proxy = Object.create(new Proxy(proxied, {\n  set: function (t, k, v, r) {\n    passed = t === proxied \u0026\u0026 k + v === \"foobar\" \u0026\u0026 r === proxy;\n  }\n}));\nproxy.foo = \"bar\";\nreturn passed;\n```\n\n###### \"set\" handler invariants\n\n```js\nvar passed = false;\nnew Proxy({},{});\n// Cannot change the value of a property to be different from the value of\n// the corresponding target object if the corresponding target object\n// property is a non-writable, non-configurable own data property.\nvar proxied = {};\nvar proxy = new Proxy(proxied, {\n  set: function () {\n    passed = true;\n    return true;\n  }\n});\nObject.defineProperty(proxied, \"foo\", { value: 2, enumerable: true });\nproxy.foo = 2;\ntry {\n  proxy.foo = 4;\n  return false;\n} catch(e) {}\n// Cannot set the value of a property if the corresponding target\n// object property is a non-configurable own accessor property\n// that has undefined as its [[Set]] attribute.\nObject.defineProperty(proxied, \"bar\",\n  { get: function(){}, enumerable: true });\ntry {\n  proxy.bar = 2;\n  return false;\n} catch(e) {}\nreturn passed;\n```\n\n###### \"has\" handler\n\n```js\nvar proxied = {};\nvar passed = false;\n\"foo\" in new Proxy(proxied, {\n  has: function (t, k) {\n    passed = t === proxied \u0026\u0026 k === \"foo\";\n  }\n});\nreturn passed;\n```\n\n###### \"has\" handler, instances of proxies\n\n```js\nvar proxied = {};\nvar passed = false;\n\"foo\" in Object.create(new Proxy(proxied, {\n  has: function (t, k) {\n    passed = t === proxied \u0026\u0026 k === \"foo\";\n  }\n}));\nreturn passed;\n```\n\n###### \"has\" handler invariants\n\n```js\nvar passed = false;\nnew Proxy({},{});\n// A property cannot be reported as non-existent, if it exists as a\n// non-configurable own property of the target object.\nvar proxied = {};\nvar proxy = new Proxy(proxied, {\n  has: function () {\n    passed = true;\n    return false;\n  }\n});\nObject.defineProperty(proxied, \"foo\", { value: 2, writable: true, enumerable: true });\ntry {\n  'foo' in proxy;\n  return false;\n} catch(e) {}\n// A property cannot be reported as non-existent, if it exists as an\n// own property of the target object and the target object is not extensible.\nproxied.bar = 2;\nObject.preventExtensions(proxied);\ntry {\n  'bar' in proxy;\n  return false;\n} catch(e) {}\nreturn passed;\n```\n\n###### \"deleteProperty\" handler\n\n```js\nvar proxied = {};\nvar passed = false;\ndelete new Proxy(proxied, {\n  deleteProperty: function (t, k) {\n    passed = t === proxied \u0026\u0026 k === \"foo\";\n  }\n}).foo;\nreturn passed;\n```\n\n###### \"deleteProperty\" handler invariant\n\n```js\nvar passed = false;\nnew Proxy({},{});\n// A property cannot be reported as deleted, if it exists as a non-configurable\n// own property of the target object.\nvar proxied = {};\nObject.defineProperty(proxied, \"foo\", { value: 2, writable: true, enumerable: true });\ntry {\n  delete new Proxy(proxied, {\n    deleteProperty: function () {\n      passed = true;\n      return true;\n    }\n  }).foo;\n  return false;\n} catch(e) {}\nreturn passed;\n```\n\n###### \"getOwnPropertyDescriptor\" handler\n\n```js\nvar proxied = {};\nvar fakeDesc = { value: \"foo\", configurable: true };\nvar returnedDesc = Object.getOwnPropertyDescriptor(\n  new Proxy(proxied, {\n    getOwnPropertyDescriptor: function (t, k) {\n      return t === proxied \u0026\u0026 k === \"foo\" \u0026\u0026 fakeDesc;\n    }\n  }),\n  \"foo\"\n);\nreturn (returnedDesc.value     === fakeDesc.value\n  \u0026\u0026 returnedDesc.configurable === fakeDesc.configurable\n  \u0026\u0026 returnedDesc.writable     === false\n  \u0026\u0026 returnedDesc.enumerable   === false);\n```\n\n###### \"getOwnPropertyDescriptor\" handler invariants\n\n```js\nvar passed = false;\nnew Proxy({},{});\n// A property cannot be reported as non-existent, if it exists as a non-configurable\n// own property of the target object.\nvar proxied = {};\nvar proxy = new Proxy(proxied, {\n  getOwnPropertyDescriptor: function () {\n    passed = true;\n    return undefined;\n  }\n});\nObject.defineProperty(proxied, \"foo\", { value: 2, writable: true, enumerable: true });\ntry {\n  Object.getOwnPropertyDescriptor(proxy, \"foo\");\n  return false;\n} catch(e) {}\n// A property cannot be reported as non-existent, if it exists as an own property\n// of the target object and the target object is not extensible.\nproxied.bar = 3;\nObject.preventExtensions(proxied);\ntry {\n  Object.getOwnPropertyDescriptor(proxy, \"bar\");\n  return false;\n} catch(e) {}\n// A property cannot be reported as existent, if it does not exists as an own property\n// of the target object and the target object is not extensible.\ntry {\n  Object.getOwnPropertyDescriptor(new Proxy(proxied, {\n    getOwnPropertyDescriptor: function() {\n      return { value: 2, configurable: true, writable: true, enumerable: true };\n    }}), \"baz\");\n  return false;\n} catch(e) {}\n// A property cannot be reported as non-configurable, if it does not exists as an own\n// property of the target object or if it exists as a configurable own property of\n// the target object.\ntry {\n  Object.getOwnPropertyDescriptor(new Proxy({}, {\n    getOwnPropertyDescriptor: function() {\n      return { value: 2, configurable: false, writable: true, enumerable: true };\n    }}), \"baz\");\n  return false;\n} catch(e) {}\ntry {\n  Object.getOwnPropertyDescriptor(new Proxy({baz:1}, {\n    getOwnPropertyDescriptor: function() {\n      return { value: 1, configurable: false, writable: true, enumerable: true };\n    }}), \"baz\");\n  return false;\n} catch(e) {}\nreturn passed;\n```\n\n###### \"defineProperty\" handler\n\n```js\nvar proxied = {};\nvar passed = false;\nObject.defineProperty(\n  new Proxy(proxied, {\n    defineProperty: function (t, k, d) {\n      passed = t === proxied \u0026\u0026 k === \"foo\" \u0026\u0026 d.value === 5;\n      return true;\n    }\n  }),\n  \"foo\",\n  { value: 5, configurable: true }\n);\nreturn passed;\n```\n\n###### \"defineProperty\" handler invariants\n\n```js\nvar passed = false;\nnew Proxy({},{});\n// A property cannot be added, if the target object is not extensible.\nvar proxied = Object.preventExtensions({});\nvar proxy = new Proxy(proxied, {\n  defineProperty: function() {\n    passed = true;\n    return true;\n  }\n});\ntry {\n  Object.defineProperty(proxy, \"foo\", { value: 2 });\n  return false;\n} catch(e) {}\n// A property cannot be non-configurable, unless there exists a corresponding\n// non-configurable own property of the target object.\ntry {\n  Object.defineProperty(\n    new Proxy({ bar: true }, {\n      defineProperty: function () {\n        return true;\n      }\n    }),\n    \"bar\",\n    { value: 5, configurable: false, writable: true, enumerable: true }\n  );\n  return false;\n} catch(e) {}\nreturn passed;\n```\n\n###### \"getPrototypeOf\" handler\n\n```js\nvar proxied = {};\nvar fakeProto = {};\nvar proxy = new Proxy(proxied, {\n  getPrototypeOf: function (t) {\n    return t === proxied \u0026\u0026 fakeProto;\n  }\n});\nreturn Object.getPrototypeOf(proxy) === fakeProto;\n```\n\n###### \"getPrototypeOf\" handler invariant\n\n```js\nvar passed = false;\nnew Proxy({},{});\n// If the target object is not extensible, [[GetPrototypeOf]] applied to the proxy object\n// must return the same value as [[GetPrototypeOf]] applied to the proxy object's target object.\ntry {\n  Object.getPrototypeOf(new Proxy(Object.preventExtensions({}), {\n    getPrototypeOf: function () {\n      passed = true;\n      return {};\n    }\n  }));\n  return false;\n} catch(e) {}\nreturn passed;\n```\n\n###### \"setPrototypeOf\" handler\n\n```js\nvar proxied = {};\nvar newProto = {};\nvar passed = false;\nObject.setPrototypeOf(\n  new Proxy(proxied, {\n    setPrototypeOf: function (t, p) {\n      passed = t === proxied \u0026\u0026 p === newProto;\n      return true;\n    }\n  }),\n  newProto\n);\nreturn passed;\n```\n\n###### \"setPrototypeOf\" handler invariant\n\n```js\nvar passed = false;\nnew Proxy({},{});\nObject.setPrototypeOf({},{});\n// If the target object is not extensible, the argument value must be the\n// same as the result of [[GetPrototypeOf]] applied to target object.\ntry {\n  Object.setPrototypeOf(\n    new Proxy(Object.preventExtensions({}), {\n      setPrototypeOf: function () {\n        passed = true;\n        return true;\n      }\n    }),{});\n  return false;\n} catch(e) {}\nreturn passed;\n```\n\n###### \"isExtensible\" handler\n\n```js\nvar proxied = {};\nvar passed = false;\nObject.isExtensible(\n  new Proxy(proxied, {\n    isExtensible: function (t) {\n      passed = t === proxied; return true;\n    }\n  })\n);\nreturn passed;\n```\n\n###### \"isExtensible\" handler invariant\n\n```js\nvar passed = false;\nnew Proxy({},{});\n// [[IsExtensible]] applied to the proxy object must return the same value\n// as [[IsExtensible]] applied to the proxy object's target object with the same argument.\ntry {\n  Object.isExtensible(new Proxy({}, {\n    isExtensible: function (t) {\n      passed = true;\n      return false;\n    }\n  }));\n  return false;\n} catch(e) {}\ntry {\n  Object.isExtensible(new Proxy(Object.preventExtensions({}), {\n    isExtensible: function (t) {\n      return true;\n    }\n  }));\n  return false;\n} catch(e) {}\nreturn true;\n```\n\n###### \"preventExtensions\" handler\n\n```js\nvar proxied = {};\nvar passed = false;\nObject.preventExtensions(\n  new Proxy(proxied, {\n    preventExtensions: function (t) {\n      passed = t === proxied;\n      return Object.preventExtensions(proxied);\n    }\n  })\n);\nreturn passed;\n```\n\n###### \"preventExtensions\" handler invariant\n\n```js\nvar passed = false;\nnew Proxy({},{});\n// [[PreventExtensions]] applied to the proxy object only returns true\n// if [[IsExtensible]] applied to the proxy object's target object is false.\ntry {\n  Object.preventExtensions(new Proxy({}, {\n    preventExtensions: function () {\n      passed = true;\n      return true;\n    }\n  }));\n  return false;\n} catch(e) {}\nreturn passed;\n```\n\n###### \"ownKeys\" handler\n\n```js\nvar proxied = {};\nvar passed = false;\nObject.keys(\n  new Proxy(proxied, {\n    ownKeys: function (t) {\n      passed = t === proxied; return [];\n    }\n  })\n);\nreturn passed;\n```\n\n###### \"ownKeys\" handler invariant\n\n```js\nvar passed = false;\nnew Proxy({},{});\n// The Type of each result List element is either String or Symbol.\ntry {\n  Object.keys(new Proxy({}, {\n    ownKeys: function () {\n      passed = true;\n      return [2];\n    }}));\n  return false;\n} catch(e) {}\n// The result List must contain the keys of all non-configurable own properties of the target object.\nvar proxied = {};\nObject.defineProperty(proxied, \"foo\", { value: 2, writable: true, enumerable: true });\ntry {\n  Object.keys(new Proxy(proxied, {\n    ownKeys: function () {\n      return [];\n    }}));\n  return false;\n} catch(e) {}\n// If the target object is not extensible, then the result List must contain all the keys\n// of the own properties of the target object and no other values.\ntry {\n  Object.keys(new Proxy(Object.preventExtensions({b:1}), {\n    ownKeys: function () {\n      return ['a'];\n    }}));\n  return false;\n} catch(e) {}\nreturn passed;\n```\n\n###### \"apply\" handler\n\n```js\nvar proxied = function(){};\nvar passed = false;\nvar host = {\n  method: new Proxy(proxied, {\n    apply: function (t, thisArg, args) {\n      passed = t === proxied \u0026\u0026 thisArg === host \u0026\u0026 args + \"\" === \"foo,bar\";\n    }\n  })\n};\nhost.method(\"foo\", \"bar\");\nreturn passed;\n```\n\n###### \"apply\" handler invariant\n\n```js\nvar passed = false;\nnew Proxy(function(){}, {\n    apply: function () { passed = true; }\n})();\n// A Proxy exotic object only has a [[Call]] internal method if the\n// initial value of its [[ProxyTarget]] internal slot is an object\n// that has a [[Call]] internal method.\ntry {\n  new Proxy({}, {\n    apply: function () {}\n  })();\n  return false;\n} catch(e) {}\nreturn passed;\n```\n\n###### \"construct\" handler\n\n```js\nvar proxied = function(){};\nvar passed = false;\nnew new Proxy(proxied, {\n  construct: function (t, args) {\n    passed = t === proxied \u0026\u0026 args + \"\" === \"foo,bar\";\n    return {};\n  }\n})(\"foo\",\"bar\");\nreturn passed;\n```\n\n###### \"construct\" handler invariants\n\n```js\nvar passed = false;\nnew Proxy({},{});\n// A Proxy exotic object only has a [[Construct]] internal method if the\n// initial value of its [[ProxyTarget]] internal slot is an object\n// that has a [[Construct]] internal method.\ntry {\n  new new Proxy({}, {\n    construct: function (t, args) {\n      return {};\n    }\n  })();\n  return false;\n} catch(e) {}\n// The result of [[Construct]] must be an Object.\ntry {\n  new new Proxy(function(){}, {\n    construct: function (t, args) {\n      passed = true;\n      return 5;\n    }\n  })();\n  return false;\n} catch(e) {}\nreturn passed;\n```\n\n###### Proxy.revocable\n\n```js\nvar obj = Proxy.revocable({}, { get: function() { return 5; } });\nvar passed = (obj.proxy.foo === 5);\nobj.revoke();\ntry {\n  obj.proxy.foo;\n} catch(e) {\n  passed \u0026= e instanceof TypeError;\n}\nreturn passed;\n```\n\n###### Array.isArray support\n\n```js\nreturn Array.isArray(new Proxy([], {}));\n```\n\n###### JSON.stringify support\n\n```js\nreturn JSON.stringify(new Proxy(['foo'], {})) === '[\"foo\"]';\n```\n\n##### Reflect\n\n###### Reflect.get\n\n```js\nreturn Reflect.get({ qux: 987 }, \"qux\") === 987;\n```\n\n###### Reflect.set\n\n```js\nvar obj = {};\nReflect.set(obj, \"quux\", 654);\nreturn obj.quux === 654;\n```\n\n###### Reflect.has\n\n```js\nreturn Reflect.has({ qux: 987 }, \"qux\");\n```\n\n###### Reflect.deleteProperty\n\n```js\nvar obj = { bar: 456 };\nReflect.deleteProperty(obj, \"bar\");\nreturn !(\"bar\" in obj);\n```\n\n###### Reflect.getOwnPropertyDescriptor\n\n```js\nvar obj = { baz: 789 };\nvar desc = Reflect.getOwnPropertyDescriptor(obj, \"baz\");\nreturn desc.value === 789 \u0026\u0026\n  desc.configurable \u0026\u0026 desc.writable \u0026\u0026 desc.enumerable;\n```\n\n###### Reflect.defineProperty\n\n```js\nvar obj = {};\nReflect.defineProperty(obj, \"foo\", { value: 123 });\nreturn obj.foo === 123 \u0026\u0026\n  Reflect.defineProperty(Object.freeze({}), \"foo\", { value: 123 }) === false;\n```\n\n###### Reflect.getPrototypeOf\n\n```js\nreturn Reflect.getPrototypeOf([]) === Array.prototype;\n```\n\n###### Reflect.setPrototypeOf\n\n```js\nvar obj = {};\nReflect.setPrototypeOf(obj, Array.prototype);\nreturn obj instanceof Array;\n```\n\n###### Reflect.isExtensible\n\n```js\nreturn Reflect.isExtensible({}) \u0026\u0026\n  !Reflect.isExtensible(Object.preventExtensions({}));\n```\n\n###### Reflect.preventExtensions\n\n```js\nvar obj = {};\nReflect.preventExtensions(obj);\nreturn !Object.isExtensible(obj);\n```\n\n###### Reflect.ownKeys, string keys\n\n```js\nvar obj = Object.create({ C: true });\nobj.A = true;\nObject.defineProperty(obj, 'B', { value: true, enumerable: false });\n\nreturn Reflect.ownKeys(obj).sort() + '' === \"A,B\";\n```\n\n###### Reflect.ownKeys, symbol keys\n\n```js\nvar s1 = Symbol(), s2 = Symbol(), s3 = Symbol();\nvar proto = {};\nproto[s1] = true;\nvar obj = Object.create(proto);\nobj[s2] = true;\nObject.defineProperty(obj, s3, { value: true, enumerable: false });\n\nvar keys = Reflect.ownKeys(obj);\nreturn keys.indexOf(s2) \u003e-1 \u0026\u0026 keys.indexOf(s3) \u003e-1 \u0026\u0026 keys.length === 2;\n```\n\n###### Reflect.apply\n\n```js\nreturn Reflect.apply(Array.prototype.push, [1,2], [3,4,5]) === 5;\n```\n\n###### Reflect.construct\n\n```js\nreturn Reflect.construct(function(a, b, c) {\n  this.qux = a + b + c;\n}, [\"foo\", \"bar\", \"baz\"]).qux === \"foobarbaz\";\n```\n\n###### Reflect.construct sets new.target meta-property\n\n```js\nreturn Reflect.construct(function(a, b, c) {\n  if (new.target === Object) {\n    this.qux = a + b + c;\n  }\n}, [\"foo\", \"bar\", \"baz\"], Object).qux === \"foobarbaz\";\n```\n\n###### Reflect.construct creates instances from third argument\n\n```js\nfunction F(){}\nvar obj = Reflect.construct(function(){ this.y = 1; }, [], F);\nreturn obj.y === 1 \u0026\u0026 obj instanceof F;\n```\n\n###### Reflect.construct, Array subclassing\n\n```js\nfunction F(){}\nvar obj = Reflect.construct(Array, [], F);\nobj[2] = 'foo';\nreturn obj.length === 3 \u0026\u0026 obj instanceof F;\n```\n\n###### Reflect.construct, RegExp subclassing\n\n```js\nfunction F(){}\nvar obj = Reflect.construct(RegExp, [\"baz\",\"g\"], F);\nreturn RegExp.prototype.exec.call(obj, \"foobarbaz\")[0] === \"baz\"\n  \u0026\u0026 obj.lastIndex === 9 \u0026\u0026 obj instanceof F;\n```\n\n###### Reflect.construct, Function subclassing\n\n```js\nfunction F(){}\nvar obj = Reflect.construct(Function, [\"return 2\"], F);\nreturn obj() === 2 \u0026\u0026 obj instanceof F;\n```\n\n###### Reflect.construct, Promise subclassing\n\n```js\nfunction F(){}\nvar p1 = Reflect.construct(Promise,[function(resolve, reject) { resolve(\"foo\"); }], F);\nvar p2 = Reflect.construct(Promise,[function(resolve, reject) { reject(\"quux\"); }], F);\nvar score = +(p1 instanceof F \u0026\u0026 p2 instanceof F);\n\nfunction thenFn(result)  { score += (result === \"foo\");  check(); }\nfunction catchFn(result) { score += (result === \"quux\"); check(); }\nfunction shouldNotRun(result)  { score = -Infinity;   }\n\np1.then = p2.then = Promise.prototype.then;\np1.catch = p2.catch = Promise.prototype.catch;\n\np1.then(thenFn, shouldNotRun);\np2.then(shouldNotRun, catchFn);\np1.catch(shouldNotRun);\np2.catch(catchFn);\n\nfunction check() {\n  if (score === 4) asyncTestPassed();\n}\n```\n\n##### Promise\n\n###### Promise[Symbol.species]\n\n```js\nvar prop = Object.getOwnPropertyDescriptor(Promise, Symbol.species);\nreturn 'get' in prop \u0026\u0026 Promise[Symbol.species] === Promise;\n```\n\n##### well-known symbols\n\n###### Symbol.match, String.prototype.startsWith\n\n```js\nvar re = /./;\ntry {\n  '/./'.startsWith(re);\n} catch(e){\n  re[Symbol.match] = false;\n  return '/./'.startsWith(re);\n}\n```\n\n###### Symbol.match, String.prototype.endsWith\n\n```js\nvar re = /./;\ntry {\n  '/./'.endsWith(re);\n} catch(e){\n  re[Symbol.match] = false;\n  return '/./'.endsWith(re);\n}\n```\n\n###### Symbol.match, String.prototype.includes\n\n```js\nvar re = /./;\ntry {\n  '/./'.includes(re);\n} catch(e){\n  re[Symbol.match] = false;\n  return '/./'.includes(re);\n}\n```\n\n#### undefined\n\n##### RegExp.prototype properties\n\n###### RegExp[Symbol.species]\n\n```js\nvar prop = Object.getOwnPropertyDescriptor(RegExp, Symbol.species);\nreturn 'get' in prop \u0026\u0026 RegExp[Symbol.species] === RegExp;\n```\n\n##### Array static methods\n\n###### Array[Symbol.species]\n\n```js\nvar prop = Object.getOwnPropertyDescriptor(Array, Symbol.species);\nreturn 'get' in prop \u0026\u0026 Array[Symbol.species] === Array;\n```\n\n##### \n\n###### Date.prototype[Symbol.toPrimitive]\n\n```js\nvar tp = Date.prototype[Symbol.toPrimitive];\nreturn tp.call(Object(2), \"number\") === 2\n  \u0026\u0026 tp.call(Object(2), \"string\") === \"2\"\n  \u0026\u0026 tp.call(Object(2), \"default\") === \"2\";\n```\n\n#### undefined\n\n##### Proxy, internal 'get' calls\n\n###### ToPrimitive\n\n```js\n// ToPrimitive -\u003e Get -\u003e [[Get]]\nvar get = [];\nvar p = new Proxy({toString:Function()}, { get: function(o, k) { get.push(k); return o[k]; }});\np + 3;\nreturn get[0] === Symbol.toPrimitive \u0026\u0026 get.slice(1) + '' === \"valueOf,toString\";\n```\n\n###### CreateListFromArrayLike\n\n```js\n// CreateListFromArrayLike -\u003e Get -\u003e [[Get]]\nvar get = [];\nvar p = new Proxy({length:2, 0:0, 1:0}, { get: function(o, k) { get.push(k); return o[k]; }});\nFunction.prototype.apply({}, p);\nreturn get + '' === \"length,0,1\";\n```\n\n###### instanceof operator\n\n```js\n// InstanceofOperator -\u003e GetMethod -\u003e GetV -\u003e [[Get]]\n// InstanceofOperator -\u003e OrdinaryHasInstance -\u003e Get -\u003e [[Get]]\nvar get = [];\nvar p = new Proxy(Function(), { get: function(o, k) { get.push(k); return o[k]; }});\n({}) instanceof p;\nreturn get[0] === Symbol.hasInstance \u0026\u0026 get.slice(1) + '' === \"prototype\";\n```\n\n###### HasBinding\n\n```js\n// HasBinding -\u003e Get -\u003e [[Get]]\nvar get = [];\nvar p = new Proxy({foo:1}, { get: function(o, k) { get.push(k); return o[k]; }});\np[Symbol.unscopables] = p;\nwith(p) {\n  typeof foo;\n}\nreturn get[0] === Symbol.unscopables \u0026\u0026 get.slice(1) + '' === \"foo\";\n```\n\n###### CreateDynamicFunction\n\n```js\n// CreateDynamicFunction -\u003e GetPrototypeFromConstructor -\u003e Get -\u003e [[Get]]\nvar get = [];\nvar p = new Proxy(Function, { get: function(o, k) { get.push(k); return o[k]; }});\nnew p;\nreturn get + '' === \"prototype\";\n```\n\n###### ClassDefinitionEvaluation\n\n```js\n// ClassDefinitionEvaluation -\u003e Get -\u003e [[Get]]\nvar get = [];\nvar p = new Proxy(Function(), { get: function(o, k) { get.push(k); return o[k]; }});\nclass C extends p {}\nreturn get + '' === \"prototype\";\n```\n\n###### IteratorComplete, IteratorValue\n\n```js\n// IteratorComplete -\u003e Get -\u003e [[Get]]\n// IteratorValue -\u003e Get -\u003e [[Get]]\nvar get = [];\nvar iterable = {};\niterable[Symbol.iterator] = function() {\n  return {\n    next: function() {\n      return new Proxy({ value: 2, done: false }, { get: function(o, k) { get.push(k); return o[k]; }});\n    }\n  };\n}\nvar i = 0;\nfor(var e of iterable) {\n  if (++i \u003e= 2) break;\n}\nreturn get + '' === \"done,value,done,value\";\n```\n\n###### ToPropertyDescriptor\n\n```js\n// ToPropertyDescriptor -\u003e Get -\u003e [[Get]]\nvar get = [];\nvar p = new Proxy({\n    enumerable: true, configurable: true, value: true,\n    writable: true, get: Function(), set: Function()\n  }, { get: function(o, k) { get.push(k); return o[k]; }});\ntry {\n  // This will throw, since it will have true for both \"get\" and \"value\",\n  // but not before performing a Get on every property.\n  Object.defineProperty({}, \"foo\", p);\n} catch(e) {\n  return get + '' === \"enumerable,configurable,value,writable,get,set\";\n}\n```\n\n###### Object.assign\n\n```js\n// Object.assign -\u003e Get -\u003e [[Get]]\nvar get = [];\nvar p = new Proxy({foo:1, bar:2}, { get: function(o, k) { get.push(k); return o[k]; }});\nObject.assign({}, p);\nreturn get + '' === \"foo,bar\";\n```\n\n###### Object.defineProperties\n\n```js\n// Object.defineProperties -\u003e Get -\u003e [[Get]]\nvar get = [];\nvar p = new Proxy({foo:{}, bar:{}}, { get: function(o, k) { get.push(k); return o[k]; }});\nObject.defineProperties({}, p);\nreturn get + '' === \"foo,bar\";\n```\n\n###### Function.prototype.bind\n\n```js\n// Function.prototype.bind -\u003e Get -\u003e [[Get]]\nvar get = [];\nvar p = new Proxy(Function(), { get: function(o, k) { get.push(k); return o[k]; }});\nFunction.prototype.bind.call(p);\nreturn get + '' === \"length,name\";\n```\n\n###### Error.prototype.toString\n\n```js\n// Error.prototype.toString -\u003e Get -\u003e [[Get]]\nvar get = [];\nvar p = new Proxy({}, { get: function(o, k) { get.push(k); return o[k]; }});\nError.prototype.toString.call(p);\nreturn get + '' === \"name,message\";\n```\n\n###### String.raw\n\n```js\n// String.raw -\u003e Get -\u003e [[Get]]\nvar get = [];\nvar raw = new Proxy({length: 2, 0: '', 1: ''}, { get: function(o, k) { get.push(k); return o[k]; }});\nvar p = new Proxy({raw: raw}, { get: function(o, k) { get.push(k); return o[k]; }});\nString.raw(p);\nreturn get + '' === \"raw,length,0,1\";\n```\n\n###### RegExp constructor\n\n```js\n// RegExp -\u003e Get -\u003e [[Get]]\nvar get = [];\nvar re = { constructor: null };\nre[Symbol.match] = true;\nvar p = new Proxy(re, { get: function(o, k) { get.push(k); return o[k]; }});\nRegExp(p);\nreturn get[0] === Symbol.match \u0026\u0026 get.slice(1) + '' === \"constructor,source,flags\";\n```\n\n###### RegExp.prototype.flags\n\n```js\n// RegExp.prototype.flags -\u003e Get -\u003e [[Get]]\nvar get = [];\nvar p = new Proxy({}, { get: function(o, k) { get.push(k); return o[k]; }});\nObject.getOwnPropertyDescriptor(RegExp.prototype, 'flags').get.call(p);\nreturn get + '' === \"global,ignoreCase,multiline,unicode,sticky\";\n```\n\n###### RegExp.prototype.test\n\n```js\n// RegExp.prototype.test -\u003e RegExpExec -\u003e Get -\u003e [[Get]]\nvar get = [];\nvar p = new Proxy({ exec: function() { return null; } }, { get: function(o, k) { get.push(k); return o[k]; }});\nRegExp.prototype.test.call(p);\nreturn get + '' === \"exec\";\n```\n\n###### RegExp.prototype.toString\n\n```js\n// RegExp.prototype.toString -\u003e Get -\u003e [[Get]]\nvar get = [];\nvar p = new Proxy({}, { get: function(o, k) { get.push(k); return o[k]; }});\nRegExp.prototype.toString.call(p);\nreturn get + '' === \"source,flags\";\n```\n\n###### RegExp.prototype[Symbol.match]\n\n```js\n// RegExp.prototype[Symbol.match] -\u003e Get -\u003e [[Get]]\nvar get = [];\nvar p = new Proxy({ exec: function() { return null; } }, { get: function(o, k) { get.push(k); return o[k]; }});\nRegExp.prototype[Symbol.match].call(p);\np.global = true;\nRegExp.prototype[Symbol.match].call(p);\nreturn get + '' === \"global,exec,global,unicode,exec\";\n```\n\n###### RegExp.prototype[Symbol.replace]\n\n```js\n// RegExp.prototype[Symbol.replace] -\u003e Get -\u003e [[Get]]\nvar get = [];\nvar p = new Proxy({ exec: function() { return null; } }, { get: function(o, k) { get.push(k); return o[k]; }});\nRegExp.prototype[Symbol.replace].call(p);\np.global = true;\nRegExp.prototype[Symbol.replace].call(p);\nreturn get + '' === \"global,exec,global,unicode,exec\";\n```\n\n###### RegExp.prototype[Symbol.split]\n\n```js\n// RegExp.prototype[Symbol.split] -\u003e Get -\u003e [[Get]]\nvar get = [];\nvar constructor = Function();\nconstructor[Symbol.species] = Object;\nvar p = new Proxy({ constructor: constructor, flags: '', exec: function() { return null; } }, { get: function(o, k) { get.push(k); return o[k]; }});\nRegExp.prototype[Symbol.split].call(p, \"\");\nreturn get + '' === \"constructor,flags,exec\";\n```\n\n###### Array.from\n\n```js\n// Array.from -\u003e Get -\u003e [[Get]]\nvar get = [];\nvar p = new Proxy({length: 2, 0: '', 1: ''}, { get: function(o, k) { get.push(k); return o[k]; }});\nArray.from(p);\nreturn get[0] === Symbol.iterator \u0026\u0026 get.slice(1) + '' === \"length,0,1\";\n```\n\n###### Array.prototype.concat\n\n```js\n// Array.prototype.concat -\u003e Get -\u003e [[Get]]\nvar get = [];\nvar arr = [1];\narr.constructor = undefined;\nvar p = new Proxy(arr, { get: function(o, k) { get.push(k); return o[k]; }});\nArray.prototype.concat.call(p,p);\nreturn get[0] === \"constructor\"\n  \u0026\u0026 get[1] === Symbol.isConcatSpreadable\n  \u0026\u0026 get[2] === \"length\"\n  \u0026\u0026 get[3] === \"0\"\n  \u0026\u0026 get[4] === get[1] \u0026\u0026 get[5] === get[2] \u0026\u0026 get[6] === get[3]\n  \u0026\u0026 get.length === 7;\n```\n\n###### Array.prototype iteration methods\n\n```js\n// Array.prototype methods -\u003e Get -\u003e [[Get]]\nvar methods = ['copyWithin', 'every', 'fill', 'filter', 'find', 'findIndex', 'forEach',\n  'indexOf', 'join', 'lastIndexOf', 'map', 'reduce', 'reduceRight', 'some'];\nvar get;\nvar p = new Proxy({length: 2, 0: '', 1: ''}, { get: function(o, k) { get.push(k); return o[k]; }});\nfor(var i = 0; i \u003c methods.length; i+=1) {\n  get = [];\n  Array.prototype[methods[i]].call(p, Function());\n  if (get + '' !== (\n    methods[i] === 'fill' ? \"length\" :\n    methods[i] === 'every' ? \"length,0\" :\n    methods[i] === 'lastIndexOf' || methods[i] === 'reduceRight' ? \"length,1,0\" :\n    \"length,0,1\"\n  )) {\n    return false;\n  }\n}\nreturn true;\n```\n\n###### Array.prototype.pop\n\n```js\n// Array.prototype.pop -\u003e Get -\u003e [[Get]]\nvar get = [];\nvar p = new Proxy([0,1,2,3], { get: function(o, k) { get.push(k); return o[k]; }});\nArray.prototype.pop.call(p);\nreturn get + '' === \"length,3\";\n```\n\n###### Array.prototype.reverse\n\n```js\n// Array.prototype.reverse -\u003e Get -\u003e [[Get]]\nvar get = [];\nvar p = new Proxy([0,,2,,4,,], { get: function(o, k) { get.push(k); return o[k]; }});\nArray.prototype.reverse.call(p);\nreturn get + '' === \"length,0,4,2\";\n```\n\n###### Array.prototype.shift\n\n```js\n// Array.prototype.shift -\u003e Get -\u003e [[Get]]\nvar get = [];\nvar p = new Proxy([0,1,2,3], { get: function(o, k) { get.push(k); return o[k]; }});\nArray.prototype.shift.call(p);\nreturn get + '' === \"length,0,1,2,3\";\n```\n\n###### Array.prototype.splice\n\n```js\n// Array.prototype.splice -\u003e Get -\u003e [[Get]]\nvar get = [];\nvar p = new Proxy([0,1,2,3], { get: function(o, k) { get.push(k); return o[k]; }});\nArray.prototype.splice.call(p,1,1);\nArray.prototype.splice.call(p,1,0,1);\nreturn get + '' === \"length,constructor,1,2,3,length,constructor,2,1\";\n```\n\n###### Array.prototype.toString\n\n```js\n// Array.prototype.toString -\u003e Get -\u003e [[Get]]\nvar get = [];\nvar p = new Proxy({ join:Function() }, { get: function(o, k) { get.push(k); return o[k]; }});\nArray.prototype.toString.call(p);\nreturn get + '' === \"join\";\n```\n\n###### JSON.stringify\n\n```js\n// JSON.stringify -\u003e Get -\u003e [[Get]]\nvar get = [];\nvar p = new Proxy({}, { get: function(o, k) { get.push(k); return o[k]; }});\nJSON.stringify(p);\nreturn get + '' === \"toJSON\";\n```\n\n###### Promise resolve functions\n\n```js\n// Promise resolve functions -\u003e Get -\u003e [[Get]]\nvar get = [];\nvar p = new Proxy({}, { get: function(o, k) { get.push(k); return o[k]; }});\nnew Promise(function(resolve){ resolve(p); });\nreturn get + '' === \"then\";\n```\n\n###### String.prototype.match\n\n```js\n// String.prototype.match -\u003e Get -\u003e [[Get]]\nvar get = [];\nvar proxied = {};\nproxied[Symbol.toPrimitive] = Function();\nvar p = new Proxy(proxied, { get: function(o, k) { get.push(k); return o[k]; }});\n\"\".match(p);\nreturn get[0] === Symbol.match \u0026\u0026 get[1] === Symbol.toPrimitive \u0026\u0026 get.length === 2;\n```\n\n###### String.prototype.replace\n\n```js\n// String.prototype.replace functions -\u003e Get -\u003e [[Get]]\nvar get = [];\nvar proxied = {};\nproxied[Symbol.toPrimitive] = Function();\nvar p = new Proxy(proxied, { get: function(o, k) { get.push(k); return o[k]; }});\n\"\".replace(p);\nreturn get[0] === Symbol.replace \u0026\u0026 get[1] === Symbol.toPrimitive \u0026\u0026 get.length === 2;\n```\n\n###### String.prototype.search\n\n```js\n// String.prototype.search functions -\u003e Get -\u003e [[Get]]\nvar get = [];\nvar proxied = {};\nproxied[Symbol.toPrimitive] = Function();\nvar p = new Proxy(proxied, { get: function(o, k) { get.push(k); return o[k]; }});\n\"\".search(p);\nreturn get[0] === Symbol.search \u0026\u0026 get[1] === Symbol.toPrimitive \u0026\u0026 get.length === 2;\n```\n\n###### String.prototype.split\n\n```js\n// String.prototype.split functions -\u003e Get -\u003e [[Get]]\nvar get = [];\nvar proxied = {};\nproxied[Symbol.toPrimitive] = Function();\nvar p = new Proxy(proxied, { get: function(o, k) { get.push(k); return o[k]; }});\n\"\".split(p);\nreturn get[0] === Symbol.split \u0026\u0026 get[1] === Symbol.toPrimitive \u0026\u0026 get.length === 2;\n```\n\n###### Date.prototype.toJSON\n\n```js\n// Date.prototype.toJSON -\u003e ToPrimitive -\u003e Get -\u003e [[Get]]\n// Date.prototype.toJSON -\u003e Invoke -\u003e GetMethod -\u003e GetV -\u003e [[Get]]\nvar get = [];\nvar p = new Proxy({toString:Function(),toISOString:Function()}, { get: function(o, k) { get.push(k); return o[k]; }});\nDate.prototype.toJSON.call(p);\nreturn get[0] === Symbol.toPrimitive \u0026\u0026 get.slice(1) + '' === \"valueOf,toString,toISOString\";\n```\n\n##### Proxy, internal 'set' calls\n\n###### Object.assign\n\n```js\n// Object.assign -\u003e Set -\u003e [[Set]]\nvar set = [];\nvar p = new Proxy({}, { set: function(o, k, v) { set.push(k); o[k] = v; return true; }});\nObject.assign(p, { foo: 1, bar: 2 });\nreturn set + '' === \"foo,bar\";\n```\n\n###### Array.from\n\n```js\n// Array.from -\u003e Set -\u003e [[Set]]\nvar set = [];\nvar p = new Proxy({}, { set: function(o, k, v) { set.push(k); o[k] = v; return true; }});\nArray.from.call(function(){ return p; }, {length:2, 0:1, 1:2});\nreturn set + '' === \"length\";\n```\n\n###### Array.of\n\n```js\n// Array.from -\u003e Set -\u003e [[Set]]\nvar set = [];\nvar p = new Proxy({}, { set: function(o, k, v) { set.push(k); o[k] = v; return true; }});\nArray.of.call(function(){ return p; }, 1, 2, 3);\nreturn set + '' === \"length\";\n```\n\n###### Array.prototype.copyWithin\n\n```js\n// Array.prototype.copyWithin -\u003e Set -\u003e [[Set]]\nvar set = [];\nvar p = new Proxy([1,2,3,4,5,6], { set: function(o, k, v) { set.push(k); o[k] = v; return true; }});\np.copyWithin(0, 3);\nreturn set + '' === \"0,1,2\";\n```\n\n###### Array.prototype.fill\n\n```js\n// Array.prototype.fill -\u003e Set -\u003e [[Set]]\nvar set = [];\nvar p = new Proxy([1,2,3,4,5,6], { set: function(o, k, v) { set.push(k); o[k] = v; return true; }});\np.fill(0, 3);\nreturn set + '' === \"3,4,5\";\n```\n\n###### Array.prototype.pop\n\n```js\n// Array.prototype.pop -\u003e Set -\u003e [[Set]]\nvar set = [];\nvar p = new Proxy([], { set: function(o, k, v) { set.push(k); o[k] = v; return true; }});\np.pop();\nreturn set + '' === \"length\";\n```\n\n###### Array.prototype.push\n\n```js\n// Array.prototype.push -\u003e Set -\u003e [[Set]]\nvar set = [];\nvar p = new Proxy([], { set: function(o, k, v) { set.push(k); o[k] = v; return true; }});\np.push(0,0,0);\nreturn set + '' === \"0,1,2,length\";\n```\n\n###### Array.prototype.reverse\n\n```js\n// Array.prototype.reverse -\u003e Set -\u003e [[Set]]\nvar set = [];\nvar p = new Proxy([0,0,0,,], { set: function(o, k, v) { set.push(k); o[k] = v; return true; }});\np.reverse();\nreturn set + '' === \"3,1,2\";\n```\n\n###### Array.prototype.shift\n\n```js\n// Array.prototype.shift -\u003e Set -\u003e [[Set]]\nvar set = [];\nvar p = new Proxy([0,0,,0], { set: function(o, k, v) { set.push(k); o[k] = v; return true; }});\np.shift();\nreturn set + '' === \"0,2,length\";\n```\n\n###### Array.prototype.splice\n\n```js\n// Array.prototype.splice -\u003e Set -\u003e [[Set]]\nvar set = [];\nvar p = new Proxy([1,2,3], { set: function(o, k, v) { set.push(k); o[k] = v; return true; }});\np.splice(1,0,0);\nreturn set + '' === \"3,2,1,length\";\n```\n\n###### Array.prototype.unshift\n\n```js\n// Array.prototype.unshift -\u003e Set -\u003e [[Set]]\nvar set = [];\nvar p = new Proxy([0,0,,0], { set: function(o, k, v) { set.push(k); o[k] = v; return true; }});\np.unshift(0,1);\nreturn set + '' === \"5,3,2,0,1,length\";\n```\n\n##### Proxy, internal 'defineProperty' calls\n\n###### [[Set]]\n\n```js\n// [[Set]] -\u003e [[DefineOwnProperty]]\nvar def = [];\nvar p = new Proxy({foo:1, bar:2}, { defineProperty: function(o, v, desc) { def.push(v); Object.defineProperty(o, v, desc); return true; }});\np.foo = 2; p.bar = 4;\nreturn def + '' === \"foo,bar\";\n```\n\n###### SetIntegrityLevel\n\n```js\n// SetIntegrityLevel -\u003e DefinePropertyOrThrow -\u003e [[DefineOwnProperty]]\nvar def = [];\nvar p = new Proxy({foo:1, bar:2}, { defineProperty: function(o, v, desc) { def.push(v); Object.defineProperty(o, v, desc); return true; }});\nObject.freeze(p);\nreturn def + '' === \"foo,bar\";\n```\n\n##### Proxy, internal 'deleteProperty' calls\n\n###### Array.prototype.copyWithin\n\n```js\n// Array.prototype.copyWithin -\u003e DeletePropertyOrThrow -\u003e [[Delete]]\nvar del = [];\nvar p = new Proxy([0,0,0,,,,], { deleteProperty: function(o, v) { del.push(v); return delete o[v]; }});\np.copyWithin(0,3);\nreturn del + '' === \"0,1,2\";\n```\n\n###### Array.prototype.pop\n\n```js\n// Array.prototype.pop -\u003e DeletePropertyOrThrow -\u003e [[Delete]]\nvar del = [];\nvar p = new Proxy([0,0,0], { deleteProperty: function(o, v) { del.push(v); return delete o[v]; }});\np.pop();\nreturn del + '' === \"2\";\n```\n\n###### Array.prototype.reverse\n\n```js\n// Array.prototype.reverse -\u003e DeletePropertyOrThrow -\u003e [[Delete]]\nvar del = [];\nvar p = new Proxy([0,,2,,4,,], { deleteProperty: function(o, v) { del.push(v); return delete o[v]; }});\np.reverse();\nreturn del + '' === \"0,4,2\";\n```\n\n###### Array.prototype.shift\n\n```js\n// Array.prototype.shift -\u003e DeletePropertyOrThrow -\u003e [[Delete]]\nvar del = [];\nvar p = new Proxy([0,,0,,0,0], { deleteProperty: function(o, v) { del.push(v); return delete o[v]; }});\np.shift();\nreturn del + '' === \"0,2,5\";\n```\n\n###### Array.prototype.splice\n\n```js\n// Array.prototype.splice -\u003e DeletePropertyOrThrow -\u003e [[Delete]]\nvar del = [];\nvar p = new Proxy([0,0,0,0,,0], { deleteProperty: function(o, v) { del.push(v); return delete o[v]; }});\np.splice(2,2,0);\nreturn del + '' === \"3,5\";\n```\n\n###### Array.prototype.unshift\n\n```js\n// Array.prototype.unshift -\u003e DeletePropertyOrThrow -\u003e [[Delete]]\nvar del = [];\nvar p = new Proxy([0,0,,0,,0], { deleteProperty: function(o, v) { del.push(v); return delete o[v]; }});\np.unshift(0);\nreturn del + '' === \"5,3\";\n```\n\n##### Proxy, internal 'getOwnPropertyDescriptor' calls\n\n###### [[Set]]\n\n```js\n// [[Set]] -\u003e [[GetOwnProperty]]\nvar gopd = [];\nvar p = new Proxy({},\n  { getOwnPropertyDescriptor: function(o, v) { gopd.push(v); return Object.getOwnPropertyDescriptor(o, v); }});\np.foo = 1; p.bar = 1;\nreturn gopd + '' === \"foo,bar\";\n```\n\n###### Object.assign\n\n```js\n// Object.assign -\u003e [[GetOwnProperty]]\nvar gopd = [];\nvar p = new Proxy({foo:1, bar:2},\n  { getOwnPropertyDescriptor: function(o, v) { gopd.push(v); return Object.getOwnPropertyDescriptor(o, v); }});\nObject.assign({}, p);\nreturn gopd + '' === \"foo,bar\";\n```\n\n###### Object.prototype.hasOwnProperty\n\n```js\n// Object.prototype.hasOwnProperty -\u003e HasOwnProperty -\u003e [[GetOwnProperty]]\nvar gopd = [];\nvar p = new Proxy({foo:1, bar:2},\n  { getOwnPropertyDescriptor: function(o, v) { gopd.push(v); return Object.getOwnPropertyDescriptor(o, v); }});\np.hasOwnProperty('garply');\nreturn gopd + '' === \"garply\";\n```\n\n###### Function.prototype.bind\n\n```js\n// Function.prototype.bind -\u003e HasOwnProperty -\u003e [[GetOwnProperty]]\nvar gopd = [];\nvar p = new Proxy(Function(),\n  { getOwnPropertyDescriptor: function(o, v) { gopd.push(v); return Object.getOwnPropertyDescriptor(o, v); }});\np.bind();\nreturn gopd + '' === \"length\";\n```\n\n##### Proxy, internal 'ownKeys' calls\n\n###### SetIntegrityLevel\n\n```js\n// SetIntegrityLevel -\u003e [[OwnPropertyKeys]]\nvar ownKeysCalled = 0;\nvar p = new Proxy({}, { ownKeys: function(o) { ownKeysCalled++; return Object.keys(o); }});\nObject.freeze(p);\nreturn ownKeysCalled === 1;\n```\n\n###### TestIntegrityLevel\n\n```js\n// TestIntegrityLevel -\u003e [[OwnPropertyKeys]]\nvar ownKeysCalled = 0;\nvar p = new Proxy(Object.preventExtensions({}), { ownKeys: function(o) { ownKeysCalled++; return Object.keys(o); }});\nObject.isFrozen(p);\nreturn ownKeysCalled === 1;\n```\n\n###### SerializeJSONObject\n\n```js\n// SerializeJSONObject -\u003e EnumerableOwnNames -\u003e [[OwnPropertyKeys]]\nvar ownKeysCalled = 0;\nvar p = new Proxy({}, { ownKeys: function(o) { ownKeysCalled++; return Object.keys(o); }});\nJSON.stringify({a:p,b:p});\nreturn ownKeysCalled === 2;\n```\n\n##### own property order\n\n###### Reflect.ownKeys, string key order\n\n```js\nvar obj = {\n  2: true,\n  0: true,\n  1: true,\n  ' ': true,\n  9: true,\n  D: true,\n  B: true,\n  '-1': true\n};\nobj.A = true;\nobj[3] = true;\n\"EFGHIJKLMNOPQRSTUVWXYZ\".split('').forEach(function(key){\n  obj[key] = true;\n});\nObject.defineProperty(obj, 'C', { value: true, enumerable: true });\nObject.defineProperty(obj, '4', { value: true, enumerable: true });\ndelete obj[2];\nobj[2] = true;\n\nreturn Reflect.ownKeys(obj).join('') === \"012349 DB-1AEFGHIJKLMNOPQRSTUVWXYZC\";\n```\n\n###### Reflect.ownKeys, symbol key order\n\n```js\nvar sym1 = Symbol(), sym2 = Symbol(), sym3 = Symbol();\nvar obj = {\n  1: true,\n  A: true,\n};\nobj.B = true;\nobj[sym1] = true;\nobj[2] = true;\nobj[sym2] = true;\nObject.defineProperty(obj, 'C', { value: true, enumerable: true });\nObject.defineProperty(obj, sym3,{ value: true, enumerable: true });\nObject.defineProperty(obj, 'D', { value: true, enumerable: true });\n\nvar result = Reflect.ownKeys(obj);\nvar l = result.length;\nreturn result[l-3] === sym1 \u0026\u0026 result[l-2] === sym2 \u0026\u0026 result[l-1] === sym3;\n```\n\n##### miscellaneous\n\n###### RegExp constructor can alter flags\n\n```js\nreturn new RegExp(/./im, \"g\").global === true;\n```\n\n###### RegExp.prototype.toString generic and uses \"flags\" property\n\n```js\nreturn RegExp.prototype.toString.call({source: 'foo', flags: 'bar'}) === '/foo/bar';\n```\n\n## Node.js ES2016 Support\n\n#### undefined\n\n##### exponentiation (**) operator\n\n###### basic support\n\n```js\nreturn 2 ** 3 === 8 \u0026\u0026 -(5 ** 2) === -25 \u0026\u0026 (-5) ** 2 === 25;\n```\n\n###### assignment\n\n```js\nvar a = 2; a **= 3; return a === 8;\n```\n\n###### early syntax error for unary negation without parens\n\n```js\nif (2 ** 3 !== 8) { return false; }\ntry {\nFunction(\"-5 ** 2\")();\n} catch(e) {\nreturn true;\n}\n```\n\n##### Array.prototype.includes\n\n###### Array.prototype.includes\n\n```js\nreturn [1, 2, 3].includes(1)\n\u0026\u0026 ![1, 2, 3].includes(4)\n\u0026\u0026 ![1, 2, 3].includes(1, 1)\n\u0026\u0026 [NaN].includes(NaN)\n\u0026\u0026 Array(1).includes();\n```\n\n###### Array.prototype.includes is generic\n\n```js\nvar passed = 0;\nreturn [].includes.call({\nget \"0\"() {\npassed = NaN;\nreturn 'foo';\n},\nget \"11\"() {\npassed += 1;\nreturn 0;\n},\nget \"19\"() {\npassed += 1;\nreturn 'foo';\n},\nget \"21\"() {\npassed = NaN;\nreturn 'foo';\n},\nget length() {\npassed += 1;\nreturn 24;\n}\n}, 'foo', 6) === true \u0026\u0026 passed === 3;\n```\n\n###### %TypedArray%.prototype.includes\n\n```js\nreturn [Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array,\nInt32Array, Uint32Array, Float32Array, Float64Array].every(function(TypedArray){\nreturn new TypedArray([1, 2, 3]).includes(1)\n\u0026\u0026 !new TypedArray([1, 2, 3]).includes(4)\n\u0026\u0026 !new TypedArray([1, 2, 3]).includes(1, 1);\n});\n```\n\n#### undefined\n\n##### \n\n###### strict fn w/ non-strict non-simple params is error\n\n```js\nfunction foo(...a){}\ntry {\nFunction(\"function bar(...a){'use strict';}\")();\n} catch(e) {\nreturn true;\n}\n```\n\n###### nested rest destructuring, declarations\n\n```js\nvar [x, ...[y, ...z]] = [1,2,3,4];\nreturn x === 1 \u0026\u0026 y === 2 \u0026\u0026 z + '' === '3,4';\n```\n\n###### nested rest destructuring, parameters\n\n```js\nreturn function([x, ...[y, ...z]]) {\nreturn x === 1 \u0026\u0026 y === 2 \u0026\u0026 z + '' === '3,4';\n}([1,2,3,4]);\n```\n\n###### Proxy, \"enumerate\" handler removed\n\n```js\nvar passed = true;\nvar proxy = new Proxy({}, {\nenumerate: function() {\npassed = false;\n}\n});\nfor(var key in proxy); // Should not throw, nor execute the 'enumerate' method.\nreturn passed;\n```\n\n###### Proxy internal calls, Array.prototype.includes\n\n```js\n// Array.prototype.includes -\u003e Get -\u003e [[Get]]\nvar get = [];\nvar p = new Proxy({length: 3, 0: '', 1: '', 2: '', 3: ''}, { get: function(o, k) { get.push(k); return o[k]; }});\nArray.prototype.includes.call(p, {});\nif (get + '' !== \"length,0,1,2\") return;\n\nget = [];\np = new Proxy({length: 4, 0: NaN, 1: '', 2: NaN, 3: ''}, { get: function(o, k) { get.push(k); return o[k]; }});\nArray.prototype.includes.call(p, NaN, 1);\nreturn (get + '' === \"length,1,2\");\n```\n\n## Node.js ES2017 Support\n\n#### undefined\n\n##### Object static methods\n\n###### Object.values\n\n```js\nvar obj = Object.create({ a: \"qux\", d: \"qux\" });\nobj.a = \"foo\"; obj.b = \"bar\"; obj.c = \"baz\";\nvar v = Object.values(obj);\nreturn Array.isArray(v) \u0026\u0026 String(v) === \"foo,bar,baz\";\n```\n\n###### Object.entries\n\n```js\nvar obj = Object.create({ a: \"qux\", d: \"qux\" });\nobj.a = \"foo\"; obj.b = \"bar\"; obj.c = \"baz\";\nvar e = Object.entries(obj);\nreturn Array.isArray(e)\n\u0026\u0026 e.length === 3\n\u0026\u0026 String(e[0]) === \"a,foo\"\n\u0026\u0026 String(e[1]) === \"b,bar\"\n\u0026\u0026 String(e[2]) === \"c,baz\";\n```\n\n###### Object.getOwnPropertyDescriptors\n\n```js\nvar object = {a: 1};\nvar B = typeof Symbol === 'function' ? Symbol('b') : 'b';\nobject[B] = 2;\nvar O = Object.defineProperty(object, 'c', {value: 3});\nvar D = Object.getOwnPropertyDescriptors(O);\n\nreturn D.a.value === 1 \u0026\u0026 D.a.enumerable === true \u0026\u0026 D.a.configurable === true \u0026\u0026 D.a.writable === true\n\u0026\u0026 D[B].value === 2 \u0026\u0026 D[B].enumerable === true \u0026\u0026 D[B].configurable === true \u0026\u0026 D[B].writable === true\n\u0026\u0026 D.c.value === 3 \u0026\u0026 D.c.enumerable === false \u0026\u0026 D.c.configurable === false \u0026\u0026 D.c.writable === false;\n```\n\n###### Object.getOwnPropertyDescriptors doesn't provide undefined descriptors\n\n```js\nvar P = new Proxy({a:1}, {\n  getOwnPropertyDescriptor: function(t, k) {}\n});\nreturn !Object.getOwnPropertyDescriptors(P).hasOwnProperty('a');\n```\n\n#### undefined\n\n##### \n\n###### Proxy \"ownKeys\" handler, duplicate keys for non-extensible targets (ES 2017 semantics)\n\n```js\nvar P = new Proxy(Object.preventExtensions(Object.defineProperty({a:1}, \"b\", {value:1})), {\nownKeys: function() {\nreturn ['a','a','b','b'];\n}\n});\nreturn Object.getOwnPropertyNames(P) + '' === \"a,a,b,b\";\n```\n\n#### undefined\n\n##### Proxy internal calls, getter/setter methods\n\n###### __defineGetter__\n\n```js\n// Object.prototype.__defineGetter__ -\u003e DefinePropertyOrThrow -\u003e [[DefineOwnProperty]]\nvar def = [];\nvar p = new Proxy({}, { defineProperty: function(o, v, desc) { def.push(v); Object.defineProperty(o, v, desc); return true; }});\nObject.prototype.__defineGetter__.call(p, \"foo\", Object);\nreturn def + '' === \"foo\";\n```\n\n###### __defineSetter__\n\n```js\n// Object.prototype.__defineSetter__ -\u003e DefinePropertyOrThrow -\u003e [[DefineOwnProperty]]\nvar def = [];\nvar p = new Proxy({}, { defineProperty: function(o, v, desc) { def.push(v); Object.defineProperty(o, v, desc); return true; }});\nObject.prototype.__defineSetter__.call(p, \"foo\", Object);\nreturn def + '' === \"foo\";\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikeralphson%2Fnode-green-analysis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikeralphson%2Fnode-green-analysis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikeralphson%2Fnode-green-analysis/lists"}