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.4 to 0.4.5

es/formatters/formatDataAfterQuery.js

6

es/formatters/formatConnectionForMutation.js

@@ -8,4 +8,6 @@ import { MUTATION_TYPE } from '../constants';

if (Array.isArray(formatedData)) {
formatedData = formatedData.map(function (id) {
return { id: id };
formatedData = formatedData.map(function (item) {
return {
id: typeof item === 'string' ? item : item.id || item
};
});

@@ -12,0 +14,0 @@ } else {

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

export { formatDataForMutation } from './formatDataForMutation';
export { formatDataForMutation } from './formatDataForMutation';
export { formatDataAfterQuery } from './formatDataAfterQuery';

@@ -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'));
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'));
};
export { isRelationReference };
{
"name": "@8base/utils",
"version": "0.4.4",
"version": "0.4.5",
"main": "es/index.js",

@@ -35,3 +35,3 @@ "module": "es/index.js",

},
"gitHead": "07f81e66445dc55d1d305c362ddd32db085085b0"
"gitHead": "84ec2d36a57614c25d3deb20ae613a26fd19fbed"
}

@@ -9,3 +9,5 @@ //@flow

if (Array.isArray(formatedData)) {
formatedData = formatedData.map((id) => ({ id }));
formatedData = formatedData.map((item) => ({
id: typeof item === 'string' ? item : (item.id || item),
}));
} else {

@@ -12,0 +14,0 @@ formatedData = {

export { formatDataForMutation } from './formatDataForMutation';
export { formatDataAfterQuery } from './formatDataAfterQuery';

@@ -16,2 +16,8 @@ //@flow

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

@@ -18,0 +24,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