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

@8base/utils

Package Overview
Dependencies
Maintainers
2
Versions
235
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@8base/utils - npm Package Compare versions

Comparing version 0.4.15 to 0.4.16

2

es/verifiers/isRelationReference.js

@@ -5,5 +5,5 @@ import { isRelationField } from './isRelationField';

var isRelationReference = function isRelationReference(fieldSchema, data) {
return isRelationField(fieldSchema) && (typeof data === 'string' || Array.isArray(data) && (data.length === 0 || typeof data[0] === 'string') || Array.isArray(data) && (data.length === 0 || typeof data[0].id === 'string'));
return isRelationField(fieldSchema) && (typeof data === 'string' || data && typeof data.id === 'string' || Array.isArray(data) && (data.length === 0 || isRelationReference(fieldSchema, data[0])));
};
export { isRelationReference };
{
"name": "@8base/utils",
"version": "0.4.15",
"version": "0.4.16",
"main": "es/index.js",

@@ -5,0 +5,0 @@ "module": "es/index.js",

@@ -11,7 +11,3 @@ //@flow

||
(
Array.isArray(data)
&&
(data.length === 0 || typeof data[0] === 'string')
)
data && typeof data.id === 'string'
||

@@ -21,3 +17,3 @@ (

&&
(data.length === 0 || typeof data[0].id === 'string')
(data.length === 0 || isRelationReference(fieldSchema, data[0]))
)

@@ -24,0 +20,0 @@ )

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