New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

hex-to-rgba

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hex-to-rgba - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

build/index.js
'use strict';
var removeHash = function removeHash(hex) {
return hex.startsWith('#') ? hex.slice(1) : hex;
return hex.charAt(0) === '#' ? hex.slice(1) : hex;
};

@@ -6,0 +6,0 @@

{
"name": "hex-to-rgba",
"version": "1.0.0",
"version": "1.0.1",
"description": "Converts hexadecimal color codes to rgb()/rgba() values.",

@@ -5,0 +5,0 @@ "main": "build/index.js",

@@ -55,8 +55,13 @@ [![Build Status](https://travis-ci.org/misund/hex-to-rgba.svg?branch=master)](https://travis-ci.org/misund/hex-to-rgba)

## Changelog
**1.0.1**
- Use charAt() instead of startsWith() for the sake of IE11 (props [@eltonjuan](https://github.com/misund/hex-to-rgba/pull/9))
**1.0.0**
- BREAKING CHANGE: Always return rgba(); even if the color is completely opaque
- Support 4-digit hexes
- Add typescript type declaration (props @gillchristian)
- Add typescript type declaration (props [@gillchristian](https://github.com/misund/hex-to-rgba/pull/5))
**0.2.0**
- Support 8-digit hexes
**0.1.0**

@@ -63,0 +68,0 @@ - Initial release

@@ -1,2 +0,2 @@

const removeHash = hex => (hex.startsWith('#') ? hex.slice(1) : hex);
const removeHash = hex => (hex.charAt(0) === '#' ? hex.slice(1) : hex);

@@ -3,0 +3,0 @@ const parseHex = (nakedHex) => {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc