component
is Component version 0.19.6. mycomponent
is the same version with applied.
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 result = squareOfDifference(4, 7); | |
console.log('Result is', result); | |
function square(n) { | |
var result = n * n; | |
return result; | |
} | |
function squareOfDifference(x, y) { | |
var diff = x - 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
var start = new Date().getTime() | |
timestamp = function timestamp(msg){ | |
var end = new Date().getTime() | |
console.log('[' + (end - start) + 'ms]', msg) | |
} | |
var mine = require('js-linker/mine.js'); | |
var fs = require('fs'); | |
timestamp('loaded modules') | |
timestamp('start') |
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> | |
</head> | |
<div id="textarea" contenteditable="true"> | |
Hello, World! | |
</div> | |
<button>Done</button> | |
<script> | |
textarea.addEventListener('keyup', function(e){ |
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
#! /usr/bin/env node | |
var fs = require('fs') | |
var filename = process.argv[2] | |
var transforms = [mutation, deletion, insertion] | |
var text = fs.readFileSync(filename) + '' | |
var idx = Math.floor(Math.random() * transforms.length) | |
var transform = transforms[idx] | |
text = transform(text) | |
fs.writeFileSync(filename, text) |
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 BackboneAdapter(model){ | |
if (!(this instanceof BackboneAdapter)) return new BackboneAdapter(model); | |
this.model = model; | |
} | |
BackboneAdapter.prototype = { | |
subscribe: function(prop, fn){ | |
this.model.on('change:' + prop, fn); | |
}, | |
unsubscribe: function(prop, fn){ |
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
#! /usr/bin/env node | |
var http = require('http') | |
var request = require('request') | |
var server = http.createServer(handler) | |
server.listen(3001) | |
console.log('Listening on port 3001') |
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
* doesn't skip holes properly | |
* `indexOf` - doesn't handle second parameter `fromIndex` | |
* iteration methods (`map`, `forEach`, `reduce`, etc) don't handle 3rd parameter array | |
* iteration methods don't set context for the callback when provided as last parameter | |
* `reduceRight` method non-existent | |
* `some` method non-existent |
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
3rd-eden/fortress | |
4th-dimension/utf8-length | |
alanshaw/hoodie-plugin-reactive | |
acconut/util | |
alexindigo/deeply | |
amiorin/jquery2 | |
amiorin/jquery | |
alexindigo/timeless | |
acstll/deep-get-set | |
acstll/alerts |
OlderNewer