@bobatea/matcha
v1.3.2
Published
TypeScript utility library to help energize your projects with useful functions for any size project. Save yourself some time and focus on shipping features.
Downloads
989
Readme
matcha
Deliciously energize your projects with matcha, a TypeScript utility library to help speed up your development cycle with a focus on correctness.
Getting Started
You can install this application from npm or jsr.
# recommended if using NodeJS
npx jsr add @boba/matcha
# old-fashion npm
npm install @bobatea/matcha --save
# or, if you're using Deno
deno add jsr:@boba/matchaSample Usage
function sayHelloTo(name: string): void {
if (isWhitespace(name) {
console.log("Hello, Guest!");
} else {
console.log(`Hello, ${title(name)}!`);
}
}
function getAverageAge(): number {
const people = [
{ name: "Tom", age: 2 },
{ name: "Carly", age: 8 },
{ name: "Jenny", age: 5 }
];
return average(people, "age"); // 5
}