- Clear feature ownership
- Module usage predictibility (refactoring, maintainence, you know what's shared, what's not, prevents accidental regressions, avoids huge directories of not-actually-reusable modules, etc)
| /** | |
| * performance-timing.js: Polyfill for performance.timing object | |
| * For greatest accuracy, this needs to be run as soon as possible in the page, preferably inline. | |
| * The values returned are necessarily not absolutely accurate, but are close enough for general purposes. | |
| * @author ShirtlessKirk. Copyright (c) 2014. | |
| * @license WTFPL (http://www.wtfpl.net/txt/copying) | |
| */ | |
| (function (window) { | |
| 'use strict'; |
By the way, I'm available for tutoring and code review :)
- What Promises library should I use?
- How do I create a Promise myself?
- How do I use
new Promise? - How do I resolve a Promise?
- But what if I want to resolve a synchronous result or error?
- [But what if it's at the start of a chain, and I'm not in a
.thencallback yet?](https://gist.github.com/joepie91/4c3a10629a4263a522e3bc4839a28c83#6-but
using mocha/chai/sinon for node.js unit-tests? check out my utility: mocha-stirrer to easily reuse test components and mock require dependencies
I recently had several days of extremely frustrating experiences with service workers. Here are a few things I've since learned which would have made my life much easier but which isn't particularly obvious from most of the blog posts and videos I've seen.
I'll add to this list over time – suggested additions welcome in the comments or via twitter.com/rich_harris.
Chrome 51 has some pretty wild behaviour related to console.log in service workers. Canary doesn't, and it has a load of really good service worker related stuff in devtools.
There's been a strange explosion in misinformation about browserify recently, particularly in comparisons to webpack.
Generally speaking, most of this confusion stems from how webpack is more willing to pull features into its core to ease discoverability while browserify is more likely to push features out to userland instead.
I think that longer-term, separability has more benefits from a maintenance and
Locate the section for your github remote in the .git/config file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: