New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@flatfile/hooks

Package Overview
Dependencies
Maintainers
0
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@flatfile/hooks - npm Package Compare versions

Comparing version 1.5.1 to 1.6.0

17

dist/index.d.ts

@@ -89,2 +89,19 @@ type TPrimitive = string | boolean | number | null;

get(field: string): null | TRecordValue;
/**
* Returns an array of the error-level messages for the record
* @param fields - Optional field or array of fields to filter errors by
* @returns Array of error messages with level 'error'
* @example
* ```typescript
* // Get all errors
* const allErrors = record.getErrors();
*
* // Get errors for specific field
* const nameErrors = record.getErrors('name');
*
* // Get errors for multiple fields
* const errors = record.getErrors(['name', 'age']);
* ```
*/
getErrors(fields?: keyof M | (keyof M)[]): IRecordInfo<M>[];
getMetadata(): Object;

@@ -91,0 +108,0 @@ getLinks(field: string): TRecordData<TPrimitive>[] | null;

@@ -168,2 +168,27 @@ "use strict";

}
/**
* Returns an array of the error-level messages for the record
* @param fields - Optional field or array of fields to filter errors by
* @returns Array of error messages with level 'error'
* @example
* ```typescript
* // Get all errors
* const allErrors = record.getErrors();
*
* // Get errors for specific field
* const nameErrors = record.getErrors('name');
*
* // Get errors for multiple fields
* const errors = record.getErrors(['name', 'age']);
* ```
*/
getErrors(fields) {
if (fields) {
const fieldsArray = Array.isArray(fields) ? fields : [fields].filter(Boolean);
return this._info.filter(
(info) => info.level === "error" && fieldsArray.includes(info.field)
);
}
return this._info.filter((info) => info.level === "error");
}
getMetadata() {

@@ -170,0 +195,0 @@ return this.metadata;

2

package.json
{
"name": "@flatfile/hooks",
"version": "1.5.1",
"version": "1.6.0",
"description": "",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

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