1.0.5 • Published 6 years ago

minify-hex-code v1.0.5

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

minify-hex-code

Build Status Coverage Status devDependencies Status Code Climate NPM version npm

Convert 6-character hex codes to 3-characters

Installation

npm install minify-hex-code
yarn add minify-hex-code

Usage

In a node project

Import the script to your project

import minifyHexCode from 'minify-hex-code';
// or
const minifyHexCode = require('minify-hex-code');

And execute the script:

const shortHexCode = minifyHexCode('#000000'); // #000
const shortHexCode = minifyHexCode('#eeeeee'); // #000
const shortHexCode = minifyHexCode();          // 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.

1.0.5

6 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago