@@ -13,6 +13,8 @@ Features from the Rust language in JavaScript: Provides [Traits](https://doc.rus
13
13
- [ Table of Contents] ( #table-of-contents )
14
14
- [ Status] ( #status )
15
15
- [ Usage & Features] ( #usage--features )
16
+ - [ Hashing] ( #hashing )
17
+ - [ Testing of examples in Documentation] ( #doctest )
16
18
- [ Sequence/Iterators] ( #sequenceiterators )
17
19
- [ Objects as Sequences] ( #objects-as-sequences )
18
20
- [ Reverse Currying] ( #reverse-currying )
@@ -23,6 +25,10 @@ Features from the Rust language in JavaScript: Provides [Traits](https://doc.rus
23
25
- [ Typing utilities] ( #typing-utilities )
24
26
- [ Functional Utilities] ( #functional-utilities )
25
27
- [ Change Log] ( #change-log )
28
+ - [ 1.8.0] ( #180 )
29
+ - [ 1.7.0] ( #170 )
30
+ - [ 1.6.0] ( #160 )
31
+ - [ 1.5.0] ( #150 )
26
32
- [ 1.4.0] ( #140 )
27
33
- [ 1.3.0] ( #130 )
28
34
- [ 1.2.0] ( #120 )
@@ -47,6 +53,44 @@ Features from the Rust language in JavaScript: Provides [Traits](https://doc.rus
47
53
``` bash,notest
48
54
$ npm add ferrum
49
55
```
56
+ <a name =" hashing " ></a >
57
+ ### Hashing & Hash Tables
58
+
59
+ Ferrum features an extensible, reliable infrastructure for object hashing
60
+ including an implementation of
61
+ [ HashMap] ( https://www.ferrumjs.org/module-hashing-HashMap.html ) and
62
+ [ HashSet] ( https://www.ferrumjs.org/module-hashing-HashSet.html ) .
63
+
64
+ It supports [ user defined hash functions] ( ) (e.g. blake2 instead of xxhash).
65
+ Support for all of the standard types is provided out of the box and
66
+ [ support for user defined types] ( https://www.ferrumjs.org/module-hashing-Hashable.html )
67
+ or third party types can be provided via the trait infrastructure.
68
+
69
+ You could even integrate the
70
+ [ object-hash] ( https://www.npmjs.com/package/object-hash ) package to add support
71
+ for hashing arbitrary third party types! See "Sophisticated hasher integrating
72
+ object hash" in the
73
+ [ hasher trait] ( https://www.ferrumjs.org/module-hashing-Hasher.html ) documentation.
74
+
75
+ ``` js
76
+ const assert = require (' assert' );
77
+ const { HashMap } = require (' ferrum' );
78
+
79
+ const m = new Map ([[{}, 42 ], [7 , " seven" ]]);
80
+ assert .strictEqual (m .get (7 ), " seven" );
81
+ assert .strictEqual (m .get ({}), undefined ); // Identity based lookup
82
+
83
+ const hm = new HashMap ([[{}, 42 ], [7 , " seven" ]]);
84
+ assert .strictEqual (m .get (7 ), " seven" );
85
+ assert .strictEqual (m .get ({}), 42 ); // Content based lookup
86
+ ```
87
+
88
+ <a name =" doctest " ></a >
89
+ ### Testing of Examples
90
+
91
+ Have you ever found out that some of the examples in your api documentation
92
+ or readme contained bugs? You can now use the [ Ferrum Doctest] ( https://github.com/adobe/ferrum.doctest )
93
+ companion package to run your examples as part of your regular test harness!
50
94
51
95
<a name =" sequence-iterators " ></a >
52
96
### Sequence/Iterators
@@ -599,6 +643,27 @@ assertEquals(pair(2)(1), /* => */ [1,2]);
599
643
<a name =" changelog " ></a >
600
644
## Change Log
601
645
646
+ ### Features
647
+
648
+ ### 1.8.0
649
+
650
+ * Move many tests into the documentation examples ([ c033897] ( https://github.com/adobe/ferrum/commit/c033897fc9bc224 ) )
651
+
652
+ ### 1.7.0
653
+
654
+ * Use ferrum.doctest to make sure examples are valid js code ([ b0f9d45] ( https://github.com/adobe/ferrum/commit/b0f9d45 ) )
655
+
656
+
657
+ ### 1.6.0
658
+
659
+ * Add mutate(), apply() ([ 8d28f73] ( https://github.com/adobe/ferrum/commit/d4e3a7a750afe58696097b5f75117c555291d01b ) )
660
+
661
+ ### 1.5.0
662
+
663
+ * Alias flatten() -> flat() ([ 2abad3f] ( https://github.com/adobe/ferrum/commit/2abad3f4cc72bbad7ee19da8f59d4917 ) )
664
+ * group(), multiline() and takeUntil() ([ 0bc0ca0] ( https://github.com/adobe/ferrum/commit/0bc0ca0059b6a7f8f61cf ) )
665
+
666
+
602
667
### 1.4.0
603
668
604
669
* Add intersperse() ([ 8d28f73] ( https://github.com/adobe/ferrum/commit/8d28f73 ) )
0 commit comments