{"id":13721101,"url":"https://github.com/reasonml-community/bs-immutablejs","last_synced_at":"2025-04-09T09:32:19.943Z","repository":{"id":85336764,"uuid":"82159315","full_name":"reasonml-community/bs-immutablejs","owner":"reasonml-community","description":"Reason + BuckleScript bindings to Immutable.js","archived":false,"fork":false,"pushed_at":"2018-07-10T21:48:09.000Z","size":12,"stargazers_count":29,"open_issues_count":1,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-24T04:06:38.280Z","etag":null,"topics":["bucklescript","data-structures","immutable","javascript","reasonml"],"latest_commit_sha":null,"homepage":null,"language":"C++","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/reasonml-community.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}},"created_at":"2017-02-16T08:46:59.000Z","updated_at":"2022-09-22T20:04:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"80413565-5315-44a0-903f-72300d1eba33","html_url":"https://github.com/reasonml-community/bs-immutablejs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reasonml-community%2Fbs-immutablejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reasonml-community%2Fbs-immutablejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reasonml-community%2Fbs-immutablejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reasonml-community%2Fbs-immutablejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reasonml-community","download_url":"https://codeload.github.com/reasonml-community/bs-immutablejs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248012546,"owners_count":21033218,"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","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":["bucklescript","data-structures","immutable","javascript","reasonml"],"created_at":"2024-08-03T01:01:12.460Z","updated_at":"2025-04-09T09:32:19.660Z","avatar_url":"https://github.com/reasonml-community.png","language":"C++","funding_links":[],"categories":["C++"],"sub_categories":[],"readme":"# bs-immutablejs\n\n**Note**: these are **bindings** to the [Immutable.js](https://facebook.github.io/immutable-js/) library. These are only meant to be used to interoperate with existing JavaScript code; In Reason/BS, we have more lightweight immutable (and optionally mutable) data structures by default (list, record, hashmap, set, and upcoming data structures). New Reason/BS projects projects don't need bs-immutablejs.\n\n## Documentation\n\nThe source is a [single file](https://github.com/reasonml-community/bs-immutablejs/blob/master/src/immJsRe.re) of BuckleScript `external`s. The API corresponds to Immutable.js' API.\n\nExample usage:\n\n```reason\nlet greeting = ImmutableJsRe.List.fromArray([|\"hello\", \"world\"|]);\n\nlet extendedGreeting = ImmutableJsRe.List.push(greeting, \"how are you\");\n\nlet reallyExtendedGreeting =\n  ImmutableJsRe.List.(\n    extendedGreeting\n    |. push(\"I'm fine\")\n    |. push(\"thank you\")\n    |. push(\"and you?\")\n  );\n```\n\nGenerated code:\n\n```js\nvar greeting = Immutable.List(/* array */[\n      \"hello\",\n      \"world\"\n    ]);\nvar extendedGreeting = greeting.push(\"how are you\");\nextendedGreeting.push(\"I'm fine\").push(\"thank you\").push(\"and you?\");\n```\n\n## Transitioning to Idiomatic Reason/BuckleScript Data Structures\n\nHere's a table of Immutable.js data structures and their Reason/BuckleScript equivalents. Reason/BS provide the data structures out of the box.\n\nImmutable.js | Reason/BuckleScript\n----|-----\nList | List\nMap | Map\nOrderedMap | [Belt Map](https://bucklescript.github.io/bucklescript/api/Belt.Map.html)\nSet | Set\nOrderedSet | [Belt Set](https://bucklescript.github.io/bucklescript/api/Belt.Map.html)\nStack | List\nRecord | Record\nSeq | Use `lazy`\n\n## Contributing\n\nPrerequisite: `https://github.com/reasonml/reason-cli`.\n\n```\ngit clone https://github.com/BuckleTypes/bs-immutablejs.git\ncd bs-immutablejs\nnpm install\nnpm start\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freasonml-community%2Fbs-immutablejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freasonml-community%2Fbs-immutablejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freasonml-community%2Fbs-immutablejs/lists"}