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

@myparcel/ts-utils

Package Overview
Dependencies
Maintainers
3
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@myparcel/ts-utils - npm Package Compare versions

Comparing version 1.5.0 to 1.5.1

12

lib/index.d.ts

@@ -75,5 +75,15 @@ /**

/**
* Returns true if given value is undefined.
*/
declare const isUndefined: (value: unknown) => value is undefined;
declare const partitionArray: <I>(array: I[] | null | undefined, predicate: (item: I) => boolean) => I[][];
/**
* Removes keys and values from an object if predicate(value) returns true
*/
declare const removePropertiesWith: <T extends Record<string, unknown>>(object: T, predicate: (value: unknown) => boolean | Promise<boolean>) => Omit<T, keyof T>;
/**
* Convert input to an array, if it's not already an array.

@@ -83,2 +93,2 @@ */

export { ArrayWithOneOrMore, MakeOptional, OneOrMore, PromiseOr, ReadonlyOr, RecursivePartial, RecursiveRequired, Replace, RequireOnly, ResolvePromise, asyncEvery, asyncSome, isEnumValue, isInArray, isOfType, partitionArray, toArray };
export { ArrayWithOneOrMore, MakeOptional, OneOrMore, PromiseOr, ReadonlyOr, RecursivePartial, RecursiveRequired, Replace, RequireOnly, ResolvePromise, asyncEvery, asyncSome, isEnumValue, isInArray, isOfType, isUndefined, partitionArray, removePropertiesWith, toArray };

@@ -34,2 +34,5 @@ // src/type-guards/isEnumValue.ts

// src/utils/isUndefined.ts
var isUndefined = (value) => value === void 0;
// src/utils/partitionArray.ts

@@ -46,2 +49,12 @@ var partitionArray = (array, predicate) => {

// src/utils/removePropertiesWith.ts
var removePropertiesWith = (object, predicate) => {
return Object.entries(object).reduce((acc, [key, value]) => {
if (!predicate(value)) {
acc[key] = value;
}
return acc;
}, {});
};
// src/utils/toArray.ts

@@ -63,4 +76,6 @@ var toArray = (itemOrItems, separator) => {

isOfType,
isUndefined,
partitionArray,
removePropertiesWith,
toArray
};

3

package.json
{
"name": "@myparcel/ts-utils",
"version": "1.5.0",
"version": "1.5.1",
"description": "TypeScript utilities",

@@ -28,2 +28,3 @@ "keywords": [

"*.{js,ts}": "eslint --fix",
"*.{json,md,yml}": "prettier --write",
"package.json": "sort-package-json"

@@ -30,0 +31,0 @@ },

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