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

@basis-theory/basis-theory-reactor-formulas-sdk-js

Package Overview
Dependencies
Maintainers
11
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@basis-theory/basis-theory-reactor-formulas-sdk-js - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

LICENSE

4

package.json
{
"name": "@basis-theory/basis-theory-reactor-formulas-sdk-js",
"version": "1.3.0",
"version": "1.3.1",
"description": "Javascript SDK for building Basis Theory reactor formulas",

@@ -47,4 +47,4 @@ "repository": "https://github.com/Basis-Theory/basistheory-reactor-formulas-sdk-js",

"publishConfig": {
"access": "restricted"
"access": "public"
}
}
# basistheory-reactor-formulas-sdk-js
[![Version](https://img.shields.io/npm/v/@basis-theory/basis-theory-reactor-formulas-sdk-js.svg)](https://www.npmjs.org/package/@basis-theory/basis-theory-reactor-formulas-sdk-js)
[![Verify](https://github.com/Basis-Theory/basistheory-reactor-formulas-sdk-js/actions/workflows/release.yml/badge.svg)](https://github.com/Basis-Theory/basistheory-reactor-formulas-sdk-js/actions/workflows/release.yml)
Javascript SDK for building Basis Theory reactor formulas
## Usage
## Installation
Install the package:
Using [Node Package Manager](https://docs.npmjs.com/)
```shell
yarn add @basis-theory/basis-theory-reactor-formulas-sdk-js
```sh
npm install --save-dev @basis-theory/basis-theory-reactor-formulas-sdk-js
```
Using [Yarn](https://classic.yarnpkg.com/en/docs/)
```sh
yarn add --dev @basis-theory/basis-theory-reactor-formulas-sdk-js
```
## Development

@@ -14,0 +23,0 @@

const sanitizeErrors = (errors) => {
const sanitizedErrors = {};
const fallbackErrorMessage =
'Something went wrong. Please try again. If the problem persists, please contact support@basistheory.com.';
if (Array.isArray(errors)) {

@@ -10,8 +13,12 @@ sanitizedErrors['error'] = errors;

sanitizedErrors[property] = errors[property].map((e) =>
e === 'object' ? JSON.stringify(e) : e.toString()
typeof e === 'object'
? JSON.stringify(e)
: e?.toString() ?? fallbackErrorMessage
);
} else if (typeof errors[property] === 'object') {
sanitizedErrors[property] = [JSON.stringify(errors[property])];
} else if (errors[property]) {
sanitizedErrors[property] = [errors[property].toString()];
} else {
sanitizedErrors[property] = [errors[property].toString()];
sanitizedErrors[property] = [fallbackErrorMessage];
}

@@ -23,2 +30,4 @@ }

sanitizedErrors['error'] = [errors.toString()];
} else {
sanitizedErrors['error'] = [fallbackErrorMessage];
}

@@ -25,0 +34,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