cognish_shared
v1.3.0
Published
A shared utility package that provides greeting functionality with ASCII art powered by cowsay.
Readme
cognish_shared
A shared utility package that provides greeting functionality with ASCII art powered by cowsay.
Installation
npm install cognish_sharedor with pnpm:
pnpm add cognish_sharedor with yarn:
yarn add cognish_sharedFeatures
- Dual module support (CommonJS and ES Modules)
- ASCII art greetings using cowsay
- Simple and fun greeting functionality
Usage
ES Modules (ESM)
import { greet } from 'cognish_shared';
greet('World');
// Outputs an ASCII cow saying "Hello World"
// Returns: "this is moduleJs"CommonJS (CJS)
const greet = require('cognish_shared');
greet('World');
// Outputs an ASCII cow saying "Hello World"
// Returns: "this is commonJs"API
greet(name)
Displays an ASCII art cow greeting with the provided name and returns a string indicating the module type.
Parameters:
name(string): The name to include in the greeting message
Returns:
string: "this is moduleJs" (ESM) or "this is commonJs" (CJS)
Side Effects:
- Prints ASCII art to the console using cowsay
Dependencies
- cowsay - ASCII art cow generator
License
ISC
Version
Current version: 1.2.0
