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

@rss/common

Package Overview
Dependencies
Maintainers
1
Versions
895
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rss/common - npm Package Compare versions

Comparing version 0.1.22 to 0.1.23

dist/constant/relationship/edge-role.constant.js

4

dist/helper/relationship.helper.js

@@ -5,3 +5,3 @@ "use strict";

return relationships.filter(function (r) {
return r._id === id;
return r.nodeId === id;
}).map(function (r) {

@@ -14,4 +14,4 @@ return r.role;

return relationships.some(function (r) {
return r._id === id;
return r.nodeId === id;
});
};

@@ -13,2 +13,4 @@ "use strict";

var EDGE_ROLE = require('../../constant/relationship/edge-role.constant');
var Edge =

@@ -62,3 +64,3 @@ /*#__PURE__*/

role: {
enum: ['OWNER', 'MEMBER', 'LOCATION']
enum: Object.keys(EDGE_ROLE)
}

@@ -65,0 +67,0 @@ },

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

var ObjectId = require('bson').ObjectID;
var PersonReference = require('../core/person-reference');

@@ -25,0 +23,0 @@

@@ -58,2 +58,3 @@ // constant - assessment

exports.NODE_TYPE = require('./dist/constant/relationship/node-type.constant');
exports.EDGE_ROLE = require('./dist/constant/relationship/edge-role.constant');

@@ -144,2 +145,3 @@ // constant - reminder

exports.createCardFactory = require('./dist/helper/card-factory').createCardFactory;
exports.AssessmentHelper = require('./dist/helper/assessment.helper');
exports.Helper = require('./dist/helper/helper');

@@ -146,0 +148,0 @@ exports.PermissionHelper = require('./dist/helper/permission.helper');

{
"name": "@rss/common",
"version": "0.1.22",
"version": "0.1.23",
"description": "common constant, classes, & helper",

@@ -5,0 +5,0 @@ "author": "Risk & Safety Solution",

module.exports.hasRelationshipWithRole = (id, relationships, role) => {
return relationships
.filter((r) => r._id === id)
.filter((r) => r.nodeId === id)
.map((r) => r.role)

@@ -8,4 +8,2 @@ .includes(role);

module.exports.hasRelationship = (relationships, id) => {
return relationships.some((r) => r._id === id);
};
module.exports.hasRelationship = (relationships, id) => relationships.some((r) => r.nodeId === id);
const ObjectId = require('bson').ObjectID;
const tv4 = require('tv4');
const EDGE_ROLE = require('../../constant/relationship/edge-role.constant');
class Edge {

@@ -37,3 +39,3 @@ constructor(opt) {

source: { type: 'string' },
role: { enum: ['OWNER', 'MEMBER', 'LOCATION'] },
role: { enum: Object.keys(EDGE_ROLE) },
},

@@ -40,0 +42,0 @@ required: Object.keys(new Edge()),

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

const ObjectId = require('bson').ObjectID;
const PersonReference = require('../core/person-reference');

@@ -3,0 +2,0 @@ const clone = require('clone');

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