Skip to content

Instantly share code, notes, and snippets.

View dabbott's full-sized avatar

Devin Abbott dabbott

View GitHub Profile
// Swift port by Devin Abbott <[email protected]>, 2017.
// (c) Dean McNamee <[email protected]>, 2012.
//
// https://github.com/deanm/css-color-parser-js
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
{
"colors": [
{
"name": "accent",
"hex": "#CCDDEE",
"comments": "The best color"
}
]
}
@dabbott
dabbott / apollo-client.js
Created February 18, 2017 17:47
apollo-client
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else if(typeof exports === 'object')
exports["apollo-client"] = factory();
else
root["apollo-client"] = factory();
})(this, function() {
@dabbott
dabbott / react-apollo.js
Last active February 18, 2017 17:21
react-apollo
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("react"), require("react-dom/server"));
else if(typeof define === 'function' && define.amd)
define(["react", "react-dom/server"], factory);
else if(typeof exports === 'object')
exports["react-apollo"] = factory(require("react"), require("react-dom/server"));
else
root["react-apollo"] = factory(root["React"], root["ReactDOM"]);
})(this, function(__WEBPACK_EXTERNAL_MODULE_0__, __WEBPACK_EXTERNAL_MODULE_34__) {
@dabbott
dabbott / graphql-tag.js
Last active February 18, 2017 17:05
graphql-tag
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else if(typeof exports === 'object')
exports["graphql-tag"] = factory();
else
root["graphql-tag"] = factory();
})(this, function() {
@dabbott
dabbott / graphql-tag
Created February 18, 2017 16:48
graphql-tag
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else if(typeof exports === 'object')
exports["graphql-tag"] = factory();
else
root["graphql-tag"] = factory();
})(this, function() {
@dabbott
dabbott / react-apollo.js
Created February 18, 2017 16:34
react-apollo
!function e(t,n,r){function o(u,s){if(!n[u]){if(!t[u]){var a="function"==typeof require&&require;if(!s&&a)return a(u,!0);if(i)return i(u,!0);var c=new Error("Cannot find module '"+u+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[u]={exports:{}};t[u][0].call(l.exports,function(e){var n=t[u][1][e];return o(n?n:e)},l,l.exports,e,t,n,r)}return n[u].exports}for(var i="function"==typeof require&&require,u=0;u<r.length;u++)o(r[u]);return o}({1:[function(e,t,n){"use strict";var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},o=e("react"),i=e("react"),u=e("invariant"),s=function(e){function t(t,n){var r=e.call(this,t,n)||this;return u(t.client,'ApolloClient was not passed a client instance. Make sure you pass in your client via the "client" prop.'),r.client=t.client,t.store?(r.store=t.store,t.immutable&&t.client.initStore(),r):(t.client.initStore(),r.store=t.client.store,r)}retur
@dabbott
dabbott / match.js
Last active January 20, 2017 17:12
JavaScript Match Expression
// Match expression
//
// `match` behaves similarly to `switch`. `match` is an expression, while `switch` is
// a statement, but the main idea is the same. The value of the `match` expression is
// the completion value of the chosen case.
//
// Since we might not be able to use the name `match` due to how common it is in
// existing code (e.g. String.prototype.match), alternative ideas:
//
// switch* pattern match*
!function(modules){function __webpack_require__(moduleId){if(installedModules[moduleId])return installedModules[moduleId].exports;var module=installedModules[moduleId]={exports:{},id:moduleId,loaded:!1};return modules[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.loaded=!0,module.exports}var installedModules={};return __webpack_require__.m=modules,__webpack_require__.c=installedModules,__webpack_require__.p="",__webpack_require__(0)}([function(module,exports,__webpack_require__){var Defaults,Framer,_;_=__webpack_require__(1)._,Framer={},Framer._=_,Framer.Utils=__webpack_require__(4),Framer.Color=__webpack_require__(10).Color,Framer.Layer=__webpack_require__(13).Layer,Framer._Layer=Framer.Layer,Framer.BackgroundLayer=__webpack_require__(36).BackgroundLayer,Framer.VideoLayer=__webpack_require__(37).VideoLayer,Framer.SVGLayer=__webpack_require__(38).SVGLayer,Framer.Events=__webpack_require__(15).Events,Framer.Gestures=__webpack_require__(16).Gestures,Framer.Animation=__webpack_r
compareProps = (a, b) => {
for (let key in a) {
if (a[key] !== b[key]) console.log('Changed:', key, a[key], '=>', b[key]);
}
for (let key in b) {
if (!(key in a)) console.log('Added:', key, b[key]);
}
};