npm.io
1.1.0 • Published 10 years ago

shorten-css-hex

Licence
MIT
Version
1.1.0
Deps
1
Vulns
0
Weekly
0
Stars
3

shorten-css-hex

NPM version Build Status Coverage Status

Code Climate Dependencies DevDependencies

Shorten CSS hex codes

Install

npm install --save shorten-css-hex

Usage

ES2015
import shortenCssHex from 'shorten-css-hex';

shortenCssHex('#000000');
// => '#000'

shortenCssHex('#AaBBcC');
// => '#abc'

shortencsshex('#112233ff');
// => '#123f'

shortencsshex('#123456');
// => '#123456'

shortencsshex('#123456ff');
// => '#123456ff'
ES5
var shortenCssHex = require('shorten-css-hex');

shortenCssHex('#000000');
// => '#000'

shortenCssHex('#AaBBcC');
// => '#abc'

shortencsshex('#112233ff');
// => '#123f'

shortencsshex('#123456');
// => '#123456'

shortencsshex('#123456ff');
// => '#123456ff'

LICENSE

MIT Dustin Specker

Keywords