Browse code
chore(prettier): formatting
Edward Langley authored on 26/03/2022 07:38:54
Showing 2 changed files
Showing 2 changed files
... | ... |
@@ -1,6 +1,6 @@ |
1 | 1 |
#+TITLE: README for js-generic-functions |
2 | 2 |
#+AUTHOR: Ed L |
3 |
-#+HTML_HEAD: <link rel="stylesheet" href="./colors.css"> |
|
3 |
+#+HTML_HEAD: <link rel="stylesheet" href="./colors.css" /> |
|
4 | 4 |
#+EXPORT_FILE_NAME: docs/index.html |
5 | 5 |
|
6 | 6 |
[[https://www.npmjs.com/package/js-generic-functions][https://img.shields.io/npm/v/js-generic-functions.svg]] [[https://circleci.com/gh/fiddlerwoaroof/js-generic-functions.svg?style=svg]] |
... | ... |
@@ -2,7 +2,7 @@ |
2 | 2 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
3 | 3 |
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> |
4 | 4 |
<head> |
5 |
- <!-- 2022-03-26 Sat 00:19 --> |
|
5 |
+ <!-- 2022-03-26 Sat 00:38 --> |
|
6 | 6 |
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> |
7 | 7 |
<meta name="viewport" content="width=device-width, initial-scale=1" /> |
8 | 8 |
<title>README for js-generic-functions</title> |
... | ... |
@@ -463,13 +463,13 @@ |
463 | 463 |
<h2>Table of Contents</h2> |
464 | 464 |
<div id="text-table-of-contents" role="doc-toc"> |
465 | 465 |
<ul> |
466 |
- <li><a href="#orgcc8452b">1. What is this?</a></li> |
|
466 |
+ <li><a href="#org071b24a">1. What is this?</a></li> |
|
467 | 467 |
<li> |
468 |
- <a href="#org3a3b812">2. Docs</a> |
|
468 |
+ <a href="#org0f0b569">2. Docs</a> |
|
469 | 469 |
<ul> |
470 |
- <li><a href="#org8276ba5">2.1. Basic Usage</a></li> |
|
470 |
+ <li><a href="#org1cbf251">2.1. Basic Usage</a></li> |
|
471 | 471 |
<li> |
472 |
- <a href="#orgb8af4f3">2.2. Other sorts of specializers</a> |
|
472 |
+ <a href="#org4edb380">2.2. Other sorts of specializers</a> |
|
473 | 473 |
</li> |
474 | 474 |
</ul> |
475 | 475 |
</li> |
... | ... |
@@ -485,12 +485,11 @@ |
485 | 485 |
/></a> |
486 | 486 |
<img |
487 | 487 |
src="https://circleci.com/gh/fiddlerwoaroof/js-generic-functions.svg?style=svg" |
488 |
- alt="js-generic-functions.svg?style=svg" |
|
489 |
- /> |
|
488 |
+ alt="js-generic-functions.svg?style=svg" /> |
|
490 | 489 |
</p> |
491 | 490 |
|
492 |
- <div id="outline-container-orgcc8452b" class="outline-2"> |
|
493 |
- <h2 id="orgcc8452b"> |
|
491 |
+ <div id="outline-container-org071b24a" class="outline-2"> |
|
492 |
+ <h2 id="org071b24a"> |
|
494 | 493 |
<span class="section-number-2">1.</span> What is this? |
495 | 494 |
</h2> |
496 | 495 |
<div class="outline-text-2" id="text-1"> |
... | ... |
@@ -508,19 +507,18 @@ |
508 | 507 |
</div> |
509 | 508 |
</div> |
510 | 509 |
|
511 |
- <div id="outline-container-org3a3b812" class="outline-2"> |
|
512 |
- <h2 id="org3a3b812"><span class="section-number-2">2.</span> Docs</h2> |
|
510 |
+ <div id="outline-container-org0f0b569" class="outline-2"> |
|
511 |
+ <h2 id="org0f0b569"><span class="section-number-2">2.</span> Docs</h2> |
|
513 | 512 |
<div class="outline-text-2" id="text-2"></div> |
514 |
- <div id="outline-container-org8276ba5" class="outline-3"> |
|
515 |
- <h3 id="org8276ba5"> |
|
513 |
+ <div id="outline-container-org1cbf251" class="outline-3"> |
|
514 |
+ <h3 id="org1cbf251"> |
|
516 | 515 |
<span class="section-number-3">2.1.</span> Basic Usage |
517 | 516 |
</h3> |
518 | 517 |
<div class="outline-text-3" id="text-2-1"> |
519 | 518 |
<div class="org-src-container"> |
520 | 519 |
<pre |
521 | 520 |
class="src src-js" |
522 |
- id="org7a77c74" |
|
523 |
- ><span style="color: #F0DFAF;">import</span> { defgeneric } from <span style="color: #D0BF8F;">"./genfuns.js"</span>; |
|
521 |
+ id="org5a0cb5c"><span style="color: #F0DFAF;">import</span> { defgeneric } from <span style="color: #D0BF8F;">"./genfuns.js"</span>; |
|
524 | 522 |
</pre> |
525 | 523 |
</div> |
526 | 524 |
|
... | ... |
@@ -535,8 +533,7 @@ |
535 | 533 |
<div class="org-src-container"> |
536 | 534 |
<pre |
537 | 535 |
class="src src-js" |
538 |
- id="org564a17a" |
|
539 |
- ><span style="color: #F0DFAF;">const</span> <span style="color: #DC8CC3;">example1generic</span> = defgeneric(<span style="color: #D0BF8F;">"example1"</span>, <span style="color: #D0BF8F;">"a"</span>, <span style="color: #D0BF8F;">"b"</span>) |
|
536 |
+ id="orgb88093c"><span style="color: #F0DFAF;">const</span> <span style="color: #DC8CC3;">example1generic</span> = defgeneric(<span style="color: #D0BF8F;">"example1"</span>, <span style="color: #D0BF8F;">"a"</span>, <span style="color: #D0BF8F;">"b"</span>) |
|
540 | 537 |
.primary([Number, Object], (n, __) => [1, n]) |
541 | 538 |
.primary([Object, Number], (_, n) => [2, n]) |
542 | 539 |
.primary([Object, Object], (_, __) => [5, <span style="font-weight: bold;">null</span>]); |
... | ... |
@@ -551,8 +548,7 @@ |
551 | 548 |
<div class="org-src-container"> |
552 | 549 |
<pre |
553 | 550 |
class="src src-js" |
554 |
- id="org31146cd" |
|
555 |
- ><span style="color: #F0DFAF;">const</span> <span style="color: #DC8CC3;">example1</span> = example1generic.fn; |
|
551 |
+ id="org8eb1237"><span style="color: #F0DFAF;">const</span> <span style="color: #DC8CC3;">example1</span> = example1generic.fn; |
|
556 | 552 |
|
557 | 553 |
expect(example1(5, {})).toEqual([1, 5]); |
558 | 554 |
expect(example1({}, 6)).toEqual([2, 6]); |
... | ... |
@@ -568,7 +564,7 @@ expect(example1({}, {})).toEqual([5, <span style="font-weight: bold;">null</span |
568 | 564 |
</p> |
569 | 565 |
|
570 | 566 |
<div class="org-src-container"> |
571 |
- <pre class="src src-js" id="org1bdd8f1">example1generic |
|
567 |
+ <pre class="src src-js" id="org3eaa9ed">example1generic |
|
572 | 568 |
.primary([String, Object], (s, __) => [3, s]) |
573 | 569 |
.primary([Object, String], (_, s) => [4, s]); |
574 | 570 |
|
... | ... |
@@ -579,8 +575,8 @@ expect(example1({}, <span style="color: #D0BF8F;">"world"</span>)).toEqual([4, < |
579 | 575 |
</div> |
580 | 576 |
</div> |
581 | 577 |
|
582 |
- <div id="outline-container-orgb8af4f3" class="outline-3"> |
|
583 |
- <h3 id="orgb8af4f3"> |
|
578 |
+ <div id="outline-container-org4edb380" class="outline-3"> |
|
579 |
+ <h3 id="org4edb380"> |
|
584 | 580 |
<span class="section-number-3">2.2.</span> Other sorts of |
585 | 581 |
specializers |
586 | 582 |
</h3> |
... | ... |
@@ -588,16 +584,14 @@ expect(example1({}, <span style="color: #D0BF8F;">"world"</span>)).toEqual([4, < |
588 | 584 |
<div class="org-src-container"> |
589 | 585 |
<pre |
590 | 586 |
class="src src-js" |
591 |
- id="org1f7652d" |
|
592 |
- ><span style="color: #F0DFAF;">import</span> { Shape, Eql } from <span style="color: #D0BF8F;">"./genfuns.js"</span>; |
|
587 |
+ id="org8310490"><span style="color: #F0DFAF;">import</span> { Shape, Eql } from <span style="color: #D0BF8F;">"./genfuns.js"</span>; |
|
593 | 588 |
</pre> |
594 | 589 |
</div> |
595 | 590 |
|
596 | 591 |
<div class="org-src-container"> |
597 | 592 |
<pre |
598 | 593 |
class="src src-js" |
599 |
- id="orge2d0781" |
|
600 |
- ><span style="color: #F0DFAF;">const</span> <span style="color: #DC8CC3;">example2</span> = defgeneric(<span style="color: #D0BF8F;">"example2"</span>, <span style="color: #D0BF8F;">"inp"</span>) |
|
594 |
+ id="org34ae3c2"><span style="color: #F0DFAF;">const</span> <span style="color: #DC8CC3;">example2</span> = defgeneric(<span style="color: #D0BF8F;">"example2"</span>, <span style="color: #D0BF8F;">"inp"</span>) |
|
601 | 595 |
.primary([Shape(<span style="color: #D0BF8F;">"a"</span>, <span style="color: #D0BF8F;">"b"</span>)], inp => <span style="color: #D0BF8F;">`a: ${inp.a} b: ${inp.b}`</span>) |
602 | 596 |
.primary([Shape(<span style="color: #D0BF8F;">"a"</span>)], inp => <span style="color: #D0BF8F;">`a: ${inp.a} b: <missing>`</span>) |
603 | 597 |
.primary([Shape([<span style="color: #D0BF8F;">"c"</span>, 1])], inp => <span style="color: #D0BF8F;">`c: one`</span>) |
... | ... |
@@ -617,7 +611,7 @@ expect(example2(1)).toEqual(<span style="color: #D0BF8F;">"one"</span>); |
617 | 611 |
</div> |
618 | 612 |
<div id="postamble" class="status"> |
619 | 613 |
<p class="author">Author: Ed L</p> |
620 |
- <p class="date">Created: 2022-03-26 Sat 00:19</p> |
|
614 |
+ <p class="date">Created: 2022-03-26 Sat 00:38</p> |
|
621 | 615 |
<p class="validation"> |
622 | 616 |
<a href="https://validator.w3.org/check?uri=referer">Validate</a> |
623 | 617 |
</p> |