Skip to content

Commit

Permalink
chore(release): 1.1.7 [skip ci]
Browse files Browse the repository at this point in the history
## [1.1.7](v1.1.6...v1.1.7) (2023-02-12)

### Bug Fixes

* **Context:** allow to pass a custom `stringify` function to `.json()` ([f9317b9](f9317b9))
  • Loading branch information
semantic-release-bot authored and vansergen committed Feb 12, 2023
1 parent f694fac commit 8de1caf
Show file tree
Hide file tree
Showing 5 changed files with 120 additions and 13 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## [1.1.7](https://github.com/binden-js/binden/compare/v1.1.6...v1.1.7) (2023-02-12)

### Bug Fixes

- **Context:** allow to pass a custom `stringify` function to `.json()` ([f9317b9](https://github.com/binden-js/binden/commit/f9317b9c217c08c9d2db8cf623d7da5179a10463))

## [1.1.6](https://github.com/binden-js/binden/compare/v1.1.5...v1.1.6) (2023-02-12)

### Performance Improvements
Expand Down
118 changes: 108 additions & 10 deletions docs/classes/Context.html
Original file line number Diff line number Diff line change
Expand Up @@ -1220,8 +1220,8 @@ <h4 class="tsd-returns-title">
<li>
Defined in
<a
href="https://github.com/binden-js/binden/blob/main/src/context.ts#L90"
>src/context.ts:90</a
href="https://github.com/binden-js/binden/blob/main/src/context.ts#L97"
>src/context.ts:97</a
>
</li>
</ul>
Expand Down Expand Up @@ -1302,8 +1302,8 @@ <h4 class="tsd-returns-title">
<li>
Defined in
<a
href="https://github.com/binden-js/binden/blob/main/src/context.ts#L85"
>src/context.ts:85</a
href="https://github.com/binden-js/binden/blob/main/src/context.ts#L92"
>src/context.ts:92</a
>
</li>
</ul>
Expand Down Expand Up @@ -1345,8 +1345,27 @@ <h3 class="tsd-anchor-link">
><span class="tsd-signature-type">string</span
><span class="tsd-signature-symbol">, </span
><span class="tsd-signature-type">unknown</span
><span class="tsd-signature-symbol">&gt;</span>, stringify<span
class="tsd-signature-symbol"
>?: </span
><span class="tsd-signature-symbol">(</span
><span class="tsd-signature-symbol">(</span>input<span
class="tsd-signature-symbol"
>: </span
><span class="tsd-signature-type">unknown</span
><span class="tsd-signature-symbol">[]</span
><span class="tsd-signature-symbol"> | </span
><span class="tsd-signature-type">Record</span
><span class="tsd-signature-symbol">&lt;</span
><span class="tsd-signature-type">string</span
><span class="tsd-signature-symbol">, </span
><span class="tsd-signature-type">unknown</span
><span class="tsd-signature-symbol">&gt;</span
><span class="tsd-signature-symbol">)</span
><span class="tsd-signature-symbol"> =&gt; </span
><span class="tsd-signature-type">string</span
><span class="tsd-signature-symbol">)</span
><span class="tsd-signature-symbol">)</span
><span class="tsd-signature-symbol">: </span
><span class="tsd-signature-type">Promise</span
><span class="tsd-signature-symbol">&lt;</span
Expand Down Expand Up @@ -1387,6 +1406,85 @@ <h5>
><span class="tsd-signature-symbol">&gt;</span>
</h5>
</li>
<li>
<h5>
<code class="tsd-tag ts-flagOptional">Optional</code>
stringify: <span class="tsd-signature-symbol">(</span
><span class="tsd-signature-symbol">(</span>input<span
class="tsd-signature-symbol"
>: </span
><span class="tsd-signature-type">unknown</span
><span class="tsd-signature-symbol">[]</span
><span class="tsd-signature-symbol"> | </span
><span class="tsd-signature-type">Record</span
><span class="tsd-signature-symbol">&lt;</span
><span class="tsd-signature-type">string</span
><span class="tsd-signature-symbol">, </span
><span class="tsd-signature-type">unknown</span
><span class="tsd-signature-symbol">&gt;</span
><span class="tsd-signature-symbol">)</span
><span class="tsd-signature-symbol"> =&gt; </span
><span class="tsd-signature-type">string</span
><span class="tsd-signature-symbol">)</span>
</h5>
<ul class="tsd-parameters">
<li class="tsd-parameter-signature">
<ul class="tsd-signatures tsd-kind-type-literal">
<li class="tsd-signature">
<span class="tsd-signature-symbol">(</span
>input<span class="tsd-signature-symbol">: </span
><span class="tsd-signature-type">unknown</span
><span class="tsd-signature-symbol">[]</span
><span class="tsd-signature-symbol"> | </span
><span class="tsd-signature-type">Record</span
><span class="tsd-signature-symbol">&lt;</span
><span class="tsd-signature-type">string</span
><span class="tsd-signature-symbol">, </span
><span class="tsd-signature-type">unknown</span
><span class="tsd-signature-symbol">&gt;</span
><span class="tsd-signature-symbol">)</span
><span class="tsd-signature-symbol">: </span
><span class="tsd-signature-type">string</span>
</li>
<li class="tsd-description">
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li>
<h5>
input:
<span class="tsd-signature-type"
>unknown</span
><span class="tsd-signature-symbol"
>[]</span
><span class="tsd-signature-symbol">
| </span
><span class="tsd-signature-type"
>Record</span
><span class="tsd-signature-symbol"
>&lt;</span
><span class="tsd-signature-type"
>string</span
><span class="tsd-signature-symbol"
>, </span
><span class="tsd-signature-type"
>unknown</span
><span class="tsd-signature-symbol"
>&gt;</span
>
</h5>
</li>
</ul>
</div>
<h4 class="tsd-returns-title">
Returns
<span class="tsd-signature-type">string</span>
</h4>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<h4 class="tsd-returns-title">
Expand Down Expand Up @@ -1591,8 +1689,8 @@ <h4 class="tsd-returns-title">
<li>
Defined in
<a
href="https://github.com/binden-js/binden/blob/main/src/context.ts#L96"
>src/context.ts:96</a
href="https://github.com/binden-js/binden/blob/main/src/context.ts#L103"
>src/context.ts:103</a
>
</li>
</ul>
Expand Down Expand Up @@ -1868,8 +1966,8 @@ <h4 class="tsd-returns-title">
<li>
Defined in
<a
href="https://github.com/binden-js/binden/blob/main/src/context.ts#L80"
>src/context.ts:80</a
href="https://github.com/binden-js/binden/blob/main/src/context.ts#L87"
>src/context.ts:87</a
>
</li>
</ul>
Expand Down Expand Up @@ -1963,8 +2061,8 @@ <h4 class="tsd-returns-title">
<li>
Defined in
<a
href="https://github.com/binden-js/binden/blob/main/src/context.ts#L102"
>src/context.ts:102</a
href="https://github.com/binden-js/binden/blob/main/src/context.ts#L109"
>src/context.ts:109</a
>
</li>
</ul>
Expand Down
3 changes: 3 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,9 @@ <h3>BindenResponse</h3>
</li>
</ul>
<pre><code class="language-typescript"><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-5">json</span><span class="hl-0"> = { </span><span class="hl-3">k:</span><span class="hl-0"> </span><span class="hl-1">&quot;v&quot;</span><span class="hl-0">, </span><span class="hl-3">k1:</span><span class="hl-0"> </span><span class="hl-7">1</span><span class="hl-0">, </span><span class="hl-3">m:</span><span class="hl-0"> </span><span class="hl-1">&quot;message&quot;</span><span class="hl-0">, </span><span class="hl-3">f:</span><span class="hl-0"> </span><span class="hl-4">false</span><span class="hl-0"> };</span><br/><span class="hl-2">await</span><span class="hl-0"> </span><span class="hl-3">response</span><span class="hl-0">.</span><span class="hl-6">json</span><span class="hl-0">(</span><span class="hl-3">json</span><span class="hl-0">);</span>
</code></pre>
<p>or using a custom <code>stringify</code> function</p>
<pre><code class="language-typescript"><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-5">json</span><span class="hl-0"> = { </span><span class="hl-3">currency:</span><span class="hl-0"> </span><span class="hl-1">&quot;💶&quot;</span><span class="hl-0">, </span><span class="hl-3">value:</span><span class="hl-0"> </span><span class="hl-7">120</span><span class="hl-0"> };</span><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-5">fastJSON</span><span class="hl-0"> = </span><span class="hl-2">await</span><span class="hl-0"> </span><span class="hl-4">import</span><span class="hl-0">(</span><span class="hl-1">&quot;fast-json-stringify&quot;</span><span class="hl-0">);</span><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-5">stringify</span><span class="hl-0"> = </span><span class="hl-6">fastJSON</span><span class="hl-0">({</span><br/><span class="hl-0"> </span><span class="hl-3">title:</span><span class="hl-0"> </span><span class="hl-1">&quot;Example Schema&quot;</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-3">type:</span><span class="hl-0"> </span><span class="hl-1">&quot;object&quot;</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-3">properties:</span><span class="hl-0"> {</span><br/><span class="hl-0"> </span><span class="hl-3">currency:</span><span class="hl-0"> {</span><br/><span class="hl-0"> </span><span class="hl-3">type:</span><span class="hl-0"> </span><span class="hl-1">&quot;string&quot;</span><span class="hl-0">,</span><br/><span class="hl-0"> },</span><br/><span class="hl-0"> </span><span class="hl-3">value:</span><span class="hl-0"> {</span><br/><span class="hl-0"> </span><span class="hl-3">type:</span><span class="hl-0"> </span><span class="hl-1">&quot;integer&quot;</span><span class="hl-0">,</span><br/><span class="hl-0"> },</span><br/><span class="hl-0"> },</span><br/><span class="hl-0"> </span><span class="hl-3">required:</span><span class="hl-0"> [</span><span class="hl-1">&quot;currency&quot;</span><span class="hl-0">, </span><span class="hl-1">&quot;value&quot;</span><span class="hl-0">],</span><br/><span class="hl-0"> </span><span class="hl-3">additionalProperties:</span><span class="hl-0"> </span><span class="hl-4">false</span><span class="hl-0">,</span><br/><span class="hl-0">});</span><br/><span class="hl-2">await</span><span class="hl-0"> </span><span class="hl-3">response</span><span class="hl-0">.</span><span class="hl-6">json</span><span class="hl-0">(</span><span class="hl-3">json</span><span class="hl-0">);</span>
</code></pre>
<ul>
<li><code>.text()</code> - send text as <code>plain/text</code></li>
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "binden",
"version": "1.1.6",
"version": "1.1.7",
"description": "A simple HTTP server framework",
"main": "dist/index.js",
"type": "module",
Expand Down

0 comments on commit 8de1caf

Please sign in to comment.