hex-to-rgba
Advanced tools
Comparing version 1.0.0 to 1.0.1
'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 @@ [](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) => { |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
49288
70
0
10