Skip to content

Commit bf4f3e7

Browse files
authored
Merge pull request #84 from wingyplus/fix-doc
Fix Js.Dict2 mentioned in Js.Dict documentation
2 parents e30a3d4 + cec7bc8 commit bf4f3e7

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

pages/docs/manual/latest/api/js/dict.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Js.Dict.unsafeGet(ages, "Paul") // returns undefined
6060
let set: (t<'a>, key, 'a) => unit
6161
```
6262

63-
`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.*
63+
`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.*
6464

6565
```res example
6666
Js.Dict.set(ages, "Maria", 31)

pages/docs/manual/v8.0.0/api/js/dict.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<Intro>
44

5-
Provide utilities for JS dictionary object.
5+
Provide utilities for JS dictionary object.
66

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

@@ -51,7 +51,7 @@ let unsafeGet: (t('a), key) => 'a;
5151
```
5252
`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).
5353

54-
```re example
54+
```re example
5555
Js.Dict.unsafeGet(ages, "Fred") == 49;
5656
Js.Dict.unsafeGet(ages, "Paul"); // returns undefined
5757
```
@@ -62,7 +62,7 @@ Js.Dict.unsafeGet(ages, "Paul"); // returns undefined
6262
let set: (t('a), key, 'a) => unit;
6363
```
6464

65-
`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.*
65+
`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.*
6666

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

159159
`map(f, dict)` maps `dict` to a new dictionary with the same keys, using the function `f` to map each value.
160-
160+
161161
```re example
162162
let prices = Js.Dict.fromList([("pen", 1.00), ("book", 5.00), ("stapler", 7.00)]);
163163

0 commit comments

Comments
 (0)