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

@composer-js/core

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@composer-js/core - npm Package Compare versions

Comparing version 1.2.3 to 1.3.0

19

dist/lib/UserUtils.js

@@ -19,2 +19,21 @@ "use strict";

/**
* Returns the unique identifier of the specified type associated with the given user.
*
* @parm user The user to retrieve the external id from.
* @param type The type of external provider to retrieve.
* @returns The unique id of the external provider for the given type if found, otherwise `undefined`.
*/
static getExternalId(user, type) {
let result = undefined;
if (user && Array.isArray(user.externalIds)) {
for (const externalId of user.externalIds) {
const parts = externalId.split(":");
if (parts.length === 2 && parts[0] === type) {
result = parts[1];
}
}
}
return result;
}
/**
* Returns `true` if the given user object has a role with the specified name, otherwise returns `false`.

@@ -21,0 +40,0 @@ *

@@ -14,2 +14,10 @@ /**

/**
* Returns the unique identifier of the specified type associated with the given user.
*
* @parm user The user to retrieve the external id from.
* @param type The type of external provider to retrieve.
* @returns The unique id of the external provider for the given type if found, otherwise `undefined`.
*/
static getExternalId(user: any, type: string): string | undefined;
/**
* Returns `true` if the given user object has a role with the specified name, otherwise returns `false`.

@@ -16,0 +24,0 @@ *

2

package.json
{
"name": "@composer-js/core",
"version": "1.2.3",
"version": "1.3.0",
"description": "A collection of common utilities and core functionality for composerjs applications.",

@@ -5,0 +5,0 @@ "author": "AcceleratXR, Inc. <info@acceleratxr.com>",

Sorry, the diff of this file is not supported yet

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