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.0.0-alpha.1 to 1.0.0-alpha.2

12

lib/index.d.ts

@@ -53,2 +53,12 @@ /**

export { MakeOptional, PromiseOr, ReadonlyOr, RecursivePartial, RecursiveRequired, Replace, RequireOnly, ResolvePromise, isEnumValue, isInArray, isOfType };
/**
* Allow a single value or an array of values.
*/
declare type OneOrMore<T> = T | T[];
/**
* Convert input to an array, if it's not already an array.
*/
declare const toArray: <T>(itemOrItems: OneOrMore<T>, separator?: string) => T[];
export { MakeOptional, PromiseOr, ReadonlyOr, RecursivePartial, RecursiveRequired, Replace, RequireOnly, ResolvePromise, isEnumValue, isInArray, isOfType, toArray };

@@ -15,6 +15,15 @@ // src/type-guards/isOfType.ts

}
// src/utils/toArray.ts
var toArray = (itemOrItems, separator) => {
if (separator && typeof itemOrItems === "string") {
return itemOrItems.split(separator);
}
return Array.isArray(itemOrItems) ? itemOrItems : [itemOrItems];
};
export {
isEnumValue,
isInArray,
isOfType
isOfType,
toArray
};

2

package.json
{
"name": "@myparcel/ts-utils",
"version": "1.0.0-alpha.1",
"version": "1.0.0-alpha.2",
"description": "TypeScript utilities",

@@ -5,0 +5,0 @@ "keywords": [

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