minify-hex-code
Convert 6-character hex codes to 3-characters
Installation
npm install minify-hex-codeyarn add minify-hex-code
Usage
In a node project
Import the script to your project
;// orconst minifyHexCode = ;
And execute the script:
const shortHexCode = ; // #000const shortHexCode = ; // #000const shortHexCode = ; // throws error
Contributing
Fork the repo and clone locally, then run:
yarn install
This will install the devDependencies
packages and build the lib
folder.
Once you've made your desired changes, make sure to write any new tests for your feature and run the tests:
yarn run lint # lints js yarn test # runs test suite
If all tests pass, create a pull request.