This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
var root = $(document.getElementsByTagName('body')); | |
var watchers = []; | |
var f = function (element) { | |
if (element.data().hasOwnProperty('$scope')) { | |
angular.forEach(element.data().$scope.$$watchers, function (watcher) { | |
watchers.push(watcher); | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Car { | |
constructor (config) { | |
this.make = config.make || 'Unknown'; | |
this.model = config.model || 'Unknown'; | |
} | |
get price() { | |
return this.price; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//coffee | |
[1,2,3].push [4] .map .reduce | |
//js | |
// Generated by CoffeeScript 1.10.0 | |
(function() { | |
[1, 2, 3].push([4].map.reduce); | |
}).call(this); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C02Q10QCG8WM:~ gpatel$ ./node_modules/.bin/babel -d ~/tmp/es5-compiled --presets es2015 ~/tmp/lib.js ~/tmp/main.js | |
/Users/gpatel/tmp/lib.js -> /Users/gpatel/tmp/es5-compiled/Users/gpatel/tmp/lib.js | |
/Users/gpatel/tmp/main.js -> /Users/gpatel/tmp/es5-compiled/Users/gpatel/tmp/main.js | |
C02Q10QCG8WM:~ gpatel$ cat ~/tmp/lib.js ~/tmp/main.js ~/tmp/es5-compiled/Users/gpatel/tmp/* | |
export const sqrt = Math.sqrt; | |
export function square(x) { | |
return x * x; | |
} | |
export function diag(x, y) { | |
return sqrt(square(x) + square(y)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
for(let i=0; i<1000 ;i++) { | |
setTimeout(function() { | |
console.log(`Hi`); | |
}, 0); | |
} | |
for(let i=0; i<1000; i++) { | |
console.log('Hello'); | |
} | |
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>Untitled benchmark</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
<script src="./suite.js"></script> | |
</head> | |
<body> | |
<h1>Open the console to view the results</h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>Array#forEach</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
<script src="./suite.js"></script> | |
</head> | |
<body> | |
<h1>Open the console to view the results</h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vue.Component({ | |
name: 'foo', | |
template: ` | |
<section v-html="markup"></section> | |
`, | |
props: [], | |
data() { | |
return { | |
markup: '' | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var config = require('../config'); | |
var webpack = require('webpack'); | |
var merge = require('webpack-merge'); | |
var utils = require('./utils'); | |
var path = require('path'); | |
var projectRoot = path.resolve(__dirname, '../'); | |
var baseWebpackConfig = require('./webpack.common'); | |
var ExtractTextPlugin = require('extract-text-webpack-plugin'); | |
const ENV = process.env.ENV = process.env.NODE_ENV = 'production'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const webpack = require('webpack'); | |
const helpers = require('./helpers'); | |
const config = require('../config'); | |
const path = require('path'); | |
const projectRoot = path.resolve(__dirname, '../'); | |
const utils = require('./utils'); | |
const ExtractTextPlugin = require('extract-text-webpack-plugin'); | |
const ENV = process.env.NODE_ENV || 'development'; |
OlderNewer