@bytebury/toolkit
v1.1.0
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.
Readme
toolkit
toolkit is a developer-friendly TypeScript utility library with small, well-typed helpers for common tasks. It’s designed to reduce boilerplate, stay out of your way, and feel natural to use in everyday projects.
Getting Started
You can install this application from npm or jsr.
# recommended if using NodeJS
npx jsr add @bytebury/toolkit
# good, old-fashion npm
npm install @bytebury/toolkit --save
# or, if you're using Deno
deno add jsr:@bytebury/toolkitSample 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
}