Skip to content

Instantly share code, notes, and snippets.

@porsager
porsager / finished-polyfill.js
Last active May 17, 2020 21:26 — forked from simevidas/finished-polyfill.js
Animation.prototype.finished polyfill
// only polyfill .finished in browsers that already support animate()
if (document.body.animate) {
// Chrome does not seem to expose the Animation constructor globally
if (typeof Animation === 'undefined') {
window.Animation = document.body.animate({}).constructor;
}
if (!Animation.prototype.hasOwnProperty('finished')) {
Object.defineProperty(Animation.prototype, 'finished', {
const Primus = require('primus'),
path = require('path'),
chalk = require('chalk'),
log = console.log,
primusRequests = require('primus-requests')
const sockets = module.exports
sockets.listen = function(server) {
const primus = sockets.primus = new Primus(server, {
@porsager
porsager / package.json
Last active September 13, 2016 19:59 — forked from cmnstmntmn/package.json
{
"name": "www",
"version": "1.0.0",
"scripts": {
"dev": "node tasks/wright.dev.js",
"prod": "node tasks/wright.prod.js"
},
"dependencies": {
"rollup": "^0.35.9",
"wright": "github:porsager/wright"