https://github.com/rtasalem/utils.js
A collection of JavaScript utilities.
https://github.com/rtasalem/utils.js
code-snippets javascript utilities
Last synced: 3 months ago
JSON representation
A collection of JavaScript utilities.
- Host: GitHub
- URL: https://github.com/rtasalem/utils.js
- Owner: rtasalem
- Created: 2024-06-26T19:41:56.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-08T15:59:10.000Z (11 months ago)
- Last Synced: 2025-07-19T09:20:43.636Z (5 months ago)
- Topics: code-snippets, javascript, utilities
- Language: JavaScript
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# JS Utils
A collection of JavaScript utilities. Note all utils are provided in a mix of CommonJS and ESM as they where when originally captured.
## Contents
### 1. Date
- [convertCosmosTimestamp](./date/convert-cosmos-timestamp.js): for converting the Unix timestamp automatically generated by Azure Cosmos DB (`_ts`) and converting it into a readable UK format e.g. `dd/mm/yyyy, hh:mm:ss`.
- [formatDateUk](./date/format-date-uk.js): formats an existing date string by splitting apart the day, month, and year and rearranging into the UK date format.
- [generateTimestamp](./date/generate-timestamp.js): for generating a timestamp in UK format e.g. `dd/mm/yyyy, hh:mm:ss`.
### 2. File
- [convertToBase64](./file/convert-to-base64.js): Converts a file (as an octet-stream) into a base64 encoded string.