Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
'use strict';
export function free(fn) {
return function() {
return this === undefined ? fn.apply(undefined, arguments) : fn.call(undefined, this, ...arguments);
}
}
export function freeRight(fn) {
return function() {
return this === undefined ? fn.apply(undefined, arguments) : fn.call(undefined, ...arguments, this);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment