UNPKG

@shopify/theme-language-server-common

Version:

<h1 align="center" style="position: relative;" > <br> <img src="https://github.com/Shopify/theme-check-vscode/blob/main/images/shopify_glyph.png?raw=true" alt="logo" width="141" height="160"> <br> Theme Language Server </h1>

7 lines (6 loc) 255 B
// Array.prototype.findLast is only available in es2023. Which feels too new? export function findLast<T>(array: T[], pred: (n: T) => boolean): T | undefined { for (let i = array.length - 1; i >= 0; i--) { if (pred(array[i])) return array[i]; } }