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

appwrite-utils

Package Overview
Dependencies
Maintainers
1
Versions
135
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

appwrite-utils - npm Package Compare versions

Comparing version 0.3.3 to 0.3.4

5

dist/functions/converters.d.ts

@@ -39,2 +39,7 @@ export interface ConverterFunctions {

/**
* Converts any null, empty, or undefined value to an empty array
* Meant to be used if the value needs to be an array but you can't guarantee it is one
*/
onlyUnsetToArray(value: any): any[];
/**
* A function that converts any type of value to an array of numbers.

@@ -41,0 +46,0 @@ *

@@ -80,2 +80,11 @@ import { DateTime } from "luxon";

/**
* Converts any null, empty, or undefined value to an empty array
* Meant to be used if the value needs to be an array but you can't guarantee it is one
*/
onlyUnsetToArray(value) {
if (value === null || value === undefined || value === "")
return [];
return value;
},
/**
* A function that converts any type of value to an array of numbers.

@@ -82,0 +91,0 @@ *

2

package.json
{
"name": "appwrite-utils",
"module": "dist/index.js",
"version": "0.3.3",
"version": "0.3.4",
"main": "dist/index.js",

@@ -6,0 +6,0 @@ "types": "dist/index.d.ts",

@@ -75,2 +75,3 @@ # appwrite-utils

- 0.3.4: Added `onlyUnsetToArray` converter, which is meant to be used last so if you need to guarantee something is an array instead of null or undefined, you would use that
- 0.2.8: Added `valueToSet` to attributeMappings, allowing you to set the thing you want to set literally in importDefs

@@ -77,0 +78,0 @@ - 0.2.7: Removed need for `lodash`

@@ -82,2 +82,11 @@ import { DateTime } from "luxon";

/**
* Converts any null, empty, or undefined value to an empty array
* Meant to be used if the value needs to be an array but you can't guarantee it is one
*/
onlyUnsetToArray(value: any): any[] {
if (value === null || value === undefined || value === "") return [];
return value;
},
/**
* A function that converts any type of value to an array of numbers.

@@ -84,0 +93,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