Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

linear-gradient-parser

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

linear-gradient-parser - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

src/utils/calmpAngle/index.js

2

package.json
{
"name": "linear-gradient-parser",
"version": "1.1.1",
"version": "1.1.2",
"description": "Parses a SVG linear gradient string / parsed JSON into css background image property",

@@ -5,0 +5,0 @@ "author": "Oded Goldglas <odedglas@gmail.com>",

@@ -30,3 +30,3 @@ # linear-gradient-parser

console.log(stringResult)
//outputs : {angle: 360, background: "linear-gradient(360deg, rgb(252, 179, 164) 0%, rgb(218, 88, 153) 100%)"}
//outputs : {background: "linear-gradient(0deg, rgb(252, 179, 164) 0%, rgb(218, 88, 153) 100%)", angle: 0}

@@ -48,3 +48,3 @@ // JSON input

console.log(jsonResult)
//outputs : {angle: 360, background: "linear-gradient(360deg, rgb(252, 179, 164) 0%, rgb(218, 88, 153) 100%)"}
//outputs : {background: "linear-gradient(0deg, rgb(252, 179, 164) 0%, rgb(218, 88, 153) 100%)", angle: 0}
```

@@ -51,0 +51,0 @@

@@ -0,1 +1,3 @@

import clampAngle from '../calmpAngle';
/**

@@ -35,5 +37,5 @@ * Formats a given position attribute

const angleRad = Math.atan2(y, x);
return (angleRad * 180 / Math.PI) + 90;
return clampAngle((angleRad * 180 / Math.PI) + 90);
};
export default getGradientAngle;
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