The proposal is to be able to define multiple static properties as group, using already defined object literal syntax.
// currently in ES6
class Foo {
static f() {return 'f';}
static get g() {return 'g';}
}| #!/usr/bin/env bash | |
| js17 -e ' | |
| function stdin() { | |
| var a = [], l; | |
| while(null != (l = readline())) a.push(l); | |
| return a.join("\n"); | |
| } | |
| print( | |
| (arguments[2] || stdin()).replace( |
| var inherit = (function () { | |
| function Constructor() { | |
| // always reassign the initial | |
| // prototype to avoid problems | |
| // in jurassic engines | |
| Constructor.prototype = cp; | |
| } | |
| // original prototype | |
| var cp = Constructor.prototype; | |
| // the inherit function |
| function shoutOut(name, opts) { | |
| opts || (opts = {}); | |
| return [ | |
| name, 'says', | |
| opts.greeting || 'greeting', | |
| opts.target || 'target' | |
| ].join(' '); | |
| } |
| log.cursor = '\\|/-'; | |
| function log(info) { | |
| // (C) Andrea Giammarchi | |
| var | |
| verify = function (condition) { | |
| if (timer) { | |
| if (condition()) { | |
| self.ok(); | |
| } else { | |
| setTimeout(verify, delay, condition); |
The proposal is to be able to define multiple static properties as group, using already defined object literal syntax.
// currently in ES6
class Foo {
static f() {return 'f';}
static get g() {return 'g';}
}| // this is now a module: | |
| // https://github.com/WebReflection/backtick-template#es2015-backticks-for-es3-engines-- | |
| var template = require('backtick-template'); | |
| // just string | |
| const info = 'template'; | |
| `some ${info}` === template('some ${info}', {info}); |
| function arrayFy(constructor) { | |
| Object.getOwnPropertyNames( | |
| Array.prototype | |
| ).forEach(function (key) { | |
| var descriptor = Object.getOwnPropertyDescriptor( | |
| Array.prototype, | |
| key | |
| ); | |
| if ( | |
| typeof descriptor.value === 'function' && |
| var protoReviver = (function (proto, hasNoProto) { | |
| // (C) Andrea Giammarchi - WTFPL License | |
| return function (k, v) { | |
| if (k === proto && v !== null) { | |
| for (var | |
| tmp = window, | |
| nmsp = v.split('.'), | |
| i = 0; | |
| i < nmsp.length; | |
| i++ |
| var isNativeFunction = (function (Function) { | |
| var | |
| toString = Function.toString, | |
| re = new RegExp( | |
| '^' + | |
| toString | |
| .call(Function) | |
| .replace(/([\/\\[\]{}()^$.*+?_-])/g, '\\$1') | |
| .replace('Function', '[a-zA-Z$_][\\S]*') + | |
| '$' |
My table orderer ... instead of the filter
<!DOCTYPE html>
<html ng-app="tasteAngularJS">
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.26/angular.min.js"></script>
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css">