File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed
Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 33 *
44 * @example from "hash" include Hash
55 *
6+ * @example Hash.hash(1)
7+ * @example Hash.hash("Hello World")
8+ *
69 * @since v0.1.0
710 */
811module Hash
@@ -237,6 +240,9 @@ let rec hashOne = (val, depth) => {
237240 * @param anything: The value to hash
238241 * @returns A hash for the given value
239242 *
243+ * @example assert Hash.hash(1) == Hash.hash(1)
244+ * @example assert Hash.hash("Hello World") == Hash.hash("Hello World")
245+ *
240246 * @since v0.1.0
241247 */
242248@unsafe
Original file line number Diff line number Diff line change @@ -13,6 +13,14 @@ No other changes yet.
1313from "hash" include Hash
1414```
1515
16+ ``` grain
17+ Hash.hash(1)
18+ ```
19+
20+ ``` grain
21+ Hash.hash("Hello World")
22+ ```
23+
1624## Values
1725
1826Functions and constants included in the Hash module.
@@ -42,3 +50,13 @@ Returns:
4250| ----| -----------|
4351| ` Number ` | A hash for the given value|
4452
53+ Examples:
54+
55+ ``` grain
56+ assert Hash.hash(1) == Hash.hash(1)
57+ ```
58+
59+ ``` grain
60+ assert Hash.hash("Hello World") == Hash.hash("Hello World")
61+ ```
62+
You can’t perform that action at this time.
0 commit comments