repo
replacements.fyi

// package

arrify

type: "module"

// preferences

// replacements (1)

snippet::array-coerce

Simple or drop-in replacement

This package is no longer necessary. You can use a combination of a ternary operator and `Array.isArray` to make sure a value, `undefined`, `null` or an array is always returned as an array.

// example

arr == null
	? []
	: Array.isArray(arr)
		? arr
		: [arr];