{"_id":"@antoniovdlc/filter","_rev":"3-0a5e5eed54a148ece8c35ae7a17a2dd3","name":"@antoniovdlc/filter","dist-tags":{"latest":"1.0.2"},"versions":{"0.1.1":{"name":"@antoniovdlc/filter","version":"0.1.1","description":"Custom filter functions for arrays","main":"dist/index.cjs.js","module":"dist/index.esm.js","types":"dist/index.d.ts","scripts":{"prepare":"husky install","type:check":"tsc src/*.ts --noEmit","format":"prettier --write --ignore-unknown {src,test}/*","format:check":"prettier --check {src,test}/*","test":"vitest run --coverage","pre-commit":"lint-staged","prebuild":"rimraf dist && mkdir dist","build":"npm run build:types && npm run build:lib","build:types":"tsc src/*.ts --declaration --emitDeclarationOnly --outDir dist","build:lib":"rollup -c","postversion":"git push && git push --tags"},"keywords":["array","filter"],"author":{"name":"Antonio Villagra De La Cruz"},"repository":{"type":"git","url":"git+https://github.com/AntonioVdlC/filter.git"},"bugs":{"url":"https://github.com/AntonioVdlC/filter/issues"},"homepage":"https://github.com/AntonioVdlC/filter#readme","license":"MIT","devDependencies":{"@rollup/plugin-typescript":"^8.3.0","c8":"^7.11.0","eslint":"^8.9.0","eslint-config-prettier":"^8.4.0","husky":"^7.0.4","lint-staged":"^12.3.4","prettier":"^2.5.1","rimraf":"^3.0.2","rollup":"^2.68.0","rollup-plugin-terser":"^7.0.2","tslib":"^2.3.0","typescript":"^4.5.4","vite":"^2.9.1","vitest":"^0.9.3"},"dependencies":{"get-value-key":"^0.1.2"},"gitHead":"b24eb0042fd5a019419b707bf811a9861d696fb9","_id":"@antoniovdlc/filter@0.1.1","_nodeVersion":"16.14.2","_npmVersion":"8.5.0","dist":{"integrity":"sha512-jDFStx3wmnkxdYOUCcbb65e9UnxH+Jk8ISJp9vNprQhdXRCUXgIXFZ6seo2RNCBs6uMrk0xi2KPIV3Yf4EAkXw==","shasum":"30ac8d3842e7f21059c32ca347fbfc2c6ce64f7c","tarball":"https://registry.npmjs.org/@antoniovdlc/filter/-/filter-0.1.1.tgz","fileCount":6,"unpackedSize":8852,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDM8Ov+3hlSCzV+t84Mt9f4/dEsedHhE2Fd/64/ip0QUAIgC4Uu9x6CPCh+FEp7MbaZsRB67zv70HHtBS88HOQebDk="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiWDh+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrXaA/+LhP0ItWcMz1sbPM+yCrdB7y/M/mvww94p/HXGP9NqRUXMbQ5\r\n10BmZli9pvcUzGxWKQI3nfY7nPDYZl22zGccPocrCzSOqHNGDuKW57s3fIw7\r\n3GwegEOXere3P1qsL6Jz2mzlTZYSmIFAaaqSrKDI1KTQuQa4sPNq92iOvOMN\r\nJYhCTcUB4J5PwWaLWvg4LyAEmAVlfnEil1YCFRiK3kuqUXGPi0mMr+bQRSjI\r\nN1KUKa4KcbuEdcF3/2SDJu8sHcWhizrV0nFD5SZf+2aFHVhKr33f8Fu7U9U2\r\ncDx3qed7Fx/tzSefBXc5iVb7d1DTx/GGoz58sYuGzY4Y8TjlcOoUUuZe/pDd\r\nqtK3H4+T1WM71v+bfUQdcLtieqwhOcD/zkdr9n2jrFRVgdgj3uHFXLS+7apY\r\nBkUZnxm5d9NGksdzunMRfCzQl/6encmH1JqD5wZVmO/185JOj//cXuWXkcy5\r\nfOEWMO68OjOi6ASDX2iMB1oG5oTQ6iSefsgld5CT+EglbKkoaV6IMVhopeI0\r\n+Gn+CXT3XU2WvZoT036N931E9TaJJiOwDOiHcMbsghJv8dHz/ouQCf/BUCeP\r\nYNQ0uWKR+j6iggTDM893zQDIHTNUy/1hFRWAUKsWdtV5cxxi25g0iKCsTYEF\r\n8kjBYF1zsCNIZNMWrVGcQnvoYpu9vNG5No4=\r\n=YYuL\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"antoniovdlc","email":"antonio.villagra.de.la.cruz@gmail.com"},"directories":{},"maintainers":[{"name":"antoniovdlc","email":"antonio.villagra.de.la.cruz@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filter_0.1.1_1649948797947_0.5153145829337789"},"_hasShrinkwrap":false},"0.2.0":{"name":"@antoniovdlc/filter","version":"0.2.0","description":"Custom filter functions for arrays","main":"dist/index.cjs.js","module":"dist/index.esm.js","types":"dist/index.d.ts","scripts":{"prepare":"husky install","type:check":"tsc src/*.ts --noEmit","format":"prettier --write --ignore-unknown {src,test}/*","format:check":"prettier --check {src,test}/*","test":"vitest run --coverage","pre-commit":"lint-staged","prebuild":"rimraf dist && mkdir dist","build":"npm run build:types && npm run build:lib","build:types":"tsc src/*.ts --declaration --emitDeclarationOnly --outDir dist","build:lib":"rollup -c","postversion":"git push && git push --tags"},"keywords":["array","filter","combine"],"author":{"name":"Antonio Villagra De La Cruz"},"repository":{"type":"git","url":"git+https://github.com/AntonioVdlC/filter.git"},"bugs":{"url":"https://github.com/AntonioVdlC/filter/issues"},"homepage":"https://github.com/AntonioVdlC/filter#readme","license":"MIT","devDependencies":{"@rollup/plugin-typescript":"^8.3.0","c8":"^7.11.0","eslint":"^8.9.0","eslint-config-prettier":"^8.4.0","husky":"^7.0.4","lint-staged":"^12.3.4","prettier":"^2.5.1","rimraf":"^3.0.2","rollup":"^2.68.0","rollup-plugin-terser":"^7.0.2","tslib":"^2.3.0","typescript":"^4.5.4","vite":"^2.9.1","vitest":"^0.9.3"},"dependencies":{"get-value-key":"^0.1.2"},"gitHead":"56eea51d60a4d6cf370223540ec707f777134cb7","_id":"@antoniovdlc/filter@0.2.0","_nodeVersion":"16.14.2","_npmVersion":"8.5.0","dist":{"integrity":"sha512-i9fKqHsGTgwPjVQogeDMpuXHT+lotjq5L/3YHvuIbuQCKTAMrMpfhXbuP736K9eTQKRbqRYsFqADqhZy/Y/Xyw==","shasum":"70839bec3c907dea01669076503c1b77166f74cf","tarball":"https://registry.npmjs.org/@antoniovdlc/filter/-/filter-0.2.0.tgz","fileCount":9,"unpackedSize":8851,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDFO5DA21SetjeuUNkwtMGGorbWvUaAtssnUDesDoE6lAiAcqOkTsTaR3JvlyOgAbL15t6f7xp3z57gBnLvAlQCuYw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiWdicACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmov2RAAnOqUOgXXfz9/MTIYv+7IV8C+r7cg+o5PXWGL7FZRGFZ2hySe\r\n9qMr3q+TT7dA4vcU666oTOlJEqQ7HlhN/geDLV7PfE8hbXmmUZTSr9hcvBBB\r\nrYQZ5WZJPiO8++C9kHZEnMwyWDOvkARptzJ33n/Adlxl7vpZtXOWI4y8NQal\r\nFQvlLFRI8QStodvlwQMfJ8EIEmjSRxGmD7h4oV1raeBUs7cfk67JlH/sQ1nW\r\njlFuDwLaof8MVn/QnNWxFjXBrPFFsQutaa0ldihpPJ5UUTFDeKmqwn5sdaTB\r\n/X3L2DpKCmiVo3MX8NzYyNopZNppiKCESEzMwSCU9Iviec+mAsftBAlQ/uC5\r\nzfSB+KYyT5LbBJEZngiP1vB8VMLFyk2REYje+4aR06XK47fm9ElTwu9Bwuub\r\nho1WcGwIc9cGpHh1KcphO2ueeuCKwx9iYJ8tHtiO5gOik0OumM4+7ZxiwJr8\r\np39loKINOvnpBmSN81Bcr8ad03YskzAN8hxuk6SdQs/5PEszxSOet3ltCe8/\r\nSu6WQHTXELYsp1QWj6imHi16OIFy3D33+cz/W5Fx2SYt2ayPEefdJKLY7ZGm\r\nVUFeSqhSN/IYJnX0oaV2enS72RJ3eKV6WmnQpiiRvduA/LSOGuavWZFXa6BJ\r\nev8G7eoUOhKpYvZ9CvNJ9dHb5XEd8rjhYD0=\r\n=P1Ip\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"antoniovdlc","email":"antonio.villagra.de.la.cruz@gmail.com"},"directories":{},"maintainers":[{"name":"antoniovdlc","email":"antonio.villagra.de.la.cruz@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filter_0.2.0_1650055324403_0.2133082036072913"},"_hasShrinkwrap":false},"1.0.1":{"name":"@antoniovdlc/filter","version":"1.0.1","description":"Custom filter functions for arrays","main":"dist/index.cjs.js","module":"dist/index.esm.js","types":"dist/index.d.ts","scripts":{"prepare":"husky install","type:check":"tsc src/*.ts --noEmit --esModuleInterop","format":"prettier --write --ignore-unknown {src,test}/*","format:check":"prettier --check {src,test}/*","test":"vitest run --coverage","pre-commit":"lint-staged","prebuild":"rimraf dist && mkdir dist","build":"npm run build:types && npm run build:lib","build:types":"tsc src/*.ts --declaration --emitDeclarationOnly --esModuleInterop --outDir dist","build:lib":"rollup -c","postversion":"git push && git push --tags"},"keywords":["array","filter","combine"],"author":{"name":"Antonio Villagra De La Cruz"},"repository":{"type":"git","url":"git+https://github.com/AntonioVdlC/filter.git"},"bugs":{"url":"https://github.com/AntonioVdlC/filter/issues"},"homepage":"https://github.com/AntonioVdlC/filter#readme","license":"MIT","devDependencies":{"@rollup/plugin-typescript":"^8.3.0","c8":"^7.11.0","eslint":"^8.9.0","eslint-config-prettier":"^8.4.0","husky":"^7.0.4","lint-staged":"^12.3.4","prettier":"^2.5.1","rimraf":"^3.0.2","rollup":"^2.68.0","rollup-plugin-terser":"^7.0.2","tslib":"^2.3.0","typescript":"^4.5.4","vite":"^2.9.1","vitest":"^0.9.3"},"dependencies":{"@types/lodash.isequal":"^4.5.5","get-value-key":"^0.1.2","lodash.isequal":"^4.5.0"},"gitHead":"223836577448175eaf4b2f040843981781f26647","_id":"@antoniovdlc/filter@1.0.1","_nodeVersion":"16.14.2","_npmVersion":"8.5.0","dist":{"integrity":"sha512-l/wgEn9F8f8NDl8+ZHemCp3W0R5NlEZBXomrzXMBUlsiCMSzabyza+5a8TUqM6iAyTiWYs1ewIusexq8jV7LaQ==","shasum":"cd72789596aa4ae08893ec5520cdec85d6fc28bd","tarball":"https://registry.npmjs.org/@antoniovdlc/filter/-/filter-1.0.1.tgz","fileCount":9,"unpackedSize":14340,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGJXEw5gatZTEXARzP14Ymri1eB8+XZtMZv9fgqOuo9EAiEA9lulzFkMYrUm89RHaHiUtSvZJ93xnJ0k8yDzn7f+oC4="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiWe2MACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoJyQ/+OFxXzk/IbLrFkk3SvzHjg4HDLAKszaWl6AT7Tim//3G0R0Fy\r\nRqcj5CinOa8JVeMY24jr/KYduh++ev6mADujbaT6QIWsJjylRjuTxdu9I3jB\r\nODWje0iYSQUgzX4uXk8RLqYXfZSfByxnBaU9DZJLqUeoBZu33SCFUFfZqoIY\r\nqqgqck5TtXrdtHhIAdjKowCdMxr9hNkAn+HZgvCvvwZZUuvUMFND7zQU2VV1\r\nUGa3Q44dJRHuQ7Cz9UbqdeUZD1v+YjDuEiRjiYVjuOvgxuBDeCoYrxIUfsvO\r\nqYjN+ufw+6ZvdUtoevm8yf3rWgYpuFsuMN542OSMSDg7Xtce1vLmRo6+e66n\r\njyOq1d/C3f/dgBDfEX4exrOzjviDUqdEsOxLNSLWwAXWNNNUbtaUMpK7gfhq\r\nqDBPxVrylHXxQ32w4R/omFQAzmLhIUGNmcNdKXI3QICnBKjm6XRkkMc0izgo\r\nruPvheZYqZJBQJqNfHay02v5Rwu34BbA2UqzpQBtoImYm9Mglb0OS72KmVfE\r\n3TSr97OBzV1OweTZvghq0Jc1JmxAMLWsyv0CXOeyOodfqYnJwzwuVs7qU+MZ\r\n8E70Hy44vrOBLPTyGWLlz+WY7+SakY6vkk22rj069MCWgPxVngeTX5oy9swM\r\nojQS99/cpH5sIyvD4d+WKd0ExBNXlFOhYnQ=\r\n=rmKp\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"antoniovdlc","email":"antonio.villagra.de.la.cruz@gmail.com"},"directories":{},"maintainers":[{"name":"antoniovdlc","email":"antonio.villagra.de.la.cruz@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filter_1.0.1_1650060683852_0.6223700958608227"},"_hasShrinkwrap":false},"1.0.2":{"name":"@antoniovdlc/filter","version":"1.0.2","description":"Custom filter functions for arrays","main":"dist/index.cjs.js","module":"dist/index.esm.js","types":"dist/index.d.ts","scripts":{"prepare":"husky install","type:check":"tsc src/*.ts --noEmit --esModuleInterop","format":"prettier --write --ignore-unknown {src,test}/*","format:check":"prettier --check {src,test}/*","test":"vitest run --coverage","pre-commit":"lint-staged","prebuild":"rimraf dist && mkdir dist","build":"npm run build:types && npm run build:lib","build:types":"tsc src/*.ts --declaration --emitDeclarationOnly --esModuleInterop --outDir dist","build:lib":"rollup -c","postversion":"git push && git push --tags"},"keywords":["array","filter","combine"],"author":{"name":"Antonio Villagra De La Cruz"},"repository":{"type":"git","url":"git+https://github.com/AntonioVdlC/filter.git"},"bugs":{"url":"https://github.com/AntonioVdlC/filter/issues"},"homepage":"https://github.com/AntonioVdlC/filter#readme","license":"MIT","devDependencies":{"@rollup/plugin-typescript":"^8.3.0","c8":"^7.11.0","eslint":"^8.9.0","eslint-config-prettier":"^8.4.0","husky":"^7.0.4","lint-staged":"^13.1.0","prettier":"^2.5.1","rimraf":"^3.0.2","rollup":"^2.68.0","rollup-plugin-terser":"^7.0.2","tslib":"^2.3.0","typescript":"^4.5.4","vite":"^2.9.1","vitest":"^0.9.3"},"dependencies":{"@types/lodash.isequal":"^4.5.5","get-value-key":"^0.1.3","lodash.isequal":"^4.5.0"},"gitHead":"4d58105cf45b092d7aff9ed2067879d2d581d9c6","_id":"@antoniovdlc/filter@1.0.2","_nodeVersion":"16.20.2","_npmVersion":"8.19.4","dist":{"integrity":"sha512-FNfDprs0+2sE1VijVa2dpkv4kLa+6oJuN+FZYw8FxGN3FMVHxIIdw962qP7B5DGSYqFnKGBuxkpJw/4zIQbSfA==","shasum":"f28ecf7a8d5f42c5190ce660ffcf7ee9878045ca","tarball":"https://registry.npmjs.org/@antoniovdlc/filter/-/filter-1.0.2.tgz","fileCount":9,"unpackedSize":14783,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDAMxyXg1yLgalHgxF9p8T3r3ea38mo9CEWaF4D4bwyaQIhANmjhacmzXGxzOHkRq0ARUdO8I3XbnbcP1wIjuZXQ3xn"}]},"_npmUser":{"name":"antoniovdlc","email":"antonio.villagra.de.la.cruz@gmail.com"},"directories":{},"maintainers":[{"name":"antoniovdlc","email":"antonio.villagra.de.la.cruz@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filter_1.0.2_1700414564137_0.17128535436758874"},"_hasShrinkwrap":false}},"time":{"created":"2022-04-14T15:06:37.850Z","0.1.1":"2022-04-14T15:06:38.180Z","modified":"2023-11-19T17:22:44.482Z","0.2.0":"2022-04-15T20:42:04.542Z","1.0.1":"2022-04-15T22:11:24.030Z","1.0.2":"2023-11-19T17:22:44.308Z"},"maintainers":[{"name":"antoniovdlc","email":"antonio.villagra.de.la.cruz@gmail.com"}],"description":"Custom filter functions for arrays","homepage":"https://github.com/AntonioVdlC/filter#readme","keywords":["array","filter","combine"],"repository":{"type":"git","url":"git+https://github.com/AntonioVdlC/filter.git"},"author":{"name":"Antonio Villagra De La Cruz"},"bugs":{"url":"https://github.com/AntonioVdlC/filter/issues"},"license":"MIT","readme":"# filter\n\n[![version](https://img.shields.io/npm/v/@antoniovdlc/filter.svg)](http://npm.im/@antoniovdlc/filter)\n[![issues](https://img.shields.io/github/issues-raw/antoniovdlc/filter.svg)](https://github.com/AntonioVdlC/filter/issues)\n[![downloads](https://img.shields.io/npm/dt/@antoniovdlc/filter.svg)](http://npm.im/@antoniovdlc/filter)\n[![license](https://img.shields.io/npm/l/@antoniovdlc/filter.svg)](http://opensource.org/licenses/MIT)\n\nCustom filter functions for arrays.\n\n## Installation\n\nThis package is distributed via npm:\n\n```\nnpm install @antoniovdlc/filter\n```\n\n## Motivation\n\nFiltering arrays is a common operation in JavaScript, so this library provides some common custom compare functions to have a more declarative way of filtering arrays.\n\n## Usage\n\nYou can use this library either as an ES module or a CommonJS package:\n\n```js\nimport { hasValue, equal, match, lesserThan } from \"@antoniovdlc/filter\";\n```\n\n_- or -_\n\n```js\nconst { hasValue, equal, match, lesserThan } = require(\"@antoniovdlc/filter\");\n```\n\n## Examples\n\nAll filter functions can be used out of the box for filtering as follows:\n\n```js\nimport { lesserThan } from \"@antoniovdlc/filter\";\n\nconst arr = [1, 2, 2, 23, 30, 4];\narr.filter(lesserThan(5)); // [1, 2, 2, 4]\n```\n\nYou can revert every filtering functions by appending `.not`:\n\n```js\nimport { lesserThan } from \"@antoniovdlc/filter\";\n\nconst arr = [1, 2, 2, 23, 30, 4];\narr.filter(lesserThan(5).not); // [23, 30]\n```\n\nFinally, all filter functions provide a `.on(\"key\")` function which allows to sort arrays of objects by nested fields:\n\n```js\nconst arr = [\n  { name: \"Bob\", age: 23 },\n  { name: \"Alice\", age: 32 },\n  { name: \"Tom\", age: 60 },\n  { name: \"Candice\", age: 45 },\n];\narr.filter(greaterThanOrEqual(40).on(\"age\"));\n/*\n[\n  { name: \"Tom\", age: 60 },\n  { name: \"Candice\", age: 45 },\n]\n*/\n```\n\nThe same `.not` function can be used for filtering arrays of objects:\n\n```js\nconst arr = [\n  { name: \"Bob\", age: 23 },\n  { name: \"Alice\", age: 32 },\n  { name: \"Tom\", age: 60 },\n  { name: \"Candice\", age: 45 },\n];\narr.filter(greaterThanOrEqual(40).on(\"age\").not);\n/*\n[\n  { name: \"Bob\", age: 23 },\n  { name: \"Alice\", age: 32 },\n]\n*/\n```\n\n## Filter functions\n\nHere is a list of provided compare functions:\n\n### notNull\n\nRemoves `null` values from an array.\n\n### hasValue\n\nRemoves falsy values from an array (except 0).\n\n### equal(value)\n\nKeeps all values that are strictly equal to `value`.\nUses [lodash.isequal](https://www.npmjs.com/package/lodash.isequal)\n\n### lesserThan(value) / lesserThanOrEqual(value) / greaterThan(value) / greaterThanOrEqual(value)\n\nFilters on numerical or date values applying the appropriate comparaison function.\n\n### match(pattern)\n\nKeeps all values that match the provided `pattern`.\n\n## Creating custom filtering functions\n\nYou can create your own filtering functions by using the `createFilterFunction()` function:\n\n```js\nimport { createFilterFunction } from \"@antoniovdlc/filter\";\n\nconst contains = createFilterFunction(\n  (item, value) => Array.isArray(item) && item.includes(value)\n);\n\nconst arr = [\n  { name: \"Bob\", age: 23, values: [1, 2, 5] },\n  { name: \"Alice\", age: 32, values: [4, 3] },\n  { name: \"Tom\", age: 60, values: [8] },\n  { name: \"Candice\", age: 45, values: [1, 2, 4, 8] },\n];\narr.filter(contains(8).on(\"values\"));\n/*\n[\n  { name: \"Tom\", age: 60, values: [8] },\n  { name: \"Candice\", age: 45, values: [1, 2, 4, 8] },\n]\n*/\n```\n\n```js\nimport { createFilterFunction } from \"@antoniovdlc/filter\";\n\nconst isBob = createFilterFunction((item, value) => item === value)(\"Bob\");\n\nconst arr = [\"Bob\", \"Alice\", \"Tom\", \"Candice\"];\narr.filter(isBob); // [\"Bob\"]\narr.filter(isBob.not); // [\"Alice\", \"Tom\", \"Candice\"]\n```\n\nOut of the box, your custom filtering functions have the same attributes and methods as the default filtering functions (such as `.not` or `.on()`)!\n\n## Combining filtering functions\n\nYou can also combine multiple filtering functions.\n\nLet's say that for example, you need to filter an array of users first by name matching a pattern, and then by age lower than 40 and higher than 30, or age equal to 45. You can achieve that as follows:\n\n```js\nimport { combine } from \"@antoniovdlc/filter\";\n\nconst arr = [\n  { name: \"Bob\", age: 23 },\n  { name: \"Alice\", age: 32 },\n  { name: \"Tom\", age: 60 },\n  { name: \"Candice\", age: 45 },\n  { name: \"Alice\", age: 28 },\n];\narr.filter(\n  combine({\n    operator: \"and\",\n    filters: [\n      match(/ice$/).on(\"name\"),\n      {\n        operator: \"or\",\n        filters: [\n          {\n            operator: \"and\",\n            filters: [lesserThan(40).on(\"age\"), greaterThan(30).on(\"age\")],\n          },\n          equal(45).on(\"age\"),\n        ],\n      },\n    ],\n  })\n);\n/*\n[\n  { name: \"Alice\", age: 32 },\n  { name: \"Candice\", age: 45 },\n]\n*/\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}