README
Date Convert
| CI / CD | Status |
|---|---|
| NPM | |
| Semaphore CI | |
| Circle CI | |
| Coverall | |
| SonarCloud |
date-convert converts a 8-digit, ISO format YYYYMMDD, string "19820405" to "05/04/1982" (where 05 is day and 04 is April).
Use "/" as separator.
Installation
npm install @sineverba/date-convert
Usage
// Import module
var {fromIsoToHuman, fromHumanToIso} = require('@sineverba/date-convert');
var humanDate = fromIsoToHuman("20200102");
console.log(humanDate); // returns 02/01/2020
var isoDate = fromHumanToIso("02/01/2020")
console.log(isoDate); // returns 20200102
Tests
npm run test for simple test
npm run cover for coverage
SonarQube (local Docker)
- Spin images
docker-compose up -d - Create a new project inside Sonarqube and grab the token
- Replace the token in the ENV var of
docker-compose.ymlfile - Stop with
docker-compose stopand restart withdocker-compose up -d - Next spin with
make sonar
Multiple npm accounts in system
- Copy
npmrc.txtto.npmrc - Add token inside
Use SSH Git key per-project
$ git config --local core.sshCommand "ssh -i ~/.ssh/id_rsa"