{"id":17145140,"url":"https://github.com/apexcaptain/koconut","last_synced_at":"2026-02-12T06:04:14.795Z","repository":{"id":49017241,"uuid":"269037442","full_name":"ApexCaptain/Koconut","owner":"ApexCaptain","description":"Provide interchainable array, set, map and etc supporting both normal and async callbacks as their action arguments.","archived":false,"fork":false,"pushed_at":"2023-04-25T20:42:06.000Z","size":9017,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-13T20:54:18.153Z","etag":null,"topics":["array","array-processing","array-utils","async","async-await","async-callback","async-functions","async-iteration","async-methods","await","collection","data-structures","iteration-process","javascript","loops","nodejs","promise","typescript","typescript-library"],"latest_commit_sha":null,"homepage":"https://apexcaptain.github.io/Koconut/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ApexCaptain.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-03T08:51:18.000Z","updated_at":"2024-11-07T16:31:47.000Z","dependencies_parsed_at":"2024-10-14T21:04:52.448Z","dependency_job_id":"848e9359-2456-4664-bdb8-c0c974b7d3f5","html_url":"https://github.com/ApexCaptain/Koconut","commit_stats":{"total_commits":360,"total_committers":4,"mean_commits":90.0,"dds":0.0444444444444444,"last_synced_commit":"ee88005d1147e3e9fbae23cffbfe636afacab61f"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/ApexCaptain/Koconut","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ApexCaptain%2FKoconut","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ApexCaptain%2FKoconut/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ApexCaptain%2FKoconut/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ApexCaptain%2FKoconut/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ApexCaptain","download_url":"https://codeload.github.com/ApexCaptain/Koconut/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ApexCaptain%2FKoconut/sbom","scorecard":{"id":15143,"data":{"date":"2025-08-11","repo":{"name":"github.com/ApexCaptain/Koconut","commit":"ee88005d1147e3e9fbae23cffbfe636afacab61f"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.1,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql.yml:28","Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql.yml:29","Warn: no topLevel permission defined: .github/workflows/codeql.yml:1","Warn: no topLevel permission defined: .github/workflows/manual-ci.yml:1","Warn: no topLevel permission defined: .github/workflows/pipeline.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"SAST","score":10,"reason":"SAST tool detected: CodeQL","details":["Info: SAST configuration detected: CodeQL","Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/ApexCaptain/Koconut/codeql.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:46: update your workflow using https://app.stepsecurity.io/secureworkflow/ApexCaptain/Koconut/codeql.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:57: update your workflow using https://app.stepsecurity.io/secureworkflow/ApexCaptain/Koconut/codeql.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:71: update your workflow using https://app.stepsecurity.io/secureworkflow/ApexCaptain/Koconut/codeql.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/manual-ci.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/ApexCaptain/Koconut/manual-ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/manual-ci.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/ApexCaptain/Koconut/manual-ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pipeline.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/ApexCaptain/Koconut/pipeline.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pipeline.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/ApexCaptain/Koconut/pipeline.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pipeline.yml:51: update your workflow using https://app.stepsecurity.io/secureworkflow/ApexCaptain/Koconut/pipeline.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pipeline.yml:54: update your workflow using https://app.stepsecurity.io/secureworkflow/ApexCaptain/Koconut/pipeline.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pipeline.yml:71: update your workflow using https://app.stepsecurity.io/secureworkflow/ApexCaptain/Koconut/pipeline.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pipeline.yml:74: update your workflow using https://app.stepsecurity.io/secureworkflow/ApexCaptain/Koconut/pipeline.yml/master?enable=pin","Warn: containerImage not pinned by hash: .devcontainer/Dockerfile:2","Warn: npmCommand not pinned by hash: .devcontainer/Dockerfile:6-7","Warn: npmCommand not pinned by hash: .github/workflows/manual-ci.yml:27","Warn: npmCommand not pinned by hash: .github/workflows/manual-ci.yml:29","Warn: npmCommand not pinned by hash: .github/workflows/pipeline.yml:37","Warn: npmCommand not pinned by hash: .github/workflows/pipeline.yml:39","Info:   0 out of  12 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 containerImage dependencies pinned","Info:   0 out of   5 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":0,"reason":"33 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-h5c3-5r3r-rr8q","Warn: Project is vulnerable to: GHSA-rmvr-2pp2-xj38","Warn: Project is vulnerable to: GHSA-xx4v-prfh-6cgc","Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc","Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx","Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5","Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j","Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22","Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-76p7-773f-r4q5","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36","Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc","Warn: Project is vulnerable to: GHSA-hc6q-2mpp-qw7j","Warn: Project is vulnerable to: GHSA-4vvj-4cpr-p986","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-f9xv-q969-pqx4"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-14T15:36:13.574Z","repository_id":49017241,"created_at":"2025-08-14T15:36:13.574Z","updated_at":"2025-08-14T15:36:13.574Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273225643,"owners_count":25067354,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-02T02:00:09.530Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["array","array-processing","array-utils","async","async-await","async-callback","async-functions","async-iteration","async-methods","await","collection","data-structures","iteration-process","javascript","loops","nodejs","promise","typescript","typescript-library"],"created_at":"2024-10-14T21:04:41.537Z","updated_at":"2026-02-12T06:04:09.751Z","avatar_url":"https://github.com/ApexCaptain.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# \u003cimg src=\"res/logo.png\" alt=\"Koconut Logo\" width=\"70\" height=\"70\"\u003eKoconut : Kotlin Style Collection Lib For Node.Js\r\n\r\n\u003c!-- I.O Sheilds --\u003e\r\n\r\n[![npm version][npm-image]][npm-url]\r\n[![Node.js CI][ci-image]][ci-url]\r\n[![CodeQL][code-ql-image]][code-ql-url]\r\n[![License][license-image]][license-url]\r\n[![Node.js Version][node-version-image]][node-version-url]\r\n\r\n# Table of Contents\r\n\r\n- [Installation](#Installation)\r\n- [Introduction](#Introduction)\r\n- [Components](#Components)\r\n- [Necessity](#Necessity)\r\n- [Examples](#Examples)\r\n- [Deprecation Warning](#Deprecation-Warning)\r\n- [License](#License)\r\n\r\n# Installation\r\n\r\n### Using [npm](https://www.npmjs.com/)\r\n\r\n```sh\r\nnpm install koconut --save\r\n```\r\n\r\n### Using [yarn](https://yarnpkg.com/)\r\n\r\n```sh\r\nyarn add koconut\r\n```\r\n\r\n### Using [bower](https://bower.io/) (Browser env)\r\n\r\n```\r\nbower install git@github.com:ApexCaptain/Koconut.git\r\n```\r\n\r\n### Using [unpkg](https://unpkg.com/) (Browser env)\r\n\r\n```html\r\n\u003cscript src=\"https://unpkg.com/koconut@latest/webpack/koconut\"\u003e\u003c/script\u003e\r\n```\r\n\r\n# Introduction\r\n\r\nThis is a node.js library for collection(a.k.a data structure). It's fully written in TypeScript, but also compatible with JavaScript application. It's 100% [Apache-2.0](https://github.com/ApexCaptain/Koconut/blob/master/LICENSE) licensed.\r\n\r\nHere is a short example on how to use it:\r\n\r\n### TypeScript\r\n\r\n```ts\r\nimport { KoconutArray } from 'koconut';\r\n\r\nconst sampleProcess = async () =\u003e {\r\n  const myArray = KoconutArray.of(1, 2, 3, 4, 5, 6);\r\n\r\n  const evenNumbers = await myArray\r\n    .filter((eachNumber) =\u003e eachNumber % 2 == 0)\r\n    .yield();\r\n\r\n  console.log(evenNumbers);\r\n  // ↑ [ 2, 4, 6 ]\r\n};\r\nsampleProcess();\r\n```\r\n\r\n### JavaScript (CommonJs)\r\n\r\n```js\r\nconst { KoconutArray } = require('koconut');\r\n\r\nconst sampleProcess = async () =\u003e {\r\n  const myArray = KoconutArray.of(1, 2, 3, 4, 5, 6);\r\n\r\n  const evenNumbers = await myArray\r\n    .filter((eachNumber) =\u003e eachNumber % 2 == 0)\r\n    .yield();\r\n\r\n  console.log(evenNumbers);\r\n  // ↑ [ 2, 4, 6 ]\r\n};\r\nsampleProcess();\r\n```\r\n\r\nAs you can see, there's no big difference between using it in JS and TS. Both examples created a 1 to 6 integer array and filtered only the even numbers.\r\n\r\n# Components\r\n\r\n## Documents\r\n\r\nThe full document of this library is running on [git-hub page].\r\n\r\n### Container\r\n\r\n- [KoconutEntry]\r\n- [Entry]\r\n- [KoconutPair]\r\n- [Pair]\r\n- [KoconutArray]\r\n- [KoconutSet]\r\n- [KoconutMap]\r\n\r\n### Enum\r\n\r\n- [KoconutLocale]\r\n- [KoconutLoopSignal]\r\n\r\n### Exception\r\n\r\n- [KoconutConflictException]\r\n- [KoconutIndexOutOfBoundsException]\r\n- [KoconutInvalidArgumentException]\r\n- [KoconutNoSuchElementException]\r\n\r\n### Protocol (Interface)\r\n\r\n- [KoconutComparable]\r\n- [KoconutEquatable]\r\n\r\n### Tool\r\n\r\n- [KoconutOption]\r\n\r\n## Hierarchy\r\n\r\nThis is the [Koconut] class hierarchy in current version.\r\n\r\n![Hierarchy](res/Hierarchy.png)\r\n\r\n# Necessity\r\n\r\n`OK, so... why do I need it?`\r\n\r\n[Koconut] is promise-friendly. The basic design philsophy of this library is to use `async/await` functionality without any interruption even if whlie using iterative process. Let me give you an example.\r\n\r\nImagine if there are 3 different http requests info. Each and every one of them has a very different purpose and cannot be merged into a single requset. You may want to handle them one by one sequentially.\r\n\r\n```ts\r\nconst requestInfoList = [\r\n  {\r\n    method: 'POST',\r\n    uri: 'https://myServer',\r\n    data: {\r\n      some: 'payload1',\r\n    },\r\n  },\r\n  {\r\n    method: 'GET',\r\n    uri: 'https://myServer',\r\n    data: {\r\n      some: 'payload2',\r\n    },\r\n  },\r\n  {\r\n    method: 'DELETE',\r\n    uri: 'https://myServer',\r\n    data: {\r\n      some: 'payload3',\r\n    },\r\n  },\r\n];\r\n```\r\n\r\nNow, let's send those requests with one of the most common http node.js lib, [axios](https://www.npmjs.com/package/axios).\r\n\r\n```ts\r\nconst mainProcess = async () =\u003e {\r\n  const results = new Array();\r\n  requestInfoList.forEach(async (eachRequestInfo) =\u003e {\r\n    const eachResult = await axios(eachRequestInfo);\r\n    results.push(eachResult);\r\n  });\r\n\r\n  console.log(results); // --- [1] : Empty List\r\n  console.log('Nailed it!');\r\n};\r\nmainProcess();\r\n```\r\n\r\nWithin upper example, each http request is handled asynchronously. However, the result of outer `forEach` function of normal `Array` is not a [Promise] instance, in other words, it does not support [Promise] nor `async/await`.\r\n\r\nTherefore, printed message at [1] is gonna be an empty list. This is definitely not what you've intended.\r\n\r\nNow, you have to come up with a different way. Maybe, after some Googling and Googling (Like as I did), you'll find an answer just like below.\r\n\r\n```ts\r\nconst mainProcess = async () =\u003e {\r\n  const results = new Array();\r\n  for (const eachRequestInfo of requestInfoList) {\r\n    const eachResult = await axios(eachRequestInfo);\r\n    results.push(eachResult);\r\n  }\r\n\r\n  console.log(results); // --- [1] : [ result1, result2, result3 ]\r\n  console.log('Nailed it!');\r\n};\r\nmainProcess();\r\n```\r\n\r\nBy doing this, all the requests are sent one by one. Printed message at [1] would be an array of three request results.\r\n\r\nThe problem is resolved! Having a nice cuppa tea, reclining your seat, wow, you may leave work early today!\r\n\r\nOr... is it?\r\n\r\nThe next day, your boss told you that each request result should be checked whether it's valid or not.\r\n\r\nThe information you need is all in some other database. So, you made another `async` function called `checkIsValid`.\r\n\r\nEasy! It can be done like this.\r\n\r\n```ts\r\nconst mainProcess = async () =\u003e {\r\n  const results = new Array();\r\n  for (const eachRequestInfo of requestInfoList) {\r\n    const eachResult = await axios(eachRequesInfo);\r\n    results.push(eachResult);\r\n  }\r\n\r\n  const validResults = new Array();\r\n  for (const eachResult of results) {\r\n    if (await checkIsValid(eachResult)) validResults.push(eachResult);\r\n  }\r\n\r\n  console.log(validResults); // --- [1] : Valid results matches the given condition\r\n  console.log('Nailed it!');\r\n};\r\nmainProcess();\r\n```\r\n\r\nNow you have two different arrays. This is the problem. Since previous iterable classes don't support [Promise], you have to keep adding `for...of` or `for...in` statement over and over again into your source code. As time goes by and your software becomes more and more complicated, your data processing would be messy and unrecognizable.\r\n\r\nIt would be great just if you can use `filter` function instead, right?\r\n\r\nWell, here's an example using [KoconutArray].\r\n\r\n```ts\r\nimport { KoconutArray } from 'koconut';\r\nconst mainProcess = async () =\u003e {\r\n  const validResults = await KoconutArray.from(requestInfoList)\r\n    .map(axios)\r\n    .filter(checkIsValid)\r\n    .yield();\r\n\r\n  console.log(validresults);\r\n  console.log('Nailed it!');\r\n};\r\nmainProcess();\r\n```\r\n\r\nBoom! It is done! No more complicated `for...of` or `for...in` iterative processes. It is safe and quite beautiful.\r\nOf course, I know that it's pretty unnatural example. You could fetch result and validate it simultaneously just in one loop.\r\nBut by drawing upon [Koconut] library, your source code would be much more clear and efficient.\r\n\r\n# Examples\r\n\r\nLet me give you a few examples for basic usage of this library.\r\nI've written only about [KoconutArray] as a representative class.\r\n\r\n## Creation\r\n\r\nTo create a [KoconutArray] instance, you can do it in 4 different ways.\r\n\r\n1. Using `new` keyword.\r\n\r\n   Very traditional way. You can create a new instance from an iterable object or if it's ommitted you may have an empty array. In case of that, you'd better declare generic type explicitly.\r\n\r\n   ```typescript\r\n   import { KoconutArray } from 'koconut';\r\n\r\n   const emptyKoconutNumbers = new KoconutArray\u003cnumber\u003e();\r\n   // ↑ This is an empty Koconut number array\r\n\r\n   const numbers = Array.of(1, 2, 3, 4, 5);\r\n   const koconuntNumbers = new KoconutArray(numbers);\r\n   // ↑ This is a Koconut number array consists of 1 to 5.\r\n   ```\r\n\r\n2. Using `static` [from](https://apexcaptain.github.io/Koconut/classes/KoconutArray.html#from) method.\r\n\r\n   You can create a new instance from an iterable object.\r\n\r\n   ```typescript\r\n   import { KoconutArray } from 'koconut';\r\n\r\n   const numbers = Array.of(1, 2, 3, 4, 5);\r\n   const koconutNumbers = KoconutArray.from(numbers);\r\n   // ↑ This is a Koconut number array consists of 1 to 5.\r\n   ```\r\n\r\n3. Using `static` [of](https://apexcaptain.github.io/Koconut/classes/KoconutArray.html#of) method.\r\n\r\n   You can create a new instance with a variable number of arguments\r\n\r\n   ```typescript\r\n   import { KoconutArray } from 'koconut';\r\n\r\n   const koconutNumbers = KoconutArray.of(1, 2, 3, 4, 5);\r\n   // ↑ This is a Koconut number array consists of 1 to 5.\r\n   ```\r\n\r\n4. Using `static` [generate](https://apexcaptain.github.io/Koconut/classes/KoconutArray.html#generate) method.\r\n\r\n   This method creates a new instance with length positions and fills it with values provided by `generator` function callback with each index in the range \"`0...length - 1`\" in increasing order as an argument. Given `count` must be non-negative number.\r\n\r\n   ```typescript\r\n   import { KoconutArray } from 'koconut';\r\n\r\n   const evenNumberArray = await KoconutArray.generate(5, (i) =\u003e i * 2);\r\n   // ↑ This is a Koconut number array consists of 2, 4, 6, 8 and 10.\r\n\r\n   const negativeLength = await KoconutArray.generate(-1, (i) =\u003e i * 2);\r\n   // ↑ This will cause invalid argument exception since given count is a negative number.\r\n   ```\r\n\r\n## Processing\r\n\r\nAll the [Koconut] containers internally connected with each other within [Promise] chain. In a nutshell, you have to process all the chained objects before you get the result. There are 3 ways to do that. They're almost same but slightly different.\r\n\r\n1. Using [yield](https://apexcaptain.github.io/Koconut/classes/KoconutArray.html#yield) method.\r\n\r\n   This method processes all the chained objects and returns the result.\r\n\r\n   ```typescript\r\n   import { KoconutArray } from 'koconut';\r\n\r\n   const mainProcess = async () =\u003e {\r\n     const koconutNumbers = KoconutArray.of(1, 2, 3, 4, 5);\r\n\r\n     const firstNumber = await koconutNumbers.first().yield();\r\n     console.log(firstNumber);\r\n     // ↑ 1\r\n   };\r\n   mainProcess();\r\n   ```\r\n\r\n2. Using [process](https://apexcaptain.github.io/Koconut/classes/KoconutArray.html#process) method.\r\n\r\n   This method just simply processes all the chained objects, then return `Promise\u003cvoid\u003e`.\r\n\r\n   ```typescript\r\n   import { KoconutArray } from 'koconut';\r\n\r\n   const mainProcess = async () =\u003e {\r\n     const koconutNumbers = KoconutArray.of(1, 2, 3, 4, 5);\r\n\r\n     await koconutNumbers.forEach(console.log).process();\r\n     // ↑ 1 2 3 4 5\r\n   };\r\n   mainProcess();\r\n   ```\r\n\r\n3. Using [let](https://apexcaptain.github.io/Koconut/classes/KoconutArray.html#let) method.\r\n\r\n   This method processes all the chained objects and calls the specified function `block` with the reuslt value as its argument and returns the final result of the `block`.\r\n\r\n   ```typescript\r\n   import { KoconutArray } from 'koconut';\r\n\r\n   const mainProcess = async () =\u003e {\r\n     const koconutNumbers = KoconutArray.of(1, 2, 3, 4, 5);\r\n\r\n     const firstNumberPlus2 = await koconutNumbers\r\n       .first()\r\n       .let((result) =\u003e result + 2);\r\n     console.log(firstNumber);\r\n     // ↑ 3\r\n   };\r\n   mainProcess();\r\n   ```\r\n\r\n4. Using [also](https://apexcaptain.github.io/Koconut/classes/KoconutArray.html#also) method.\r\n\r\n   This method processes all the chained objects and calls the specified function `block` with the result value as its argument and return passed result object.\r\n\r\n   ```typescript\r\n   import { KoconutArray } from 'koconut';\r\n\r\n   const mainProcess = async () =\u003e {\r\n     const koconutNumbers = KoconutArray.of(1, 2, 3, 4, 5);\r\n\r\n     const moreNumbers = await koconutNumbers.also((result) =\u003e {\r\n       result.push(6);\r\n       result.push(7);\r\n       result.push(8);\r\n     });\r\n     console.log(moreNumbers);\r\n     // ↑ [1, 2, 3, 4, 5, 6, 7, 8]\r\n   };\r\n   mainProcess();\r\n   ```\r\n\r\n## Iteration\r\n\r\nIterative methods of [KoconutArray] are [forEach](https://apexcaptain.github.io/Koconut/classes/KoconutArray.html#forEach), [forEachIndexed](https://apexcaptain.github.io/Koconut/classes/KoconutArray.html#forEachIndexed), [onEach](https://apexcaptain.github.io/Koconut/classes/KoconutArray.html#onEach) and [onEachIndexed](https://apexcaptain.github.io/Koconut/classes/KoconutArray.html#onEachIndexed). These methods loop to repeat given `action`.\r\n\r\nMethods of which names start with `for` return nothing.\r\n\r\nMethods start with `on` return the original collection itself.\r\n\r\n```typescript\r\nimport { KoconutArray } from 'koconut';\r\n\r\nconst mainProcess = async () =\u003e {\r\n  const koconutNumbers = KoconutArray.of(1, 2, 3, 4, 5);\r\n\r\n  const resultOfForEach = await koconutNumbers\r\n    .forEach(console.log)\r\n    // ↑ 1 2 3 4 5\r\n    .yield();\r\n  console.log(resultOfForEach);\r\n  // ↑ undefined\r\n\r\n  const resultOfOnEach = await koconutNumbers\r\n    .onEach(console.log)\r\n    // ↑ 1 2 3 4 5\r\n    .yield();\r\n  console.log(resultOfForEach);\r\n  // ↑ [1, 2, 3, 4, 5]\r\n};\r\nmainProcess();\r\n```\r\n\r\nAnd of course, methods of which name end with `indexed` have action block given with two arguments.\r\n\r\nOne is index, and the other is element.\r\n\r\nIf you want to interrupt, in other word `stop` the iteration process in the meantime, you may return `false` or [KoconutLoopSignal.BREAK](https://apexcaptain.github.io/Koconut/enums/KoconutLoopSignal.html#BREAK).\r\n\r\n## Calculation\r\n\r\nEach calculator method has its own purpose, performing calculation according to the established rules. For instance, [maxBy] method returns the first element yielding the largest value of the given function block.\r\n\r\n```typescript\r\nimport { KoconutArray } from 'koconut';\r\n\r\nconst mainProcess = async () =\u003e {\r\n  const koconutArray = KoconutArray.of(1, 2, 3, 4, 5);\r\n\r\n  const largestNumberOfArray = await koconutArray\r\n    .maxBy((eachNumber) =\u003e eachNumber)\r\n    .yield();\r\n  console.log(largestNumberOfArray);\r\n  // ↑ 5\r\n\r\n  try {\r\n    await koconutArray\r\n      .filter((eachNumber) =\u003e eachNumber \u003e 10)\r\n      .maxBy((eachNumber) =\u003e eachNumber)\r\n      .yield();\r\n  } catch (error) {\r\n    console.log(error.name);\r\n    // ↑ Koconut No Such Element Exception\r\n    // i.e. -- Array is filtered.\r\n    // No element in 1 to 5 is greater than 10.\r\n  }\r\n};\r\nmainProcess();\r\n```\r\n\r\n## Manipulation\r\n\r\nManipulator methods rearrange the collection, add new elements or filter it by given condition. For instance, [sortedBy](https://apexcaptain.github.io/Koconut/classes/KoconutArray.html#sortedBy) method returns a collection of all elements sorted according to natural sort order(ASC) of the value returned by specified `selector` function block.\r\n\r\n```typescript\r\nimport { KoconutArray } from 'koconut';\r\n\r\nconst mainProcess = async () =\u003e {\r\n  const koconutArray = KoconutArray.of('abcd', 'ab', 'abc', 'a');\r\n\r\n  const sortedStringArrayByLength = await koconutArray\r\n    .sortedBy((eachString) =\u003e eachString.length)\r\n    .yield();\r\n  console.log(sortedStringArrayByLength);\r\n  // ↑ [ 'a', 'ab', 'abc', 'abcd' ]\r\n};\r\nmainProcess();\r\n```\r\n\r\n## Inspection\r\n\r\nInspector methods check the elements at given condtion. For instance, [all](https://apexcaptain.github.io/Koconut/classes/KoconutArray.html#all) method return `true` if all elements match the given `predicate` function block. If any one of those elements doesn't meet the condtion, it'll return `false`.\r\n\r\n```typescript\r\nimport { KoconutArray } from 'koconut';\r\n\r\nconst mainProcess = async () =\u003e {\r\n  const koconutArray = KoconutArray.of(1, 2, 3, 4, 5);\r\n\r\n  const areAllArrayElementsGreaterThan0 = await koconutArray\r\n    .all((eachNumber) =\u003e eachNumber \u003e 0)\r\n    .yield();\r\n  console.log(areAllArrayElementsGreaterThan0);\r\n  // ↑ true\r\n\r\n  const areAllArrayElementsEven = await koconutArray\r\n    .all((eachNumber) =\u003e eachNumber % 2 == 0)\r\n    .yield();\r\n  console.log(areAllArrayElementsEven);\r\n  // ↑ false -- i.e. '1' is not an even number.\r\n};\r\nmainProcess();\r\n```\r\n\r\n## Transformation\r\n\r\nTransformer methods convert the collection into other format. The [map](https://apexcaptain.github.io/Koconut/classes/KoconutArray.html#map) method is representative. It returns a list containing the results of applying the given `transform` function block to each element in the original collection.\r\n\r\n```typescript\r\nimport { KoconutArray } from 'koconut';\r\n\r\nconst mainProcess = async () =\u003e {\r\n  const koconutArray = KoconutArray.of(1, 2, 3, 4, 5);\r\n\r\n  const dobuledNumbers = await koconutArray\r\n    .map((eachNumber) =\u003e eachNumber * 2)\r\n    .yield();\r\n  console.log(dobuledNumbers);\r\n  // ↑ [ 2, 4, 6, 8, 10 ]\r\n\r\n  const numberStrings = await koconutArray\r\n    .map((eachNumber) =\u003e eachNumber.toString())\r\n    .yield();\r\n  console.log(numberStrings);\r\n  // ↑ [ '1', '2', '3', '4', '5' ]\r\n};\r\nmainProcess();\r\n```\r\n\r\n# Deprecation Warning\r\n\r\n## Introduction\r\n\r\nSome methods might no longer be supported in the future. If you have used any one of them, your application is gonna be crashed after updating the library with no reason. To prevent such troubles, [Koconut] supports `Deprecation Warning` functionality since version [1.0.10](./CHANGELOG.md#Release-1.0.10).\r\n\r\nWhat does that mean?\r\n\r\n## Example\r\n\r\nFor instance, [maxBy] method in [KoconutArray] returns the first element yielding the largest value of the given function or throw [KoconutNoSuchElementException] when there is no element. Following examples are same as written in document page.\r\n\r\n```typescript\r\nimport { KoconutArray } from 'koconut';\r\n\r\nconst main = async () =\u003e {\r\n  // Create an 1 to 5 number array.\r\n  const koconutArray = KoconutArray.of(1, 2, 3, 4, 5);\r\n\r\n  // 1st example. Finding largest number.\r\n  const largestNumberOfArray = await koconutArray\r\n    .maxBy((eachNumber) =\u003e eachNumber)\r\n    .yield();\r\n  console.log(largestNumberOfArray);\r\n  // ↑ 5\r\n\r\n  // 2nd example. Finding largest number of an empty array.\r\n  try {\r\n    await koconutArray\r\n      .filter((eachNumber) =\u003e eachNumber \u003e 10) // \u003c-- Now, it's empty\r\n      .maxBy((eachNumber) =\u003e eachNumber) // \u003c-- This is impossible\r\n      .yield();\r\n  } catch (error) {\r\n    console.log(error.name);\r\n    // ↑ Koconut No Such Element Exception\r\n    // i.e. -- Array is filtered.\r\n    // No element in 1 to 5 is greater than 10.\r\n  }\r\n};\r\nmain();\r\n```\r\n\r\nThe first example returns `5`, which is of course, the largest value of the array.\r\n\r\nHowever in the second one, [maxBy] method throws an error because you've just tried to get an `element` in an `empty array`. If this error had not been caught, the whole application would be termintaed.\r\n\r\nThis is why [maxBy] method is depreacted, and also why usage of [maxByOrNull] method is recommended. It'll just return `null` if the array is empty.\r\n\r\nThe problem is that you might not have known about it. You must be warned before that happens and that's where the `Deprecation Warning` comes in. When you use a method that is gonna be depreacted someday, [Koconut] will notice you that `\"Oh, this method is not supported any more. You'd better use this one instead.\"`.\r\n\r\n## Language Support\r\n\r\nCurrently, `Deprecation Warning` of [Koconut] supports three languages.\r\n![languageSupportExample](res/deprecationWarning/languageSupportExample.png)\r\n\r\nLocale setting is done automatically. If you are in Japan, message will be printed in Japanese. If you are in Korea it'll be Korean or if you're in States, English will be your default locale.\r\n\r\nIf you want more detail, please have a check [here](https://apexcaptain.github.io/Koconut/enums/KoconutLocale.html).\r\n\r\n## [Options](https://apexcaptain.github.io/Koconut/classes/KoconutOption.html)\r\n\r\nThere are three options you can change for `Depreation Warning`.\r\n\r\n- [Locale](https://apexcaptain.github.io/Koconut/enums/KoconutLocale.html)\r\n\r\n  You can chagne the language explicitly. Default value depends on your actual region. If it's not supported, `en(English)` will be the default. For instance, if you're in China or Russia, default locale is just `English`. I'm sorry I cannot handle them all...\r\n\r\n  ```typescript\r\n  import { KoconutOption, KoconutLocale } from 'koconut';\r\n\r\n  KoconutOption.locale = KoconutLocale.en; // English\r\n  KoconutOption.locale = KoconutLocale.ja; // Japanese\r\n  KoconutOption.locale = KoconutLocale.ko; // Korean\r\n  ```\r\n\r\n- Availability\r\n\r\n  Simply, if you don't want to use `Depreaction Warning` set the flag to `false`. Default value is `true`.\r\n\r\n  ```typescript\r\n  import { KoconutOption } from 'koconut';\r\n\r\n  KoconutOption.isDeprecationWarningEnabled = true; // Enabled (Default)\r\n  KoconutOption.isDeprecationWarningEnabled = false; // Disabled\r\n  ```\r\n\r\n- Call Stack\r\n\r\n  If you don't want to see messy call stack of the warning, you just disable it by setting the flag to `false`.\r\n\r\n  ```typescript\r\n  import { KoconutOption } from 'koconut';\r\n\r\n  KoconutOption.doesDeprecationWarningShowCallStack = true; // Enabled (Default)\r\n  KoconutOption.doesDeprecationWarningShowCallStack = false; // Disabled\r\n  ```\r\n\r\n# License\r\n\r\n    Licensed under the Apache License, Version 2.0 (the \"License\");\r\n    you may not use this file except in compliance with the License.\r\n    You may obtain a copy of the License at\r\n\r\n       http://www.apache.org/licenses/LICENSE-2.0\r\n\r\n    Unless required by applicable law or agreed to in writing, software\r\n    distributed under the License is distributed on an \"AS IS\" BASIS,\r\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n    See the License for the specific language governing permissions and\r\n    limitations under the License.\r\n\r\n\u003c!-- Links --\u003e\r\n\r\n\u003c!-- IO Shields --\u003e\r\n\r\n[npm-image]: https://img.shields.io/npm/v/koconut.svg?color=CB0000\u0026label=npm\u0026style=plastic\u0026logo=npm\r\n[npm-url]: https://www.npmjs.com/package/koconut\r\n[ci-image]: https://github.com/ApexCaptain/Koconut/actions/workflows/pipeline.yml/badge.svg\r\n[ci-url]: https://github.com/ApexCaptain/Koconut/actions/workflows/pipeline.yml\r\n[code-ql-image]: https://github.com/ApexCaptain/Koconut/actions/workflows/codeql.yml/badge.svg?branch=master\r\n[code-ql-url]: https://github.com/ApexCaptain/Koconut/actions/workflows/codeql.yml\r\n[license-image]: https://img.shields.io/github/license/ApexCaptain/Koconut.svg?color=E2AC00\u0026label=License\u0026style=plastic\u0026logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8%2F9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAAdgAAAHYBTnsmCAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAHSSURBVDiNpZLLa1NREMa%2FmXvzaG2lKDW2EdNqi6Ckxq5Kdy0UsnQTs1CrWxcidFPEnYumG%2FFfUHRloC5cBTU%2Bdi6Cr1QUYh9wqS3RWmqoNzf3zrgIN2DahkK%2B1Zw5v%2Flm5nCANkV%2BoC%2BiR6uQayHXeEBJa9N%2BdWKIHO85AGjQmApPWKVm5j%2BDWr5vxv1m3OOIQioE7hZImQEA3CuQP1zPrTOMM95McPLHfQBg32BuYXQxtxMtzOcTyY5pi7SHh7nfs7nfs%2FWwO9QxbdH8ywvJ3E60kFkY%2FeLXmX6wuNYzVdzoHFcJ3QWQC09YpUom9g4Aum6vft%2BLaUyQSl0dhKKUzWYdgqymL6ZPA0DgXC3uN9iPqa%2FgynU1nccAYDtdDz02rtSfmBor7sdQ9U0k%2Fmkpcicx8PO9z35YOZIYOVWew7b5tlY0PwbG7ZvF5d7Zkdjm52bGJJfHzsfKaVWkZYPhrRg4i22IBB0%2BJvVBXB6Ln%2Fx1WRXYxQQ49IgITwGq6V8CSEHdshZm45bf7SDMnqo%2Bi%2F6uZGKvWzHc6vIgatuAmhPV%2FPFLTDwIALKFlG7RkjGgBQAQleXQ5PqTlgZOvq8C4JB%2F9r42PiuU1Ou8YZnNNW3pH9Tv3ULkpzpnAAAAAElFTkSuQmCC\r\n[license-url]: https://github.com/ApexCaptain/Koconut/blob/master/LICENSE\r\n[node-version-image]: http://img.shields.io/node/v/koconut.svg?style=plastic\u0026color=378C37\u0026label=Node.js\u0026logo=node.js\r\n[node-version-url]: https://nodejs.org/download/\r\n\r\n\u003c!-- Basic --\u003e\r\n\r\n[koconut]: https://github.com/ApexCaptain/Koconut\r\n[git-hub page]: https://apexcaptain.github.io/Koconut/\r\n\r\n\u003c!-- Documents --\u003e\r\n\r\n[koconutentry]: https://apexcaptain.github.io/Koconut/classes/KoconutEntry.html\r\n[entry]: https://apexcaptain.github.io/Koconut/classes/Entry.html\r\n[koconutpair]: https://apexcaptain.github.io/Koconut/classes/KoconutPair.html\r\n[pair]: https://apexcaptain.github.io/Koconut/classes/Pair.html\r\n[koconutarray]: https://apexcaptain.github.io/Koconut/classes/KoconutArray.html\r\n[koconutset]: https://apexcaptain.github.io/Koconut/classes/KoconutSet.html\r\n[koconutmap]: https://apexcaptain.github.io/Koconut/classes/KoconutMap.html\r\n[koconutlocale]: https://apexcaptain.github.io/Koconut/enums/KoconutLocale.html\r\n[koconutloopsignal]: https://apexcaptain.github.io/Koconut/enums/KoconutLoopSignal.html\r\n[koconutconflictexception]: https://apexcaptain.github.io/Koconut/classes/KoconutConflictException.html\r\n[koconutindexoutofboundsexception]: https://apexcaptain.github.io/Koconut/classes/KoconutIndexOutOfBoundsException.html\r\n[koconutinvalidargumentexception]: https://apexcaptain.github.io/Koconut/classes/KoconutInvalidArgumentException.html\r\n[koconutnosuchelementexception]: https://apexcaptain.github.io/Koconut/classes/KoconutNoSuchElementException.html\r\n[koconutcomparable]: https://apexcaptain.github.io/Koconut/interfaces/KoconutComparable.html\r\n[koconutequatable]: https://apexcaptain.github.io/Koconut/interfaces/KoconutEquatable.html\r\n[koconutoption]: https://apexcaptain.github.io/Koconut/classes/KoconutOption.html\r\n\r\n\u003c!-- Outer or example --\u003e\r\n\r\n[promise]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise\r\n[maxby]: https://apexcaptain.github.io/Koconut/classes/KoconutArray.html#maxBy\r\n[maxbyornull]: https://apexcaptain.github.io/Koconut/classes/KoconutArray.html#maxByOrNull\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapexcaptain%2Fkoconut","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapexcaptain%2Fkoconut","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapexcaptain%2Fkoconut/lists"}