MCPcopy Create free account
hub / github.com/Bitbox-Connect/Bitbox / capitalize

Function capitalize

client/src/component/Alert.jsx:4–10  ·  view source on GitHub ↗
(word)

Source from the content-addressed store, hash-verified

2import '../App.css'
3function Alert(props) {
4 const capitalize = (word) => {
5 if (word === 'danger') {
6 word = 'error'
7 }
8 const lower = word.toLowerCase();
9 return lower.charAt(0).toUpperCase() + lower.slice(1);
10 }
11
12 return (
13 <div className='alert-bar'>

Callers 1

AlertFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected