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

@8base/utils

Package Overview
Dependencies
Maintainers
5
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 1.4.5 to 1.5.0

6

dist/formatters/formatDataForMutation.js

@@ -94,2 +94,8 @@ "use strict";

}
if (typeof formatedFieldData === 'string' && formatedFieldData === initialFieldData) {
return result;
}
if (Array.isArray(formatedFieldData) && R.equals(formatedFieldData, initialFieldData)) {
return result;
}
return Object.assign({}, result, { [fieldName]: formatedFieldData });

@@ -96,0 +102,0 @@ }, {}, dataKeys);

1

dist/formatters/formatFieldDataList.js

@@ -45,3 +45,4 @@ "use strict";

initialData: item.initialData,
initialListData: initialData,
}, options)), R.filter((item) => Boolean(item)), R.groupBy(R.prop('type')), R.mapObjIndexed(R.map(R.prop('data'))))(data);
//# sourceMappingURL=formatFieldDataList.js.map

3

dist/formatters/formatFieldDataListItem.d.ts

@@ -6,4 +6,5 @@ import { FieldSchema, Schema, FormatDataForMutationOptions } from '../types';

initialData?: any;
initialListData?: any;
}
export declare const formatFieldDataListItem: (type: "CREATE" | "UPDATE", data: any, { fieldSchema, schema, initialData }: IFormatFieldDataListItemMeta, options?: FormatDataForMutationOptions | undefined) => {
export declare const formatFieldDataListItem: (type: "CREATE" | "UPDATE", data: any, { fieldSchema, schema, initialData, initialListData }: IFormatFieldDataListItemMeta, options?: FormatDataForMutationOptions | undefined) => {
type: string;

@@ -10,0 +11,0 @@ data: unknown;

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

const errors_1 = require("../errors");
exports.formatFieldDataListItem = (type, data, { fieldSchema, schema, initialData }, options) => {
exports.formatFieldDataListItem = (type, data, { fieldSchema, schema, initialData, initialListData }, options) => {
let nextData = data;

@@ -35,2 +35,5 @@ if (R.isNil(nextData)) {

if (typeof nextData === 'string') {
if (Array.isArray(initialListData) && initialListData.includes(nextData)) {
return null;
}
return {

@@ -37,0 +40,0 @@ data: { id: nextData },

{
"name": "@8base/utils",
"version": "1.4.5",
"version": "1.5.0",
"repository": "https://github.com/8base/sdk",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/8base/sdk/tree/master/packages/utils#readme",

@@ -137,2 +137,10 @@ import * as R from 'ramda';

if (typeof formatedFieldData === 'string' && formatedFieldData === initialFieldData) {
return result;
}
if (Array.isArray(formatedFieldData) && R.equals(formatedFieldData, initialFieldData)) {
return result;
}
return {

@@ -139,0 +147,0 @@ ...result,

@@ -66,2 +66,3 @@ import * as R from 'ramda';

initialData: item.initialData,
initialListData: initialData,
},

@@ -68,0 +69,0 @@ options,

@@ -14,2 +14,3 @@ import * as R from 'ramda';

initialData?: any;
initialListData?: any;
}

@@ -20,3 +21,3 @@

data: any,
{ fieldSchema, schema, initialData }: IFormatFieldDataListItemMeta,
{ fieldSchema, schema, initialData, initialListData }: IFormatFieldDataListItemMeta,
options?: FormatDataForMutationOptions,

@@ -45,2 +46,6 @@ ) => {

if (typeof nextData === 'string') {
if (Array.isArray(initialListData) && initialListData.includes(nextData)) {
return null;
}
return {

@@ -47,0 +52,0 @@ data: { id: nextData },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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