An idea from combination of [...rest, last] syntax, reverse iterator and function.sent
[first, second, ...rest, last2, last] = o
basically become:
const iter = o[Symbol.Iterator]()[...rest, last] syntax, reverse iterator and function.sent[first, second, ...rest, last2, last] = o
basically become:
const iter = o[Symbol.Iterator]()| void function () { | |
| 'use strict' | |
| const targetSymbol = Symbol() | |
| function createSafeMethod(method) { | |
| return new Proxy(method, { | |
| apply(target, thisArg, argArray) { | |
| return Reflect.apply(target, thisArg[targetSymbol], argArray) | |
| } |
| // See https://github.com/nodejs/node/issues/6456 | |
| import {platform} from 'os' | |
| import {satisfies} from 'semver' | |
| if (platform() === 'darwin' && satisfies(process.version, '>=6.0.0 <6.2.1')) { | |
| for (const s of [process.stdout, process.stderr]) { | |
| if (s && s.isTTY && s._handle && typeof s._handle.setBlocking === 'function') { | |
| s._handle.setBlocking(true) | |
| } |
| const {main} = require('./main') | |
| main() |
| 'use strict' | |
| const Benchmark = require('benchmark') | |
| function MASK() { | |
| return 100 | |
| } | |
| function MAX() { |
| void function () { | |
| if (!window.tracker) { | |
| return; | |
| } | |
| var events = ['scroll', 'click', 'mousemove', 'keydown', 'mousedown']; | |
| for (var i = 0; i < events.length; i++) { | |
| addHandler(document, events[i], detect); | |
| } | |
| function detect(event) { | |
| for (var i = 0; i < events.length; i++) { |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>JS Bin</title> | |
| </head> | |
| <body> | |
| <script id="jsbin-javascript"> | |
| // See https://github.com/promises-aplus/promises-spec/issues/179 |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>JS Bin</title> | |
| </head> | |
| <body> | |
| <script id="jsbin-javascript"> | |
| // See https://github.com/promises-aplus/promises-spec/issues/179 |
| header { | |
| color: white; | |
| background: navy; | |
| height: 60px; | |
| position: fixed; | |
| left: 0; | |
| right: 0; | |
| top: 0; | |
| } |