{"id":15388061,"url":"https://github.com/lodin/rustils","last_synced_at":"2026-04-18T00:01:50.023Z","repository":{"id":65373262,"uuid":"80161756","full_name":"Lodin/rustils","owner":"Lodin","description":"Port of some powerful Rust utils to JavaScript","archived":false,"fork":false,"pushed_at":"2017-01-30T23:29:36.000Z","size":174,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-16T02:41:28.741Z","etag":null,"topics":["javascript","maybe","monad","option","result","rust","typescript"],"latest_commit_sha":null,"homepage":"https://lodin.github.io/rustils/","language":"TypeScript","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/Lodin.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":"2017-01-26T22:26:14.000Z","updated_at":"2019-09-03T08:55:52.000Z","dependencies_parsed_at":"2023-01-20T02:03:38.912Z","dependency_job_id":null,"html_url":"https://github.com/Lodin/rustils","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/Lodin/rustils","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lodin%2Frustils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lodin%2Frustils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lodin%2Frustils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lodin%2Frustils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Lodin","download_url":"https://codeload.github.com/Lodin/rustils/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lodin%2Frustils/sbom","scorecard":{"id":85340,"data":{"date":"2025-08-11","repo":{"name":"github.com/Lodin/rustils","commit":"916964b1d796620577b78da95b7fb1c45cb11c27"},"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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-15T06:49:16.861Z","repository_id":65373262,"created_at":"2025-08-15T06:49:16.862Z","updated_at":"2025-08-15T06:49:16.862Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31950891,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-17T17:29:20.459Z","status":"ssl_error","status_checked_at":"2026-04-17T17:28:47.801Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["javascript","maybe","monad","option","result","rust","typescript"],"created_at":"2024-10-01T14:55:23.772Z","updated_at":"2026-04-18T00:01:50.002Z","avatar_url":"https://github.com/Lodin.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rustils\n\n[![Latest Stable Version](https://img.shields.io/npm/v/rustils.svg)](https://www.npmjs.com/package/rustils)\n[![License](https://img.shields.io/npm/l/rustils.svg)](./LICENSE)\n[![Build Status](https://img.shields.io/travis/Lodin/rustils/master.svg)](https://travis-ci.org/Lodin/rustils)\n\n[![Test Coverage](https://img.shields.io/codecov/c/github/Lodin/rustils/master.svg)](https://codecov.io/gh/Lodin/rustils)\n\nA port of some powerful Rust abstractions to JavaScript. By now it contains following modules:\n* **[Option](https://lodin.github.io/rustils/modules/option.html)** ([rust doc](https://doc.rust-lang.org/std/option/index.html)) - an abstraction designed to\nhandle operations with `null` in the functional style, an implementation of functional monad \n`Maybe`.\n* **[Result](https://lodin.github.io/rustils/modules/result.html)** ([rust doc](https://doc.rust-lang.org/std/result/)) - an abstraction that is able to \nsupplement - or even replace, - the standard exception scheme. Depending on function result it\nmay wrap success or error value and is able to be processed in accordance with this result.\n\n## Documentation\nComplete project documentation can be found [here](https://lodin.github.io/rustils/).\n\n## Installation\nTo install `rustils` run the following command in the console:\n```bash\n$ npm i --save rustils\n```\n## Usage\nImport package in your code and you are ready:\n```typescript\nimport {Some, Option} from 'rustils';\n\nconst option: Option\u003cnumber\u003e = Some(10);\nassert.equal(option.map(v =\u003e v + 50).unwrap(), 60);\n```\nYou can see detailed using in [API reference](https://lodin.github.io/rustils/).\n\n### JavaScript usage\nAs you can see, all examples is written in Typescript here. But if you want to use this library\nwith JavaScript, there is no problem. Just throw out all the types and use the package.\n```javascript\nvar rustils = require('rustils');\nvar Some = rustils.Some;\nvar None = rustils.None;\n\nvar option = Some(10);\nassert.equal(option.map(function(v) { return v + 50; }).unwrap(), 60);\n```\n\n## About project\nThis project is highly inspired by [r-result](https://github.com/Havvy/result). `r-result` is a\nnice project, but it lacks typescript support and implements only `Result` type, without `Option`.\nSo I decided to create my own rust-port project. Hope it will be useful for anyone. \n\nThe `rustils` type system is made as close as it can to the Rust original. Some function like \n`take` or `as_ref` that has it's use in Rust, in JavaScript does not make sense, so they are not\nimplemented. \n\n## License\nInformation about license can be found [here](./LICENSE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flodin%2Frustils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flodin%2Frustils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flodin%2Frustils/lists"}