UNPKG

@tidyjs/tidy

Version:

Tidy up your data with JavaScript, inspired by dplyr and the tidyverse

13 lines (10 loc) 353 B
import { keysFromItems } from '../helpers/keysFromItems.js'; function endsWith(suffix, ignoreCase = true) { return (items) => { const regex = new RegExp(`${suffix}$`, ignoreCase ? "i" : void 0); const keys = keysFromItems(items); return keys.filter((d) => regex.test(d)); }; } export { endsWith }; //# sourceMappingURL=endsWith.js.map