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.8 to 0.2.9

3

es/verifiers/isRelationInstance.js
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
import * as R from 'ramda';
import { isRelationField } from './isRelationField';

@@ -7,5 +8,5 @@

var isRelationInstance = function isRelationInstance(fieldSchema, data) {
return isRelationField(fieldSchema) && (typeof data === 'undefined' ? 'undefined' : _typeof(data)) === 'object';
return isRelationField(fieldSchema) && !R.isNil(data) && (typeof data === 'undefined' ? 'undefined' : _typeof(data)) === 'object';
};
export { isRelationInstance };

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

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

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

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

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

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

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

&&
!R.isNil(data)
&&
typeof data === 'object'

@@ -10,0 +13,0 @@ );

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

@@ -10,4 +9,2 @@ import type { FieldSchema } from '../types';

(
R.isNil(data)
||
typeof data === 'string'

@@ -14,0 +11,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