Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

is-cool-cli 😎

A simple CLI tool that checks if a string contains the word "cool".

Installation

npm install -g is-cool-cli

Usage

# Basic usage
iscool "this is cool"
# Output: 
# Input: "this is cool"
# Contains "cool": true

# Case insensitive
iscool "COOL STUFF"
# Output:
# Input: "COOL STUFF" 
# Contains "cool": true

# Multiple words
iscool this is really cool stuff
# Output:
# Input: "this is really cool stuff"
# Contains "cool": true

# No match
iscool "this is warm"
# Output:
# Input: "this is warm"
# Contains "cool": false

Exit Codes

  • 0: String contains "cool"
  • 1: String does not contain "cool" or invalid usage

This makes it useful in shell scripts:

if iscool "cool beans"; then
  echo "It's cool!"
else
  echo "Not cool."
fi

API

You can also use it as a Node.js module:

const { isCool } = require('is-cool-cli');

console.log(isCool('cool stuff')); // true
console.log(isCool('warm weather')); // false
console.log(isCool('COOL BEANS')); // true (case insensitive)

Examples

iscool "ice cold" # false
iscool "cool as a cucumber" # true  
iscool "school" # true (contains "cool")
iscool "warm" # false

Why?

Sometimes you just need to know if something is cool. 🤷‍♂️

License

MIT

About

Simple CLI to check if a string contains 'cool'

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages