Skip to content

Instantly share code, notes, and snippets.

@Kynako
Kynako / chainable.js
Created September 23, 2021 03:44
Generate classes that can use method chaining from built-in classes.
/*
# Usage
const chainable = importModule('chainable')
// generate a class that can use method chaining.
const ChainableAlert = chainable('Alert')
// construct instance