expand-hex-code
v1.2.3
Published
Expand hex codes from three to six digits
Downloads
21
Readme
expand-hex-code
Expand hex codes from three to six digits
Installation
With npm
npm install expand-hex-codeWith yarn
yarn add expand-hex-codeUsage
In a node project
Import the script to your project
import expandHexCode from "expand-hex-code";
// or
const expandHexCode = require("expand-hex-code");And execute the script:
const hexCode = expandHexCode("#000"); // #000000
const hexCode = expandHexCode("#cb0"); // #ccbb00
const hexCode = expandHexCode("#ffffff"); // #ffffffContributing
Fork the repo and clone locally, then run:
yarn installThis will install the devDependencies packages and build the dist folder.
Once you've made your desired changes, make sure to write any new tests for your feature and run the tests:
yarn testIf all tests pass, create a pull request.
