{"id":37542827,"url":"https://github.com/valtermro/tolb","last_synced_at":"2026-01-16T08:47:28.168Z","repository":{"id":57377803,"uuid":"75003191","full_name":"valtermro/tolb","owner":"valtermro","description":"A light and fast set of javascript utility functions","archived":false,"fork":false,"pushed_at":"2018-05-27T13:00:28.000Z","size":293,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-13T14:07:44.755Z","etag":null,"topics":["functional-programming","javascript","modules","utilities"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/valtermro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-11-28T18:40:38.000Z","updated_at":"2025-07-25T18:31:05.000Z","dependencies_parsed_at":"2022-09-19T03:30:59.258Z","dependency_job_id":null,"html_url":"https://github.com/valtermro/tolb","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/valtermro/tolb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valtermro%2Ftolb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valtermro%2Ftolb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valtermro%2Ftolb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valtermro%2Ftolb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/valtermro","download_url":"https://codeload.github.com/valtermro/tolb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valtermro%2Ftolb/sbom","scorecard":{"id":915484,"data":{"date":"2025-08-11","repo":{"name":"github.com/valtermro/tolb","commit":"d20e6b6a89d5012fa900b3574853124f42c7699e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":"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":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"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":"SAST","score":0,"reason":"no SAST tool detected","details":["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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"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":"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":"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: 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":"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":"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"}}]},"last_synced_at":"2025-08-24T20:49:00.582Z","repository_id":57377803,"created_at":"2025-08-24T20:49:00.583Z","updated_at":"2025-08-24T20:49:00.583Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478048,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["functional-programming","javascript","modules","utilities"],"created_at":"2026-01-16T08:47:27.479Z","updated_at":"2026-01-16T08:47:28.159Z","avatar_url":"https://github.com/valtermro.png","language":"JavaScript","readme":"## About the library\nThis library contains a set of javascript helper functions designed to allow a\nmore functional style of code.  \nEach function takes the data upon which to operate as the last argument, and almost\nall functions can be partially applied with any number of arguments and in any\nnumber of operations.  \nThe function `reduce` of the `list` package, for example, takes 3 arguments and\ncan be used:\n* Passing all 3 arguments:\n  ```javascript\n  const result = reduce(sum, 0, arrayOfNumbers);\n  ```\n\n* Omiting the last argument (the data):\n  ```javascript\n  const waitingData = reduce(sum, 0);\n  const result = waitingData(arrayOfNumbers);\n  ```\n\n* Omiting the last two arguments:\n  ```javascript\n  const waitingLastTwoArgs = reduce(sum);\n  const result = waitingLastTwoArgs(0, arrayOfNumbers);\n  // or\n  const nowWaitingData = waitingLastTwoArgs(0);\n  const result = nowWaitingData(arrayOfNumbers);\n  ```\n\n**Quick notes**:\n* This library is meant to be light and simple. For more robust (and heavier)\nalternatives, check out [lodash/fp](https://github.com/lodash/lodash/wiki/FP-Guide)\nand [ramda](http://ramdajs.com/). \n* I say that **almost** all functions can be partially applied because some functions\nin the lib are used to create functions, and those created functions can't be\npartially applied by default.\n\n## Installation\nThe only way to get this library is through npm.  \n*Use a module bundler like [webpack](https://webpack.github.io/) to use it on the browser.*\n```\nnpm install [--save] tolb\n```\n\n## Usage\nThis library is distributed as a set of packages, so `require` the desired package,\nrather than the module itself:\n```javascript\nconst object = require('tolb/object');\n\nobject.values({ one: 1, two: 2 }); //=\u003e [1, 2]\n```\n\nIt's also possible to pull out only a specific function:\n```javascript\nconst map = require('tolb/list/map');\nconst { toUpper } = require('tolb/string');\n\nmap(toUpper, ['foo', 'bar']); //=\u003e ['FOO', 'BAR']\n```\n\n## Documentation\nEach package is represented by a directory inside the `src` folder, and each function\nin that package is in its own file. Inside each file you will find a\n[JSDoc](http://usejsdoc.org/) comment explaining what the function does. Also,\nalongside with the source files, you will find test files that may help you to\nunderstand each function by showing you some usage examples.  \nThat's the only documentation I have. By now...\n\n**A quick note**.  \nSome packages are designed to work with a specific datatype. The functions in\nthe `math` package, for example, expect numbers, and the functions in the `string`\npackage expect, well, strings.  \nIf the wrong type of argument is passed, an error\nmay be thrown **by the javascript runtime**.or the function may fail silently.\nMake sure to pass the right argument to each function.\n\n## The \"next\" bundle\nThis module includes a `next` bundle. The only difference from `next` to the normal\nbundle is that it uses [es6 module syntax](http://exploringjs.com/es6/ch_modules.html),\ninstead of commonJS.\n\nIf you're using a module bundler that takes advantage of the static nature of es6\nmodules ([rollup.js](http://rollupjs.org/)\n[does it](https://blog.mariusschulz.com/2016/06/12/bundling-and-tree-shaking-with-rollup-and-ecmascript-2015-modules),\nthe v2 of webpack [does it too](http://www.2ality.com/2015/12/webpack-tree-shaking.html)),\nyou might want to use this one. \n\nPlease, note some differences in the way packages are imported when using the\n`next` bundle.  \n*I'm assuming that, because you're using `next`, you're also using the es6 syntax to\ndo your imports.*  \n\nThis:\n```javascript\nconst object = require('tolb/object');\nconst { map } = require('tolb/list');\nconst compose = require('tolb/combinator/compose');\n```\nbecomes this:\n```javascript\nimport * as object from 'tolb/next/object';\nimport { map } from 'tolb/next/list';\nimport compose from 'tolb/next/combinator/compose';\n```\n\n### Replace `tolb/next` with `tolb` in `import`s\nIf you're using webpack, you can add the following to your configuration file:\n```javascript\n    // ...\n    resolve: {\n      alias: {\n        tolb: 'tolb/next',\n      },\n    },\n    // ...\n```\nand then `import` from `tolb`\n```javascript\n// `keys` will be imported from `tolb/next/object` \nimport { keys } from 'tolb/object';\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaltermro%2Ftolb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvaltermro%2Ftolb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaltermro%2Ftolb/lists"}