Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

isharry

A simple NPM package to check if a string is 'Harry' and get its length.

Harry, check, count-string, npm-package

readme

isHarry

A simple NPM package that checks if a string is "Harry" and provides additional string utilities.

Installation

npm install isharry

Usage

CommonJS (CJS)

const { isHarry, isHarryCount } = require("isharry");

console.log(isHarry("Harry")); // true
console.log(isHarry("John")); // false
console.log(isHarryCount("Hello")); // 5

ES Modules (ESM)

import { isHarry, isHarryCount } from "isharry";

console.log(isHarry("Harry")); // true
console.log(isHarryCount("World")); // 5

Functions

isHarry(name)

Checks if the given string is exactly "Harry".

isHarry("Harry"); // true
isHarry("harry"); // false

isHarryCount(name)

Returns the length of the given string.

isHarryCount("Hello"); // 5

License

MIT License


Enjoy using isHarry!