shorten-css-hex
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/shorten-css-hex package

1.1.0 • Public • Published

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.0
    2,396
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.1.0
    2,396
  • 1.0.0
    1
  • 0.2.0
    0
  • 0.1.0
    0

Package Sidebar

Install

npm i shorten-css-hex

Weekly Downloads

2,397

Version

1.1.0

License

MIT

Last publish

Collaborators

  • dustinspecker