nkhenny
v0.0.1
Published
Personal utility helpers from Nkhenny
Readme
nkhenny
Personal npm package that ships a couple of lightweight utilities. It exposes a default namespace object with properties and methods so you can import everything at once or cherry-pick named exports.
Install
npm install nkhennyUsage
import nkhenny, { creator, greet, sum } from 'nkhenny';
console.log(nkhenny.creator); // "Nkhenny"
console.log(nkhenny.tagline); // "Friendly greetings and safe number helpers"
console.log(greet('Sam')); // "Hello, Sam!"
console.log(sum(1, 2, '3.5')); // 6.5API
creator(string): name of the package author.tagline(string): short description of what the package offers.greet(name?: string): string: returns a friendly greeting; empty input falls back to"world".sum(...values: number[]): number: sums numeric arguments, ignoring anything that cannot be parsed into a finite number.
Notes
- Published as an ES module (
type: "module") with a default export that exposes the whole API namespace. - Two-factor authentication must be enabled on your npmjs.com account before publishing.
