formatconvertsuchit
v1.0.0
Published
This package provides a function to convert time from 24-hour format to 12-hour format (AM/PM).
Downloads
4
Readme
24-Hour to 12-Hour Time Format Converter
This package provides a function to convert time from 24-hour format to 12-hour format (AM/PM).
Installation
npm install formatconvertSuchit
Usage
const convertTo12HourFormat = require('time-format-converter');
console.log(convertTo12HourFormat('14:30')); // "2:30 PM"
console.log(convertTo12HourFormat('06:45')); // "6:45 AM"
### 5. **Create a `.npmignore` file (optional)**
You can create a `.npmignore` file to avoid including unnecessary files, like tests or build files, in the npm package:
```bash
touch .npmignore
