Socket
Socket
Sign inDemoInstall

bs-js-collections

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bs-js-collections - npm Package Compare versions

Comparing version 1.7.0 to 1.8.0

2

package.json
{
"name": "bs-js-collections",
"description": "Bindings to JavaScript primitive Set and Map types",
"version": "1.7.0",
"version": "1.8.0",
"scripts": {

@@ -6,0 +6,0 @@ "copy-git-hooks": "mkdir -p ./.git/hooks && cp -v ./hooks/* ./.git/hooks",

# `bs-js-collections`
Bindings to primitive JavaScript `Set` and `Map` types for BuckleScript/ReScript, plus
some useful bells and whistles.
Bindings to primitive JavaScript `Set` and `Map` types for
BuckleScript/ReScript.
In addition to bindings to the native API, this library adds a number
of functions useful for pure functional programming, such as:
* Conversion to/from various data structures such as arrays, lists,
dicts and `Belt` data structures
* `map`, `keep`, `reduce`, including `*WithKey` versions for the Map type
* Set operations such as `union`, `intersection` and `diff`
It is largely influenced by `Belt`, following similar naming
conventions and favoring fast-pipe argument order
(i.e. significant-data-first).
## Examples

@@ -26,4 +38,7 @@

// Filter the set
let my
Js.log(myIntSet->keep(i => i < 3)); // { 1, 2 }
// Filter and map the set
Js.log(myIntSet->keepMap(i => i == 2 ? None : Some(i->string_of_int))); // { '1', '3' }
Js.log(myIntSet->JsSet.size); // 2

@@ -42,10 +57,2 @@ ```

In addition to bindings to the native API, this library adds a number
of functions useful for pure functional programming, such as:
* Conversion to/from various data structures such as arrays, lists,
dicts and `Belt` data structures
* `map`, `keep`, `reduce`, including `*WithKey` versions for the Map type
* Set operations such as `union`, `intersection` and `diff`
See the `.rei` files for more tails, and unit tests examples of usage.

@@ -52,0 +59,0 @@ In general we try to follow naming conventions similar to `Belt` and

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc