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

@nuskin/ns-common-lib

Package Overview
Dependencies
Maintainers
5
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nuskin/ns-common-lib - npm Package Compare versions

Comparing version 1.4.1 to 1.4.2

12

CHANGELOG.md

@@ -0,1 +1,13 @@

## [1.4.2](https://code.tls.nuskin.io/ns-am/utility/npm/ns-common-lib/compare/v1.4.1...v1.4.2) (2022-03-08)
### Chore
* updated testing for fromJsonString ([abfaf07](https://code.tls.nuskin.io/ns-am/utility/npm/ns-common-lib/commit/abfaf070c11c97dafedc50b43667045b919bfada))
### Fix
* (urls) handle incomplete/missing protocols for getFullUrl (#CX12-4845) ([5fd378d](https://code.tls.nuskin.io/ns-am/utility/npm/ns-common-lib/commit/5fd378de0b82c7f85ded978d9469be01713c473d)), closes [#CX12-4845](https://code.tls.nuskin.io/ns-am/utility/npm/ns-common-lib/issues/CX12-4845)
* fixed logic causing failure in sonarqube failure (#CX12-4845) ([a3a4478](https://code.tls.nuskin.io/ns-am/utility/npm/ns-common-lib/commit/a3a447866bfa3d4dc6ca0ec0a46b024b81510ffe)), closes [#CX12-4845](https://code.tls.nuskin.io/ns-am/utility/npm/ns-common-lib/issues/CX12-4845)
## [1.4.1](https://code.tls.nuskin.io/ns-am/utility/npm/ns-common-lib/compare/v1.4.0...v1.4.1) (2021-05-18)

@@ -2,0 +14,0 @@

2

package.json
{
"name": "@nuskin/ns-common-lib",
"version": "1.4.1",
"version": "1.4.2",
"description": "This project contains shared common models and code between the backend and frontend.",

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

@@ -11,6 +11,18 @@ "use strict";

if (url) {
if(siteUrl && siteUrl.endsWith("/")) {
siteUrl = siteUrl || "";
if(siteUrl.endsWith("/")) {
siteUrl = siteUrl.slice(0, -1);
}
return url.startsWith("/") ? `${siteUrl || ""}${url}` : url;
// likely a content path or relative url
if (url.startsWith("/")) {
return `${siteUrl}${url}`;
}
// fully-qualified url
else if (url.match(/^.{3,5}:\/\//)) {
return url;
}
// incomplete url, needs protocol
return `https://${url}`;
}

@@ -17,0 +29,0 @@ return "";

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