An open API service indexing awesome lists of open source software.

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.

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.