Skip to content

Instantly share code, notes, and snippets.

🐢
Finding Browser Bugs

Clint Ayres jurassix

🐢
Finding Browser Bugs
Block or report user

Report or block jurassix

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jurassix
jurassix / abortable.js
Last active Apr 21, 2016 — forked from spudly/abortable.js
Abort your promises!
View abortable.js
const abortable = (func) => (...args) => {
let aborted = false;
const abort = () => { aborted = true; };
const promise = new Promise((resolve, reject) => {
const resolveIfNotAborted = resolution => {
if (aborted) {
reject(Error('promise aborted'));
}
View joinArray.js
export const joinArray = (list = [], separator) =>
list.reduce((joinedList, item, index, {length}) => {
joinedList.push(item);
if (index < (length - 1)) {
joinedList.push(separator);
}
return joinedList;
}, []);
View redux-utils.js
export const contains = (list = [], test) => list.indexOf(test) >= 0;
export const removeItemAt = (list = [], index = 0) =>
[
...list.slice(0, index),
...list.slice(index + 1),
];
export const insertItemAt = (list = [], index = 0, item) =>
[
@jurassix
jurassix / React Inline Styles with responsive design.markdown
Last active Aug 29, 2015
React Inline Styles with responsive design
View React Inline Styles with responsive design.markdown
@jurassix
jurassix / React Inline Styles with Media Query.markdown
Last active May 25, 2019
React Inline Styles with Media Query
View React Inline Styles with Media Query.markdown
You can’t perform that action at this time.