Format an hex color code into its standard format (#abc -> #aabbcc), promisified
$ npm install --save p-format-hex
Or if you prefer yarn:
$ yarn add p-format-hex
const format_hex = require('p-format-hex');
format_hex('#abc')
.then(hex => console.log(hex)) // '#aabbcc'
.catch(err => console.error(err));
$ npm test
- 1.0.0
- Initial Release