Skip to content

Fix Js.Dict2 mentioned in Js.Dict documentation #84

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pages/docs/manual/latest/api/js/dict.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Js.Dict.unsafeGet(ages, "Paul") // returns undefined
let set: (t<'a>, key, 'a) => unit
```

`Js.Dict2.set(dict, key, value)` sets the key/value in the dictionary `dict`. If the key does not exist, and entry will be created for it. *This function modifies the original dictionary.*
`Js.Dict.set(dict, key, value)` sets the key/value in the dictionary `dict`. If the key does not exist, and entry will be created for it. *This function modifies the original dictionary.*

```res example
Js.Dict.set(ages, "Maria", 31)
Expand Down
8 changes: 4 additions & 4 deletions pages/docs/manual/v8.0.0/api/js/dict.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<Intro>

Provide utilities for JS dictionary object.
Provide utilities for JS dictionary object.

**Note:** This module's examples will assume this predeclared dictionary:

Expand Down Expand Up @@ -51,7 +51,7 @@ let unsafeGet: (t('a), key) => 'a;
```
`Js.Dict.unsafeGet(key)` returns the value if the key exists, otherwise an `undefined` value is returned. Use this only when you are sure the key exists (i.e. when having used the `keys()` function to check that the key is valid).

```re example
```re example
Js.Dict.unsafeGet(ages, "Fred") == 49;
Js.Dict.unsafeGet(ages, "Paul"); // returns undefined
```
Expand All @@ -62,7 +62,7 @@ Js.Dict.unsafeGet(ages, "Paul"); // returns undefined
let set: (t('a), key, 'a) => unit;
```

`Js.Dict2.set(dict, key, value)` sets the key/value in the dictionary `dict`. If the key does not exist, and entry will be created for it. *This function modifies the original dictionary.*
`Js.Dict.set(dict, key, value)` sets the key/value in the dictionary `dict`. If the key does not exist, and entry will be created for it. *This function modifies the original dictionary.*

```re example
Js.Dict.set(ages, "Maria", 31)
Expand Down Expand Up @@ -157,7 +157,7 @@ let map: ((. 'a) => 'b, t('a)) => t('b);
```

`map(f, dict)` maps `dict` to a new dictionary with the same keys, using the function `f` to map each value.

```re example
let prices = Js.Dict.fromList([("pen", 1.00), ("book", 5.00), ("stapler", 7.00)]);

Expand Down