This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sade from 'sade' | |
const kivi = sade('kivi') | |
kivi | |
.version('1.0.0') | |
.describe('cli for kivibot') | |
.option('-c, --config', 'Provide path to custom kivibot config', 'kivi.json') | |
kivi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @from antfu https://antfu.me/posts/destructuring-with-object-or-array | |
export function destructIt<T extends Record<string, unknown>, A extends readonly any[]>( | |
obj: T, | |
arr: A | |
): T & A { | |
const clone = { ...obj } | |
Object.defineProperty(clone, Symbol.iterator, { | |
enumerable: false, |
OlderNewer