Socket
Book a DemoInstallSign in
Socket

shorten-css-hex

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shorten-css-hex

Shorten CSS hex codes

1.1.0
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

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

css

FAQs

Package last updated on 12 Jan 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.