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.2.7 to 0.2.8

3

es/verifiers/isRelationReference.js

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

import * as R from 'ramda';
import { isRelationField } from './isRelationField';

@@ -5,5 +6,5 @@

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

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

//@flow
import * as R from 'ramda';
import { isRelationField } from './isRelationField';

@@ -8,5 +9,15 @@ import type { FieldSchema } from '../types';

&&
(typeof data === 'string' || data.length === 0 || typeof data[0] === 'string')
(
R.isNil(data)
||
typeof data === 'string'
||
(
Array.isArray(data)
&&
(data.length === 0 || typeof data[0] === 'string')
)
)
);
export { isRelationReference };
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