{"id":19523681,"url":"https://github.com/shanoaice/bethlehem","last_synced_at":"2026-06-11T03:31:50.794Z","repository":{"id":38427206,"uuid":"233851845","full_name":"shanoaice/bethlehem","owner":"shanoaice","description":"A minimal functional programming library for JavaScript.","archived":false,"fork":false,"pushed_at":"2023-01-07T04:29:58.000Z","size":1631,"stargazers_count":1,"open_issues_count":28,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-25T12:07:33.580Z","etag":null,"topics":["functional-programming","ramda","typescript"],"latest_commit_sha":null,"homepage":"https://ksryy.github.io/bethlehem","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/shanoaice.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":"2020-01-14T13:50:20.000Z","updated_at":"2023-03-17T12:21:47.000Z","dependencies_parsed_at":"2023-02-06T11:46:22.626Z","dependency_job_id":null,"html_url":"https://github.com/shanoaice/bethlehem","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/shanoaice/bethlehem","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shanoaice%2Fbethlehem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shanoaice%2Fbethlehem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shanoaice%2Fbethlehem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shanoaice%2Fbethlehem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shanoaice","download_url":"https://codeload.github.com/shanoaice/bethlehem/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shanoaice%2Fbethlehem/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34181554,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-11T02:00:06.485Z","response_time":57,"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":["functional-programming","ramda","typescript"],"created_at":"2024-11-11T00:44:22.116Z","updated_at":"2026-06-11T03:31:50.779Z","avatar_url":"https://github.com/shanoaice.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bethlehem\n\n[![Github Actions Status](https://github.com/KsRyY/bethlehem/workflows/CI/badge.svg)](https://github.com/KsRyY/bethlehem/actions) [![Github Pages Status](https://github.com/KsRyY/bethlehem/workflows/Github%20Pages/badge.svg)](https://ksryy.github.io/bethlehem) [![codecov](https://codecov.io/gh/KsRyY/bethlehem/graph/badge.svg)](https://codecov.io/gh/KsRyY/bethlehem) [![npm weekly downloads](https://badgen.net/npm/dw/bethlehem)](http://npm.im/bethlehem)\n\nBethlehem is a minimal functional programming library for JavaScript. It is inspired by [Ramda](https://github.com/ramda/ramda) but has some significant differences.\n\n## Usage\n\nFirst, install bethlehem (tips: because there are known problems before v1.3.0, it is better to set your minimum version of bethlehem to 1.3.0):\n\n```bash\nyarn add bethlehem@^1.3.0\n# or npm\nnpm i bethlehem@^1.3.0\n```\n\nThen, cherry-pick the function(s) you want:\n\n```js\nimport { compose, add } from 'bethlehem'\n// you can use cjs if you don't want tree-shaking\nconst { compose, add } = require('bethlehem')\n```\n\nOr import everything:\n\n```js\nimport * as B from 'bethlehem'\n// you can use cjs if you don't want tree-shaking\nconst B = require('bethlehem')\n```\n\nBecause bethlehem specified ESM build file in the `module` field of `package.json`, your module bundler will do tree-shaking for you.\n\nIf you want to use bethlehem without any bundler with your browser, you can use the UMD build. Add a script tag to your HTML file:\n\n```html\n\u003cscript src=\"https://unpkg.com/bethlehem/dist/b.umd.production.js\"\u003e\u003c/script\u003e\n```\n\nAnd you can access everything in the `B` global variable.\n\n## [Documentation](https://ksryy.github.io/bethlehem)\n\nThere could be some undocumented functions, but there should be a similar one in Ramda. Most of the time, referring to their [documentation](https://ramdajs.com/docs) would probably inform you.\n\n## Benchmark\n\nThe benchmarks between bethlehem, ramda and rambda is still a work in progress. There is an [external repo](https://github.com/KsRyY/bethlehem-impl-bench) that stores some benchmark data about possible internal implementations of bethlehem.\n\n## Development\n\nBefore running any command, install all the dependencies using `yarn install` or `npm install`.\n\n```bash\nyarn watch\n# or npm\nnpm run watch\n```\n\nThis will run [ava](http://ava.li) in watch mode. Test suite will be rerun if there's any change in `src` or in the test file.\n\n```bash\nyarn test\n# or npm\nnpm run test\n```\n\nThis will run [ava](http://ava.li) in verbose mode. All test suites will be ran and their titles will be displayed in the output.\n\n```bash\nyarn build\n# or npm\nnpm run build\n```\n\nThis will build all source code and put them in the `dist` folder. Declarations will be also built.\n\n```bash\nyarn build:docs\n# or npm\nnpm run build:docs\n```\n\nThis will build the documents into the `docs` folder using TypeDoc.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshanoaice%2Fbethlehem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshanoaice%2Fbethlehem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshanoaice%2Fbethlehem/lists"}