Skip to content

Commit 1dada05

Browse files
author
pr0fix
committed
update README
1 parent 9d9d046 commit 1dada05

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ To install caffeinated-strings, run the following command:
2727
| `===, >, <` | `compareBeans` | Compares two strings (like comparing coffee beans for quality). |
2828
| `.indexOf()` | `findFirstSip` | Finds the first occurrence of a **character** in a string (like the first sip of coffee). |
2929
| `.indexOf()` | `findFlavor` | Finds the first occurrence of a **substring** inside a string (like detecting flavors in coffee). |
30+
| `.toLowerCase()` | `coolDown` | Transforms the string to lowercase (like cooling down a cup of coffee). |
3031
| `.toUpperCase()` | `froth` | Transforms the string to uppercase (like frothing the milk to create a creamy top). |
3132

3233
## 🔧 Usage
@@ -99,7 +100,16 @@ let drink = "cappuccino";
99100
console.log(findFlavor(drink, "cc")); // "ccuccino"
100101
```
101102

102-
8. `froth(str)`
103+
8. `coolDown(str)`
104+
Transforms the string to lowercase (like cooling down a cup of coffee).
105+
Returns the input in lowercase as `string`:
106+
107+
```js
108+
let drink = "ESPRESSO";
109+
console.log(froth(drink)); // "espresso"
110+
```
111+
112+
9. `froth(str)`
103113
Transforms the string to uppercase (like frothing the milk to create a creamy top).
104114
Returns the input in uppercase as `string`:
105115

0 commit comments

Comments
 (0)