Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
appwrite-utils
Advanced tools
`appwrite-utils` is a comprehensive TypeScript library designed to streamline the development process for Appwrite projects. It provides a suite of utilities and helper functions that facilitate data manipulation, schema management, and seamless integrati
appwrite-utils
is a comprehensive TypeScript library designed to streamline the development process for Appwrite projects. It provides a suite of utilities and helper functions that facilitate data manipulation, schema management, and seamless integration with Appwrite services. Whether you're managing data migrations, schema updates, or simply need a set of robust tools for your Appwrite project, appwrite-utils
has you covered. This package is meant to be imported into your project for access to validation functions, converter functions, and more, enhancing your project's capabilities with Appwrite.
To integrate appwrite-utils
into your project, ensure you have npm installed and run the following command in your project directory:
npm install appwrite-utils
These functions help ensure the integrity and correctness of the data in your Appwrite projects:
isNumber, isString, isBoolean, isArray, isObject, isNull, isUndefined, isDefined, isDate,
isEmpty, isInteger, isFloat, isArrayLike, isArrayLikeObject, isFunction, isLength, isMap,
isSet, isRegExp, isSymbol, isObjectLike, isPlainObject, isSafeInteger, isTypedArray,
isEqual, isMatch, has, get
Converters are designed to transform data formats or types to suit specific needs within your applications:
anyToString, anyToNumber, anyToBoolean, anyToAnyArray, anyToStringArray,
trySplitByDifferentSeparators, removeStartEndQuotes, splitByComma, splitByPipe,
splitBySemicolon, splitByColon, splitBySlash, splitByBackslash, splitBySpace,
splitByDot, splitByUnderscore, splitByHyphen, pickFirstElement, pickLastElement,
stringifyObject, parseObject, safeParseDate, removeInvalidElements, joinValues,
joinBySpace, joinByComma, joinByPipe, joinBySemicolon, joinByColon, joinBySlash,
joinByHyphen, convertPhoneStringToUSInternational, validateOrNullEmail
These functions facilitate the management and operation of files within your Appwrite projects:
getFileViewUrl, getFileDownloadUrl
Both getFileViewUrl
and getFileDownloadUrl
take parameters like endpoint
, projectId
, bucketId
, fileId
, and optionally jwt
to generate accessible URLs for files stored in Appwrite.
After installing the package, you can directly import and use the various utilities in your TypeScript or JavaScript code. For example:
import { isNumber, anyToString } from 'appwrite-utils';
// Use the functions directly in your code
console.log(isNumber(5)); // Output: true
console.log(anyToString(1234)); // Output: "1234"
This setup ensures that your interactions with Appwrite are more robust, less error-prone, and significantly more manageable.
ulid
to replace with ulidx
for compatibilityappwrite
versionflattenArray
which flattens an array, so if you accidentally convert things into "someValue": [ ['1' ], '2', ]
you can now make that just ['1', '2',]
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 thatvalueToSet
to attributeMappings, allowing you to set the thing you want to set literally in importDefslodash
tryAwaitWithRetry
which will retry the given (used for Appwrite calls mostly) function up to 5 times if the error includes fetch failed
or server error
(all lowercased) because there's a weird bug sometimes with the server SDKtargetFieldToMatch
to the idMappings
configuration which should allow more concise mapping of after-import fields@asteasolutions/zod-to-openapi
) with the AuthUserSchemaID.unique()
to ulid()
for random ID generation, refactored schema.ts
into multiple filesFAQs
`appwrite-utils` is a comprehensive TypeScript library designed to streamline the development process for Appwrite projects. It provides a suite of utilities and helper functions that facilitate data manipulation, schema management, and seamless integrati
The npm package appwrite-utils receives a total of 95 weekly downloads. As such, appwrite-utils popularity was classified as not popular.
We found that appwrite-utils demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.