{
  "_id": "iter-fun",
  "maintainers": [
    {
      "name": "danieljdufour",
      "email": "daniel.j.dufour@gmail.com"
    }
  ],
  "keywords": [
    "array",
    "iter",
    "iterable",
    "iterate",
    "iterator"
  ],
  "dist-tags": {
    "latest": "0.2.0"
  },
  "author": {
    "name": "Daniel J. Dufour"
  },
  "_rev": "6-9e307d706dc50217b497551696ddf0ed",
  "description": "Fun with Iterables",
  "readme": "# iter-fun\nFun with Iterables\n\n# install\n```bash\nnpm install iter-fun\n```\n\n# usage\n```js\nimport { getOrCreateIterator } from \"iter-fun\";\n// if the object has an iterator, return it\n// if not, create one from the object\nconst iter = getOrCreateIterator(obj);\n\nimport { isArray } from \"iter-fun\";\nisArray([1, 2, 3]); // true\n\nimport { isIterator } from \"iter-fun\";\nisIterator([1, 2, 3][Symbol.iterator]()); // true\n\nimport { hasNext } from \"iter-fun\";\nhasNext({ next: () => {...} }); // true\n\nimport { hasIterator } from \"iter-fun\";\nhasIterator({ \"@@iterator\": ... }); // true\n\nimport { hasSymbolIterator } from \"iter-fun\";\nhasSymbolIterator(Array); // true\n\nimport { getIterator } from \"iter-fun\";\nconst iter = getIterator([1, 2]);\niter.next(); // { value: 1, done: false }\niter.next(); // { value: 2, done: false }\niter.next() // { done: true }\n\nimport { createIterator } from \"iter-fun\";\n// obj must have a length property\n// and index-addressable data like obj[123]\nconst iter = createIterator(obj);\n\nimport { addSymbolIterator } from \"iter-fun\";\nconst obj = { next: () => {...} };\naddSymbolIterator(obj);\n// modifies the object in-place adding a [Symbol.iterator] key\n\nimport { addSymbolIteratorFallback } from \"iter-fun\";\nconst obj = { next: () => {...} };\naddSymbolIteratorFallback(obj);\n// modifies the object in-place adding a \"@@iterator\" string key\n// helpful if you are running in an old browser\n\nimport { wrapNextFunction } from \"iter-fun\";\nconst next = () => { ... };\nconst iter = wrapNextFunction(next);\n// converts a next function into a fully functioning iterable\n\nimport { zip } from \"iter-fun\";\nconst zeros = [0, 0, 0, ...];\nconst twos = [2, 2, 2, ...];\nconst sixties = [60, 60, 60, ...];\nconst iters = [zeros, twos, sixties];\nconst zipped = zip(iters);\nzipped.next();\n// { done: false, value: [0, 2, 60] }\n```\n",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/DanielJDufour/iter-fun.git"
  },
  "bugs": {
    "url": "https://github.com/DanielJDufour/iter-fun/issues"
  },
  "license": "CC0-1.0",
  "versions": {
    "0.0.1": {
      "name": "iter-fun",
      "version": "0.0.1",
      "description": "Fun with Iterables",
      "main": "index.js",
      "type": "module",
      "scripts": {
        "format": "npx prettier --arrow-parens=avoid --trailing-comma=none --write *.js",
        "test": "node test.js"
      },
      "repository": {
        "type": "git",
        "url": "git+https://github.com/DanielJDufour/iter-fun.git"
      },
      "keywords": [
        "array",
        "iter",
        "iterable",
        "iterate",
        "iterator"
      ],
      "author": {
        "name": "Daniel J. Dufour"
      },
      "license": "CC0-1.0",
      "bugs": {
        "url": "https://github.com/DanielJDufour/iter-fun/issues"
      },
      "homepage": "https://github.com/DanielJDufour/iter-fun#readme",
      "devDependencies": {
        "flug": "^2.1.0"
      },
      "gitHead": "d02e520a812c2aa0692715fcd5869ce0153a3faf",
      "_id": "iter-fun@0.0.1",
      "_nodeVersion": "16.8.0",
      "_npmVersion": "7.21.0",
      "dist": {
        "integrity": "sha512-jYJ9KZLzkTK+l9jRj46w21p4nSSQXVoYiOCsjzXMUQ0JoouxGbCifgMW4XV2iSlkEFVVt4P0PbCHFkY1FlMvRQ==",
        "shasum": "4064de5ec1b0ce2f6076ba0730c1dea3eda58140",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/iter-fun/-/iter-fun-0.0.1.tgz",
        "fileCount": 4,
        "unpackedSize": 9954,
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEYCIQDwKOjyVCRxofRcyi0eg+rj6nREZr6AAnW6cAOpUZ6MWQIhAOxNRZfZJJK6PcuWDppjuPBNQNXY2DxPOTMeLfAULvfB"
          }
        ]
      },
      "_npmUser": {
        "name": "danieljdufour",
        "email": "daniel.j.dufour@gmail.com"
      },
      "directories": {},
      "maintainers": [
        {
          "name": "danieljdufour",
          "email": "daniel.j.dufour@gmail.com"
        }
      ],
      "_npmOperationalInternal": {
        "host": "s3://npm-registry-packages",
        "tmp": "tmp/iter-fun_0.0.1_1635948290934_0.44673492732778586"
      },
      "_hasShrinkwrap": false
    },
    "0.1.0": {
      "name": "iter-fun",
      "version": "0.1.0",
      "description": "Fun with Iterables",
      "main": "index.js",
      "scripts": {
        "format": "npx prettier --arrow-parens=avoid --trailing-comma=none --write *.js",
        "test": "node test.js"
      },
      "repository": {
        "type": "git",
        "url": "git+https://github.com/DanielJDufour/iter-fun.git"
      },
      "keywords": [
        "array",
        "iter",
        "iterable",
        "iterate",
        "iterator"
      ],
      "author": {
        "name": "Daniel J. Dufour"
      },
      "license": "CC0-1.0",
      "bugs": {
        "url": "https://github.com/DanielJDufour/iter-fun/issues"
      },
      "homepage": "https://github.com/DanielJDufour/iter-fun#readme",
      "devDependencies": {
        "flug": "^2.1.0"
      },
      "gitHead": "048aac31dd7d612d157f0c32eae2037dec33cf80",
      "_id": "iter-fun@0.1.0",
      "_nodeVersion": "16.8.0",
      "_npmVersion": "7.21.0",
      "dist": {
        "integrity": "sha512-4v9f3+/BaxdGxG4WQraSnlQ++6jcb3ARNZE2C84g2mujf9f77emG43NVCIXjGanSbU0nAaM9rDh0CSIHr6B5rQ==",
        "shasum": "b510b270ead805e08c64b309f967919be508fa0c",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/iter-fun/-/iter-fun-0.1.0.tgz",
        "fileCount": 4,
        "unpackedSize": 10075,
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEUCIQD+KIslwYhApgjo+P3yGctx/yHkhFIuDJvio9oB90dj9AIgCmdMi48kHtbOr+xNB17jeqvmeg+DALNz9dbjg/9/fVo="
          }
        ]
      },
      "_npmUser": {
        "name": "danieljdufour",
        "email": "daniel.j.dufour@gmail.com"
      },
      "directories": {},
      "maintainers": [
        {
          "name": "danieljdufour",
          "email": "daniel.j.dufour@gmail.com"
        }
      ],
      "_npmOperationalInternal": {
        "host": "s3://npm-registry-packages",
        "tmp": "tmp/iter-fun_0.1.0_1635948826367_0.12213108785495819"
      },
      "_hasShrinkwrap": false
    },
    "0.1.1": {
      "name": "iter-fun",
      "version": "0.1.1",
      "description": "Fun with Iterables",
      "main": "index.js",
      "scripts": {
        "format": "npx prettier --arrow-parens=avoid --trailing-comma=none --write *.js",
        "test": "node test.js"
      },
      "repository": {
        "type": "git",
        "url": "git+https://github.com/DanielJDufour/iter-fun.git"
      },
      "keywords": [
        "array",
        "iter",
        "iterable",
        "iterate",
        "iterator"
      ],
      "author": {
        "name": "Daniel J. Dufour"
      },
      "license": "CC0-1.0",
      "bugs": {
        "url": "https://github.com/DanielJDufour/iter-fun/issues"
      },
      "homepage": "https://github.com/DanielJDufour/iter-fun#readme",
      "devDependencies": {
        "flug": "^2.1.0"
      },
      "gitHead": "9a510c882eccb7e80b32f73e397e8d13ef056504",
      "_id": "iter-fun@0.1.1",
      "_nodeVersion": "16.8.0",
      "_npmVersion": "7.21.0",
      "dist": {
        "integrity": "sha512-7YmfoK33vGis/10VNPkvQg8R9psT/OqlyzYJtqA3QkruyGH12UINByYzSbwrDh/Z2MHJoSPuB73Rgtsrf21UCQ==",
        "shasum": "0137ace1a54ddb72c796f211a306a564979a001c",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/iter-fun/-/iter-fun-0.1.1.tgz",
        "fileCount": 4,
        "unpackedSize": 11166,
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEUCIQD7elyZesvJpnDYHF0J9G37Sd9dhhsxLZQNd6N6bBQqCwIgaWD3TZDFNqcWApkTdw0KzfVcFUtFjYMS3zoeCves1ic="
          }
        ]
      },
      "_npmUser": {
        "name": "danieljdufour",
        "email": "daniel.j.dufour@gmail.com"
      },
      "directories": {},
      "maintainers": [
        {
          "name": "danieljdufour",
          "email": "daniel.j.dufour@gmail.com"
        }
      ],
      "_npmOperationalInternal": {
        "host": "s3://npm-registry-packages",
        "tmp": "tmp/iter-fun_0.1.1_1635977168739_0.8842387808377947"
      },
      "_hasShrinkwrap": false
    },
    "0.1.2": {
      "name": "iter-fun",
      "version": "0.1.2",
      "description": "Fun with Iterables",
      "main": "index.js",
      "scripts": {
        "format": "npx prettier --arrow-parens=avoid --trailing-comma=none --write *.js",
        "test": "node test.js"
      },
      "repository": {
        "type": "git",
        "url": "git+https://github.com/DanielJDufour/iter-fun.git"
      },
      "keywords": [
        "array",
        "iter",
        "iterable",
        "iterate",
        "iterator"
      ],
      "author": {
        "name": "Daniel J. Dufour"
      },
      "license": "CC0-1.0",
      "bugs": {
        "url": "https://github.com/DanielJDufour/iter-fun/issues"
      },
      "homepage": "https://github.com/DanielJDufour/iter-fun#readme",
      "devDependencies": {
        "flug": "^2.1.0"
      },
      "gitHead": "ee19007574bdbad4b340496c50e6a445cbafb6ac",
      "_id": "iter-fun@0.1.2",
      "_nodeVersion": "16.8.0",
      "_npmVersion": "7.21.0",
      "dist": {
        "integrity": "sha512-bPtGG2dnO3g8iOLVje8kid07v52bV3a0irP2ZYItgao2vDSmlyeV42GKz1U5MBAxBYZDMATRni6ndgEFqJN/Ig==",
        "shasum": "4738b12875c75e223415a2deedaa3603d01e9a40",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/iter-fun/-/iter-fun-0.1.2.tgz",
        "fileCount": 4,
        "unpackedSize": 11539,
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEUCIQDcG+cDNckMGFlY4EK6omvf8bDqm4e3OLzdLTFItOYRvgIgM9/HiQGPRVyULgFQmcAojX05PHwhxCU2q4nBEIJoXm8="
          }
        ]
      },
      "_npmUser": {
        "name": "danieljdufour",
        "email": "daniel.j.dufour@gmail.com"
      },
      "directories": {},
      "maintainers": [
        {
          "name": "danieljdufour",
          "email": "daniel.j.dufour@gmail.com"
        }
      ],
      "_npmOperationalInternal": {
        "host": "s3://npm-registry-packages",
        "tmp": "tmp/iter-fun_0.1.2_1636153910318_0.2998042068148934"
      },
      "_hasShrinkwrap": false
    },
    "0.2.0": {
      "name": "iter-fun",
      "version": "0.2.0",
      "description": "Fun with Iterables",
      "main": "index.js",
      "scripts": {
        "format": "npx prettier --arrow-parens=avoid --trailing-comma=none --write *.js",
        "test": "node test.js"
      },
      "repository": {
        "type": "git",
        "url": "git+https://github.com/DanielJDufour/iter-fun.git"
      },
      "keywords": [
        "array",
        "iter",
        "iterable",
        "iterate",
        "iterator"
      ],
      "author": {
        "name": "Daniel J. Dufour"
      },
      "license": "CC0-1.0",
      "bugs": {
        "url": "https://github.com/DanielJDufour/iter-fun/issues"
      },
      "homepage": "https://github.com/DanielJDufour/iter-fun#readme",
      "devDependencies": {
        "flug": "^2.1.0"
      },
      "gitHead": "215883baa0e78a24b08d2d465a2f2214149f76de",
      "_id": "iter-fun@0.2.0",
      "_nodeVersion": "16.8.0",
      "_npmVersion": "7.21.0",
      "dist": {
        "integrity": "sha512-8dYv+ptyps7LtrfqAYY8qqThAiX2eIDBGKc/kXdSrEMRJQoD8KhTOa+duECGghjsnkHEf9O8X6IS62jO+6xwhw==",
        "shasum": "e0d7d36b1b3df67d3834e2710b53412913611f7b",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/iter-fun/-/iter-fun-0.2.0.tgz",
        "fileCount": 4,
        "unpackedSize": 12222,
        "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2wMpCRA9TVsSAnZWagAAQIAP/R+h+7JdqdRTdhmtwYtO\nSkm36BlRz+gYUJlApcduLRHis5EGpu0GtlajQTeffbsTLmsi1j7uR4DGUcc0\nOKJdr36WxatdNT8BGkLrcbIQf1US+PBvFoP6jZ3Z6bzcaIYtftuwFs8qW9xd\ndVbqlkomPbxEDBKGCg4tGIC5EOsuuyoA9IKwmTHRi1PeZ31Ibbu8pJsGZEO4\nWI4pc7A/yNY4Eok4PVx+gt1XFx5khRebuWvJsjco+RkNEn4BakTUJT1HY8qk\nScCmWqULUEtgO40T2qEWAlht49smVEUqQDv3kGBIpqB++4N9+tCihV3fRGUc\n8H5y0gWci0Kd/sxtb5anEOfsNILxfbDOPHpELb/wuz6V/c2qGz9X0dtsKqHi\nPBRn+pBxdnXooX7zcl2BXLP916gUyTsDDa5psPOmbMbETWmglnKH041cTrkq\ne1jajd6C15zliShwfSNih1Kcmc1Y8QE/dXsi/xJ9XZ8ovb65tMHj8/s7Rq8S\nLgKjiYop4gCNkeyJP+d3EdnDp30/MQeTISWXSCNKxJZ0qXc0QoC+7asV7ZTW\nrGeBz+NmpGTIM7ZGTG/7A040C5VcuS4lMm+bx/95XywEtZ9qPpYPkMZicl7s\nfFGmzbijsrvoTqSdBb9vrwzRCL5pK/h4xbdsNJD4ecjQkQCXQiOK45RrGmVh\nym/8\r\n=TJ90\r\n-----END PGP SIGNATURE-----\r\n",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEUCIDIuu5I4wavX60ZK9DSXzpV78zj1QYiL27JxS5Sv4JsHAiEAqxNV4LDt0DhWjqZsu8BPpbveYyYI7eoECQsoZ9pT5tY="
          }
        ]
      },
      "_npmUser": {
        "name": "danieljdufour",
        "email": "daniel.j.dufour@gmail.com"
      },
      "directories": {},
      "maintainers": [
        {
          "name": "danieljdufour",
          "email": "daniel.j.dufour@gmail.com"
        }
      ],
      "_npmOperationalInternal": {
        "host": "s3://npm-registry-packages",
        "tmp": "tmp/iter-fun_0.2.0_1636985366828_0.5208964043367057"
      },
      "_hasShrinkwrap": false
    }
  },
  "name": "iter-fun",
  "time": {
    "created": "2021-11-03T14:04:50.934Z",
    "0.0.1": "2021-11-03T14:04:51.088Z",
    "modified": "2026-05-22T22:16:42.810Z",
    "0.1.0": "2021-11-03T14:13:46.468Z",
    "0.1.1": "2021-11-03T22:06:08.858Z",
    "0.1.2": "2021-11-05T23:11:50.488Z",
    "0.2.0": "2021-11-15T14:09:27.030Z"
  },
  "readmeFilename": "README.md",
  "homepage": "https://github.com/DanielJDufour/iter-fun#readme"
}