{"_id":"nth-check","_rev":"4320842","name":"nth-check","description":"Parses and compiles CSS nth-checks to highly optimized functions.","dist-tags":{"latest":"3.0.1"},"maintainers":[{"name":"fb55","email":""}],"time":{"modified":"2026-04-07T22:31:32.000Z","created":"2014-02-15T15:06:22.622Z","3.0.1":"2026-03-17T23:12:57.654Z","3.0.0":"2026-03-17T16:30:12.728Z","2.1.1":"2022-05-23T10:05:21.450Z","2.1.0":"2022-05-22T22:38:15.274Z","2.0.1":"2021-09-16T12:00:02.342Z","2.0.0":"2020-12-01T22:41:36.046Z","1.0.2":"2018-10-21T22:12:06.854Z","1.0.1":"2015-03-12T12:59:56.470Z","1.0.0":"2014-02-15T15:06:22.622Z"},"users":{"mojaray2k":true},"author":{"name":"Felix Boehm","email":"me@feedic.com"},"repository":{"type":"git","url":"git+https://github.com/fb55/nth-check.git"},"versions":{"3.0.1":{"type":"module","name":"nth-check","version":"3.0.1","description":"Parses and compiles CSS nth-checks to highly optimized functions.","author":{"name":"Felix Boehm","email":"me@feedic.com"},"license":"BSD-2-Clause","sideEffects":false,"funding":{"type":"github","url":"https://github.com/fb55/nth-check?sponsor=1"},"main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"build":"tsc","format":"npm run format:es && npm run format:biome","format:biome":"biome check --write .","format:es":"npm run lint:es -- --fix","lint":"npm run lint:es && npm run lint:biome","lint:biome":"biome check .","lint:es":"eslint .","prepare":"npm run build","test":"npm run test:vi && npm run lint","test:vi":"vitest run"},"repository":{"type":"git","url":"git+https://github.com/fb55/nth-check.git"},"keywords":["nth-child","nth","css"],"bugs":{"url":"https://github.com/fb55/nth-check/issues"},"homepage":"https://github.com/fb55/nth-check","engines":{"node":">=20.19.0"},"dependencies":{"boolbase":"^2.0.0"},"devDependencies":{"@biomejs/biome":"^2.4.7","@eslint/compat":"^2.0.3","@feedic/eslint-config":"^0.3.1","@types/node":"^25.5.0","eslint":"^10.0.3","eslint-config-biome":"^2.1.3","typescript":"^5.9.3","typescript-eslint":"^8.57.1","vitest":"^4.0.18"},"gitHead":"395790bb177734bf6e019bdf096272979fa8e905","_id":"nth-check@3.0.1","_nodeVersion":"24.14.0","_npmVersion":"11.9.0","dist":{"shasum":"a5ede96060f7f0b74d7d3d8425f2a8f0610c5776","size":7259,"noattachment":false,"key":"/nth-check/-/nth-check-3.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/nth-check/download/nth-check-3.0.1.tgz"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:515ef52f-df69-447f-9098-39cc7878f0cf"}},"directories":{},"maintainers":[{"name":"fb55","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/nth-check_3.0.1_1773789177515_0.8703180515838107"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-03-17T23:12:57.654Z","publish_time":1773789177654,"_source_registry_name":"default","_cnpm_publish_time":1773789177654},"3.0.0":{"type":"module","name":"nth-check","version":"3.0.0","description":"Parses and compiles CSS nth-checks to highly optimized functions.","author":{"name":"Felix Boehm","email":"me@feedic.com"},"license":"BSD-2-Clause","sideEffects":false,"funding":{"type":"github","url":"https://github.com/fb55/nth-check?sponsor=1"},"main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"build":"tsc","format":"npm run format:es && npm run format:biome","format:biome":"biome check --write .","format:es":"npm run lint:es -- --fix","lint":"npm run lint:es && npm run lint:biome","lint:biome":"biome check .","lint:es":"eslint .","prepare":"npm run build","test":"npm run test:vi && npm run lint","test:vi":"vitest run"},"repository":{"type":"git","url":"git+https://github.com/fb55/nth-check.git"},"keywords":["nth-child","nth","css"],"bugs":{"url":"https://github.com/fb55/nth-check/issues"},"homepage":"https://github.com/fb55/nth-check","engines":{"node":">=20.19.0"},"dependencies":{"boolbase":"^2.0.0"},"devDependencies":{"@biomejs/biome":"^2.4.7","@eslint/compat":"^2.0.3","@feedic/eslint-config":"^0.2.3","@types/node":"^25.5.0","eslint":"^10.0.3","eslint-config-biome":"^2.1.3","typescript":"^5.9.3","typescript-eslint":"^8.57.1","vitest":"^4.0.18"},"gitHead":"64557a7df1e04150594459866e8293ef0a330f00","_id":"nth-check@3.0.0","_nodeVersion":"24.14.0","_npmVersion":"11.9.0","dist":{"shasum":"180338e1ee5be19acfdd9124d0ea04153b145586","size":6111,"noattachment":false,"key":"/nth-check/-/nth-check-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/nth-check/download/nth-check-3.0.0.tgz"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:515ef52f-df69-447f-9098-39cc7878f0cf"}},"directories":{},"maintainers":[{"name":"fb55","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/nth-check_3.0.0_1773765012562_0.35626008879027804"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-03-17T16:30:12.728Z","publish_time":1773765012728,"_source_registry_name":"default","_cnpm_publish_time":1773765012728},"2.1.1":{"name":"nth-check","version":"2.1.1","description":"Parses and compiles CSS nth-checks to highly optimized functions.","author":{"name":"Felix Boehm","email":"me@feedic.com"},"license":"BSD-2-Clause","sideEffects":false,"funding":{"url":"https://github.com/fb55/nth-check?sponsor=1"},"directories":{"lib":"lib/"},"main":"lib/index.js","types":"lib/index.d.ts","module":"lib/esm/index.js","exports":{"require":"./lib/index.js","import":"./lib/esm/index.js"},"scripts":{"test":"npm run test:jest && npm run lint","test:jest":"jest","lint":"npm run lint:es && npm run lint:prettier","lint:es":"eslint .","lint:prettier":"npm run prettier -- --check","format":"npm run format:es && npm run format:prettier","format:es":"npm run lint:es -- --fix","format:prettier":"npm run prettier -- --write","prettier":"prettier '**/*.{ts,md,json,yml}'","build":"npm run build:cjs && npm run build:esm","build:cjs":"tsc --sourceRoot https://raw.githubusercontent.com/fb55/nth-check/$(git rev-parse HEAD)/src/","build:esm":"npm run build:cjs -- --module esnext --target es2019 --outDir lib/esm && echo '{\"type\":\"module\"}' > lib/esm/package.json","prepare":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/fb55/nth-check.git"},"keywords":["nth-child","nth","css"],"bugs":{"url":"https://github.com/fb55/nth-check/issues"},"homepage":"https://github.com/fb55/nth-check","dependencies":{"boolbase":"^1.0.0"},"devDependencies":{"@types/boolbase":"^1.0.1","@types/jest":"^27.5.0","@types/node":"^17.0.35","@typescript-eslint/eslint-plugin":"^5.25.0","@typescript-eslint/parser":"^5.25.0","eslint":"^8.15.0","eslint-config-prettier":"^8.5.0","jest":"^27.5.1","prettier":"^2.6.2","ts-jest":"^27.1.4","typescript":"^4.6.4"},"jest":{"preset":"ts-jest","testEnvironment":"node","moduleNameMapper":{"^(.*)\\.js$":"$1"}},"prettier":{"tabWidth":4},"gitHead":"639fd2a4000b69f82350aad8c34cb43f77e483ba","_id":"nth-check@2.1.1","_nodeVersion":"18.2.0","_npmVersion":"8.9.0","dist":{"shasum":"c9eab428effce36cd6b92c924bdb000ef1f1ed1d","size":8576,"noattachment":false,"key":"/nth-check/-/nth-check-2.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/nth-check/download/nth-check-2.1.1.tgz"},"_npmUser":{"name":"feedic","email":"me@feedic.com"},"maintainers":[{"name":"fb55","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nth-check_2.1.1_1653300320889_0.9414942401014395"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-05-23T11:48:08.495Z","publish_time":1653300321450,"_cnpm_publish_time":1653300321450},"2.1.0":{"name":"nth-check","version":"2.1.0","description":"Parses and compiles CSS nth-checks to highly optimized functions.","author":{"name":"Felix Boehm","email":"me@feedic.com"},"license":"BSD-2-Clause","sideEffects":false,"funding":{"url":"https://github.com/fb55/nth-check?sponsor=1"},"directories":{"lib":"lib/"},"main":"lib/index.js","types":"lib/index.d.ts","module":"lib/esm/index.js","exports":{"require":"./lib/index.js","import":"./lib/esm/index.js"},"scripts":{"test":"npm run test:jest && npm run lint","test:jest":"jest","lint":"npm run lint:es && npm run lint:prettier","lint:es":"eslint .","lint:prettier":"npm run prettier -- --check","format":"npm run format:es && npm run format:prettier","format:es":"npm run lint:es -- --fix","format:prettier":"npm run prettier -- --write","prettier":"prettier '**/*.{ts,md,json,yml}'","build":"npm run build:cjs && npm run build:esm","build:cjs":"tsc --sourceRoot https://raw.githubusercontent.com/fb55/nth-check/$(git rev-parse HEAD)/src/","build:esm":"npm run build:cjs -- --module esnext --target es2019 --outDir lib/esm && echo '{\"type\":\"module\"}' > lib/esm/package.json","prepare":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/fb55/nth-check.git"},"keywords":["nth-child","nth","css"],"bugs":{"url":"https://github.com/fb55/nth-check/issues"},"homepage":"https://github.com/fb55/nth-check","dependencies":{"boolbase":"^1.0.0"},"devDependencies":{"@types/boolbase":"^1.0.1","@types/jest":"^27.5.0","@types/node":"^17.0.35","@typescript-eslint/eslint-plugin":"^5.25.0","@typescript-eslint/parser":"^5.25.0","eslint":"^8.15.0","eslint-config-prettier":"^8.5.0","jest":"^27.5.1","prettier":"^2.6.2","ts-jest":"^27.1.4","typescript":"^4.6.4"},"jest":{"preset":"ts-jest","testEnvironment":"node"},"prettier":{"tabWidth":4},"gitHead":"432ebc605de10e2f26d7cc2a1fc3fcb048eea6e6","_id":"nth-check@2.1.0","_nodeVersion":"18.2.0","_npmVersion":"8.9.0","dist":{"shasum":"0cd91c5c08967b58b409fa76282e13851a33fa47","size":8469,"noattachment":false,"key":"/nth-check/-/nth-check-2.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/nth-check/download/nth-check-2.1.0.tgz"},"_npmUser":{"name":"feedic","email":"me@feedic.com"},"maintainers":[{"name":"fb55","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nth-check_2.1.0_1653259095092_0.04771503905358787"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-05-22T22:38:17.619Z","publish_time":1653259095274,"_cnpm_publish_time":1653259095274},"2.0.1":{"name":"nth-check","version":"2.0.1","description":"Parses and compiles CSS nth-checks to highly optimized functions.","author":{"name":"Felix Boehm","email":"me@feedic.com"},"license":"BSD-2-Clause","sideEffects":false,"funding":{"url":"https://github.com/fb55/nth-check?sponsor=1"},"directories":{"lib":"lib/"},"main":"lib/index.js","types":"lib/index.d.ts","scripts":{"test":"npm run test:jest && npm run lint","test:jest":"jest","lint":"npm run lint:es && npm run lint:prettier","lint:es":"eslint .","lint:prettier":"npm run prettier -- --check","format":"npm run format:es && npm run format:prettier","format:es":"npm run lint:es -- --fix","format:prettier":"npm run prettier -- --write","prettier":"prettier '**/*.{ts,md,json,yml}'","build":"tsc","prepare":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/fb55/nth-check.git"},"keywords":["nth-child","nth","css"],"bugs":{"url":"https://github.com/fb55/nth-check/issues"},"homepage":"https://github.com/fb55/nth-check","dependencies":{"boolbase":"^1.0.0"},"devDependencies":{"@types/jest":"^27.0.1","@types/node":"^16.9.1","@typescript-eslint/eslint-plugin":"^4.31.1","@typescript-eslint/parser":"^4.31.1","eslint":"^7.32.0","eslint-config-prettier":"^8.3.0","jest":"^27.2.0","prettier":"^2.4.1","ts-jest":"^27.0.5","typescript":"^4.4.3"},"jest":{"preset":"ts-jest","testEnvironment":"node"},"prettier":{"tabWidth":4},"gitHead":"65e40b02b0437daf5d41760352433435ad2370a0","_id":"nth-check@2.0.1","_nodeVersion":"16.9.0","_npmVersion":"7.21.1","dist":{"shasum":"2efe162f5c3da06a28959fbd3db75dbeea9f0fc2","size":4670,"noattachment":false,"key":"/nth-check/-/nth-check-2.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/nth-check/download/nth-check-2.0.1.tgz"},"_npmUser":{"name":"feedic","email":"me@feedic.com"},"maintainers":[{"name":"fb55","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nth-check_2.0.1_1631793602091_0.035415616653284854"},"_hasShrinkwrap":false,"publish_time":1631793602342,"_cnpm_publish_time":1631793602342},"2.0.0":{"name":"nth-check","version":"2.0.0","description":"Parses and compiles CSS nth-checks to highly optimized functions.","author":{"name":"Felix Boehm","email":"me@feedic.com"},"license":"BSD-2-Clause","sideEffects":false,"funding":{"url":"https://github.com/fb55/nth-check?sponsor=1"},"directories":{"lib":"lib/"},"main":"lib/index.js","types":"lib/index.d.ts","scripts":{"test":"jest --coverage && npm run lint","coverage":"cat coverage/lcov.info | coveralls","lint":"npm run lint:es && npm run lint:prettier","lint:es":"eslint .","lint:prettier":"npm run prettier -- --check","format":"npm run format:es && npm run format:prettier","format:es":"npm run lint:es -- --fix","format:prettier":"npm run prettier -- --write","prettier":"prettier '**/*.{ts,md,json,yml}'","build":"tsc","prepare":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/fb55/nth-check.git"},"keywords":["nth-child","nth","css"],"bugs":{"url":"https://github.com/fb55/nth-check/issues"},"homepage":"https://github.com/fb55/nth-check","dependencies":{"boolbase":"^1.0.0"},"devDependencies":{"@types/jest":"^26.0.0","@types/node":"^14.0.5","@typescript-eslint/eslint-plugin":"^4.1.0","@typescript-eslint/parser":"^4.1.0","eslint":"^7.0.0","eslint-config-prettier":"^6.0.0","jest":"^26.0.1","prettier":"^2.1.1","ts-jest":"^26.0.0","typescript":"^4.0.2"},"jest":{"preset":"ts-jest","testEnvironment":"node"},"prettier":{"tabWidth":4},"gitHead":"3ba66fc22d68017baa3a6b97dd2475ab246d5a6f","_id":"nth-check@2.0.0","_nodeVersion":"15.3.0","_npmVersion":"7.0.14","dist":{"shasum":"1bb4f6dac70072fc313e8c9cd1417b5074c0a125","size":4441,"noattachment":false,"key":"/nth-check/-/nth-check-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/nth-check/download/nth-check-2.0.0.tgz"},"_npmUser":{"name":"feedic","email":"me@feedic.com"},"maintainers":[{"name":"fb55","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nth-check_2.0.0_1606862495923_0.2794616396314096"},"_hasShrinkwrap":false,"publish_time":1606862496046,"_cnpm_publish_time":1606862496046},"1.0.2":{"name":"nth-check","version":"1.0.2","description":"performant nth-check parser & compiler","main":"index.js","scripts":{"test":"node test"},"repository":{"type":"git","url":"git+https://github.com/fb55/nth-check.git"},"keywords":["nth-child","nth","css"],"author":{"name":"Felix Boehm","email":"me@feedic.com"},"license":"BSD-2-Clause","bugs":{"url":"https://github.com/fb55/nth-check/issues"},"homepage":"https://github.com/fb55/nth-check","dependencies":{"boolbase":"~1.0.0"},"gitHead":"03a02587bbd126fafc3d2331ffef6ea5cb2f9b66","_id":"nth-check@1.0.2","_npmVersion":"6.4.1","_nodeVersion":"10.11.0","_npmUser":{"name":"feedic","email":"me@feedic.com"},"dist":{"shasum":"b2bd295c37e3dd58a3bf0700376663ba4d9cf05c","size":2752,"noattachment":false,"key":"/nth-check/-/nth-check-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/nth-check/download/nth-check-1.0.2.tgz"},"maintainers":[{"name":"fb55","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nth-check_1.0.2_1540159926746_0.4517908661077017"},"_hasShrinkwrap":false,"publish_time":1540159926854,"_cnpm_publish_time":1540159926854},"1.0.1":{"name":"nth-check","version":"1.0.1","description":"performant nth-check parser & compiler","main":"index.js","scripts":{"test":"node test"},"repository":{"type":"git","url":"https://github.com/fb55/nth-check"},"keywords":["nth-child","nth","css"],"author":{"name":"Felix Boehm","email":"me@feedic.com"},"license":"BSD","bugs":{"url":"https://github.com/fb55/nth-check/issues"},"homepage":"https://github.com/fb55/nth-check","dependencies":{"boolbase":"~1.0.0"},"gitHead":"257338e5bbd53228236abd4cc09539b66b27dd11","_id":"nth-check@1.0.1","_shasum":"9929acdf628fc2c41098deab82ac580cf149aae4","_from":".","_npmVersion":"2.6.1","_nodeVersion":"1.5.1","_npmUser":{"name":"feedic","email":"me@feedic.com"},"maintainers":[{"name":"fb55","email":""}],"dist":{"shasum":"9929acdf628fc2c41098deab82ac580cf149aae4","size":2861,"noattachment":false,"key":"/nth-check/-/nth-check-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/nth-check/download/nth-check-1.0.1.tgz"},"directories":{},"publish_time":1426165196470,"_cnpm_publish_time":1426165196470,"_hasShrinkwrap":false},"1.0.0":{"name":"nth-check","version":"1.0.0","description":"performant nth-check parser & compiler","main":"index.js","scripts":{"test":"node test"},"repository":{"type":"git","url":"https://github.com/fb55/nth-check"},"keywords":["nth-child","nth","css"],"author":{"name":"Felix Boehm","email":"me@feedic.com"},"license":"BSD","bugs":{"url":"https://github.com/fb55/nth-check/issues"},"homepage":"https://github.com/fb55/nth-check","dependencies":{"boolbase":"~1.0.0"},"_id":"nth-check@1.0.0","dist":{"shasum":"02fc1277aa2bf8e6083be456104d6a646101a49d","size":2771,"noattachment":false,"key":"/nth-check/-/nth-check-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/nth-check/download/nth-check-1.0.0.tgz"},"_from":".","_npmVersion":"1.4.2","_npmUser":{"name":"feedic","email":"me@feedic.com"},"maintainers":[{"name":"fb55","email":""}],"directories":{},"publish_time":1392476782622,"_cnpm_publish_time":1392476782622,"_hasShrinkwrap":false}},"readme":"# nth-check [![Build Status](https://travis-ci.org/fb55/nth-check.svg)](https://travis-ci.org/fb55/nth-check)\n\nParses and compiles CSS nth-checks to highly optimized functions.\n\n### About\n\nThis module can be used to parse & compile nth-checks, as they are found in CSS 3's `nth-child()` and `nth-last-of-type()`. It can be used to check if a given index matches a given nth-rule, or to generate a sequence of indices matching a given nth-rule.\n\n`nth-check` focusses on speed, providing optimized functions for different kinds of nth-child formulas, while still following the [spec](http://www.w3.org/TR/css3-selectors/#nth-child-pseudo).\n\n### API\n\n```js\nimport nthCheck, { parse, compile } from \"nth-check\";\n```\n\n##### `nthCheck(formula)`\n\nParses and compiles a formula to a highly optimized function. Combination of `parse` and `compile`.\n\nIf the formula doesn't match any elements, it returns [`boolbase`](https://github.com/fb55/boolbase)'s `falseFunc`. Otherwise, a function accepting an _index_ is returned, which returns whether or not the passed _index_ matches the formula.\n\n**Note**: The nth-rule starts counting at `1`, the returned function at `0`.\n\n**Example:**\n\n```js\nconst check = nthCheck(\"2n+3\");\n\ncheck(0); // `false`\ncheck(1); // `false`\ncheck(2); // `true`\ncheck(3); // `false`\ncheck(4); // `true`\ncheck(5); // `false`\ncheck(6); // `true`\n```\n\n##### `parse(formula)`\n\nParses the expression, throws an `Error` if it fails. Otherwise, returns an array containing the integer step size and the integer offset of the nth rule.\n\n**Example:**\n\n```js\nparse(\"2n+3\"); // [2, 3]\n```\n\n##### `compile([a, b])`\n\nTakes an array with two elements (as returned by `.parse`) and returns a highly optimized function.\n\n**Example:**\n\n```js\nconst check = compile([2, 3]);\n\ncheck(0); // `false`\ncheck(1); // `false`\ncheck(2); // `true`\ncheck(3); // `false`\ncheck(4); // `true`\ncheck(5); // `false`\ncheck(6); // `true`\n```\n\n##### `generate([a, b])`\n\nReturns a function that produces a monotonously increasing sequence of indices.\n\nIf the sequence has an end, the returned function will return `null` after the last index in the sequence.\n\n**Example:** An always increasing sequence\n\n```js\nconst gen = nthCheck.generate([2, 3]);\n\ngen(); // `1`\ngen(); // `3`\ngen(); // `5`\ngen(); // `8`\ngen(); // `11`\n```\n\n**Example:** With an end value\n\n```js\nconst gen = nthCheck.generate([-2, 5]);\n\ngen(); // 0\ngen(); // 2\ngen(); // 4\ngen(); // null\n```\n\n##### `sequence(formula)`\n\nParses and compiles a formula to a generator that produces a sequence of indices. Combination of `parse` and `generate`.\n\n**Example:** An always increasing sequence\n\n```js\nconst gen = nthCheck.sequence(\"2n+3\");\n\ngen(); // `1`\ngen(); // `3`\ngen(); // `5`\ngen(); // `8`\ngen(); // `11`\n```\n\n**Example:** With an end value\n\n```js\nconst gen = nthCheck.sequence(\"-2n+5\");\n\ngen(); // 0\ngen(); // 2\ngen(); // 4\ngen(); // null\n```\n\n---\n\nLicense: BSD-2-Clause\n\n## Security contact information\n\nTo report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security).\nTidelift will coordinate the fix and disclosure.\n","_attachments":{},"homepage":"https://github.com/fb55/nth-check","bugs":{"url":"https://github.com/fb55/nth-check/issues"},"license":"BSD-2-Clause"}