{"id":41122432,"url":"https://github.com/masonkmeyer/barely","last_synced_at":"2026-01-22T17:41:49.133Z","repository":{"id":90462516,"uuid":"82493768","full_name":"masonkmeyer/barely","owner":"masonkmeyer","description":"A \"functional\" library for typescript","archived":false,"fork":false,"pushed_at":"2017-10-16T13:47:03.000Z","size":27,"stargazers_count":13,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-09T02:23:47.632Z","etag":null,"topics":["maybe","typescript"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/masonkmeyer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"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":"2017-02-19T22:21:16.000Z","updated_at":"2023-05-04T05:08:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"50d6d1d5-93d8-486c-a02b-8c117d3b26fa","html_url":"https://github.com/masonkmeyer/barely","commit_stats":{"total_commits":12,"total_committers":3,"mean_commits":4.0,"dds":0.5,"last_synced_commit":"b58484f953ce048dcfcc45613f09aabe998c68fa"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/masonkmeyer/barely","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masonkmeyer%2Fbarely","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masonkmeyer%2Fbarely/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masonkmeyer%2Fbarely/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masonkmeyer%2Fbarely/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/masonkmeyer","download_url":"https://codeload.github.com/masonkmeyer/barely/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masonkmeyer%2Fbarely/sbom","scorecard":{"id":622901,"data":{"date":"2025-08-11","repo":{"name":"github.com/masonkmeyer/barely","commit":"b58484f953ce048dcfcc45613f09aabe998c68fa"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/12 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":"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":"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":"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":"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":"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":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-21T05:34:54.935Z","repository_id":90462516,"created_at":"2025-08-21T05:34:54.935Z","updated_at":"2025-08-21T05:34:54.935Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28667870,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T17:07:18.858Z","status":"ssl_error","status_checked_at":"2026-01-22T17:05:02.040Z","response_time":144,"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":["maybe","typescript"],"created_at":"2026-01-22T17:41:48.419Z","updated_at":"2026-01-22T17:41:49.120Z","avatar_url":"https://github.com/masonkmeyer.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Barely Functional \n\n![status](https://travis-ci.org/masonkmeyer/barely.svg?branch=master)\n\nA \"functional programming library written in [TypeScript](https://www.typescriptlang.org/). \n\n``` npm install barely --save ```\n\n\u003e This library favors accurate typing over functionality. Where possible, it limits methods to four parameters. It fiddles with method signatures to more accurately reflect the types. Generally, it makes concessions to favor common scenarios. \n \n## Current \n### Monads\n#### Maybe\nThe maybe monad is incredibly useful. It helps you deal with a common problem\u0026mdash;optional values. \n```typescript\n\ninterface Person {\n    first:string;\n    last: string;\n    passport: string;\n    company: Company\n}\n\ninterface Company {\n    name: string;\n}\n\nlet me: Person = {\n    first: \"Mason\",\n    last: \"Meyer\",\n    passport: null, \n    company: null\n};\n\n// Let's try and format it or return an empty string\nlet passportNumber:string = Maybe.just(me)\n     .map(x =\u003e `$#{x.passport}`)\n     .else(() =\u003e \"\");\n\n// Maybes :heart: to be chained. \nlet companyNameMaybe:Maybe\u003cstring\u003e = Maybe.just(me)\n            .map(x =\u003e x.company)\n            .map(x =\u003e x.name);\n            \nlet bigCompanyName:Maybe\u003cstring\u003e = companyNameMaybe.map(x =\u003e x.name.toUpperCase());\nlet companyName = companyNameMaybe.orError('You need to have a company name');\n\n```\n\n### Pipe and Compose\n\n#### Pipe\n\nPipe helps you combine functions (from left to right) into a new function. Conceptually, it is equal to:\n\n```\npipe(fn1, fn2, fn3)(arguments) == fn3(fn2(fn1(arguments)));\n```\n\nExamples, \n\n```typescript\n// Adds an exlaimation point to the end of a string\nlet exclaim = (x: string) =\u003e x + \"!\";\n// func to upper case a string\nlet toUpper = (x: string) =\u003e x.toUpperCase();\n\nlet yell = pipe(toUpper, exclaim);\n\n// HELLO WORLD!\nyell('hello world');\n\n// We can also combine this new function in to new functions\nlet twice = (x: string) =\u003e x + ' ' + x;\nlet yellTwice = pipe(yell, twice);\n\n// HI! Hi!\nyellTwice('hi');\n\n```\n\n#### Compose\n\nCompose is similar to pipe except it processes right to left. It is equal to\n\n```\npipe(fn1, fn2, fn3)(arguments) == fn1(fn2(fn3(arguments)));\n```\n\n```typescript\n  let plusOne = (x:number) =\u003e x + 1;\n  let timesTwo = (x: number) =\u003e x * 2;\n  let plusTwo = (x: number) =\u003e x + 2;\n\n  // Compose goes right to left\n  // 9  = ((2 + 2) * 2) + 1\n  compose(plusOne, timesTwo, plusTwo)(2);\n\n  // Pipe goes left to right\n  // 8 = ((2 + 1) * 2) + 2\n  pipe(plusOne, timesTwo, pluseTwo)(2);  \n\n```\n\n## Curry\n\nMakes a function of multiple parameters into a sequence of single param functions. You can think of it like this:\n\n```\ncurry(fn(x, y)) === (x) =\u003e (y) =\u003e result\n``` \n\nFor example, \n\n```typescript\nlet multiply = (x: number, y: number) =\u003e x * y;\n\nlet double = curry(multiply, 2);\n\n// Typescript will automatically type this as (x:number) =\u003e number\n// Result is 12\ndouble(6);\n\n```\n\n## Future\n\n- [] Identity Monad\n- and more...\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmasonkmeyer%2Fbarely","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmasonkmeyer%2Fbarely","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmasonkmeyer%2Fbarely/lists"}