UNPKG

eslint-plugin-perfectionist

Version:

ESLint plugin for sorting various data such as objects, imports, types, enums, JSX props, etc.

11 lines (10 loc) 283 B
/** * Checks if a node is sortable (i.e., an array with more than one element). * * @param node - The node to check. * @returns True if the node is sortable, false otherwise. */ function isSortable(node) { return Array.isArray(node) && node.length > 1 } export { isSortable }