Skip to content

Instantly share code, notes, and snippets.

View nolros's full-sized avatar

Nolan nolros

View GitHub Profile
function trampoline(fn) {
return function trampolined(...args) {
let result = fn(...args);
while (typeof result === 'function') {
result = result();
}
return result;
};
}
@nolros
nolros / input.scss
Created June 18, 2021 05:36
Generated by SassMeister.com.
@function str-replace($string, $search, $replace: "") {
$index: str-index($string, $search);
@if $index {
@return str-slice($string, 1, $index - 1) + $replace +
str-replace(str-slice($string, $index + str-length($search)), $search, $replace);
}