A shared utility package that provides greeting functionality with ASCII art powered by cowsay.
npm install cognish_sharedbash
npm install cognish_shared
`
or with pnpm:
`bash
pnpm add cognish_shared
`
or with yarn:
`bash
yarn add cognish_shared
`
Features
- Dual module support (CommonJS and ES Modules)
- ASCII art greetings using cowsay
- Simple and fun greeting functionality
Usage
$3
`javascript
import { greet } from 'cognish_shared';
greet('World');
// Outputs an ASCII cow saying "Hello World"
// Returns: "this is moduleJs"
`
$3
`javascript
const greet = require('cognish_shared');
greet('World');
// Outputs an ASCII cow saying "Hello World"
// Returns: "this is commonJs"
`
API
$3
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)