🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →

arrify

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

arrify - npm Package Compare versions

Comparing version

to
2.0.1

@@ -26,8 +26,14 @@ /**

*/
declare function arrify(value: null | undefined): [];
declare function arrify(value: string): [string];
declare function arrify<ValueType>(value: ValueType[]): ValueType[];
declare function arrify<ValueType>(value: Iterable<ValueType>): ValueType[];
declare function arrify<ValueType>(value: ValueType): [ValueType];
declare function arrify<ValueType>(
value: ValueType
): ValueType extends (null | undefined)
? []
: ValueType extends string
? [string]
: ValueType extends ReadonlyArray<unknown> // TODO: Use 'readonly unknown[]' in the next major version
? ValueType
: ValueType extends Iterable<infer T>
? T[]
: [ValueType];
export = arrify;
{
"name": "arrify",
"version": "2.0.0",
"version": "2.0.1",
"description": "Convert a value to an array",

@@ -5,0 +5,0 @@ "license": "MIT",