Skip to content

Commit d523f0b

Browse files
Updated README.md usage example
1 parent 03725fa commit d523f0b

File tree

9 files changed

+33
-29
lines changed

9 files changed

+33
-29
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.0.1
2+
3+
- Updated README.md usage example
4+
15
## 1.0.0
26

37
Initial release

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ https://cdn.jsdelivr.net/gh/pichillilorenzo/http-request-method-db@main/dist/db.
3838
```js
3939
import db from 'http-request-method-db';
4040
// .. or
41-
const db = require('http-request-method-db');
41+
const db = require('http-request-method-db').default;
4242

4343
const getInfo = db['get']; // An instance of HTTPRequestMethod
4444
console.log(getInfo.syntax); // GET /index.html

docs/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ <h1>HTTP Request Method Database</h1>
2424
<p><a href="https://npmjs.org/package/http-request-method-db"><img src="https://badgen.net/npm/v/http-request-method-db" alt="NPM Version"></a>
2525
<a href="/LICENSE"><img src="https://img.shields.io/github/license/pichillilorenzo/http-request-method-db" alt="license"></a>
2626
<a href="https://www.paypal.me/LorenzoPichilli"><img src="https://img.shields.io/badge/paypal-donate-yellow.svg" alt="Donate to this project using Paypal"></a></p>
27-
<p>This is a large database of known HTTP Request Methods and information about them. It consists of a single, public JSON file and does not include any logic, allowing it to remain as un-opinionated as possible with an API. It aggregates data from the following sources:</p>
27+
<p>This is a database of known HTTP Request Methods and information about them. It consists of a single, public JSON file and does not include any logic, allowing it to remain as un-opinionated as possible with an API. It aggregates data from the following sources:</p>
2828
<ul>
2929
<li><a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods">https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods</a></li>
3030
</ul>
@@ -48,7 +48,7 @@ <h3>Database Download</h3>
4848
<a href="#usage" id="usage" style="color: inherit; text-decoration: none;">
4949
<h2>Usage</h2>
5050
</a>
51-
<pre><code class="language-js"><span class="hl-3">import</span><span class="hl-0"> </span><span class="hl-4">db</span><span class="hl-0"> </span><span class="hl-3">from</span><span class="hl-0"> </span><span class="hl-5">&#39;http-request-method-db&#39;</span><span class="hl-0">;</span><br/><span class="hl-2">// .. or</span><br/><span class="hl-6">const</span><span class="hl-0"> </span><span class="hl-7">db</span><span class="hl-0"> = </span><span class="hl-8">require</span><span class="hl-0">(</span><span class="hl-5">&#39;http-request-method-db&#39;</span><span class="hl-0">);</span><br/><br/><span class="hl-6">const</span><span class="hl-0"> </span><span class="hl-7">getInfo</span><span class="hl-0"> = </span><span class="hl-4">db</span><span class="hl-0">[</span><span class="hl-5">&#39;get&#39;</span><span class="hl-0">]; </span><span class="hl-2">// An instance of HTTPRequestMethod</span><br/><span class="hl-4">console</span><span class="hl-0">.</span><span class="hl-8">log</span><span class="hl-0">(</span><span class="hl-4">getInfo</span><span class="hl-0">.</span><span class="hl-4">syntax</span><span class="hl-0">); </span><span class="hl-2">// GET /index.html</span>
51+
<pre><code class="language-js"><span class="hl-3">import</span><span class="hl-0"> </span><span class="hl-4">db</span><span class="hl-0"> </span><span class="hl-3">from</span><span class="hl-0"> </span><span class="hl-5">&#39;http-request-method-db&#39;</span><span class="hl-0">;</span><br/><span class="hl-2">// .. or</span><br/><span class="hl-6">const</span><span class="hl-0"> </span><span class="hl-7">db</span><span class="hl-0"> = </span><span class="hl-8">require</span><span class="hl-0">(</span><span class="hl-5">&#39;http-request-method-db&#39;</span><span class="hl-0">).</span><span class="hl-4">default</span><span class="hl-0">;</span><br/><br/><span class="hl-6">const</span><span class="hl-0"> </span><span class="hl-7">getInfo</span><span class="hl-0"> = </span><span class="hl-4">db</span><span class="hl-0">[</span><span class="hl-5">&#39;get&#39;</span><span class="hl-0">]; </span><span class="hl-2">// An instance of HTTPRequestMethod</span><br/><span class="hl-4">console</span><span class="hl-0">.</span><span class="hl-8">log</span><span class="hl-0">(</span><span class="hl-4">getInfo</span><span class="hl-0">.</span><span class="hl-4">syntax</span><span class="hl-0">); </span><span class="hl-2">// GET /index.html</span>
5252
</code></pre>
5353
<p>Access HTTP Request Method info using the request method name in <strong>lower case</strong> as key.</p>
5454

docs/interfaces/HTTPRequestMethod.html

Lines changed: 16 additions & 16 deletions
Large diffs are not rendered by default.

docs/interfaces/HTTPRequestMethodBrowserInfo.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ <h4>Hierarchy</h4>
2424
<ul class="tsd-hierarchy">
2525
<li><span class="target">HTTPRequestMethodBrowserInfo</span></li></ul></section><aside class="tsd-sources">
2626
<ul>
27-
<li>Defined in main.ts:127</li></ul></aside>
27+
<li>Defined in <a href="https://github.com/pichillilorenzo/http-request-method-db/blob/03725fa/src/main.ts#L127">main.ts:127</a></li></ul></aside>
2828
<section class="tsd-panel-group tsd-index-group">
2929
<section class="tsd-panel tsd-index-panel">
3030
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
@@ -44,21 +44,21 @@ <h3 class="tsd-anchor-link"><span>name</span><a href="#name" aria-label="Permali
4444
<div class="tsd-comment tsd-typography"><p>HTTP Request Method browser info name.</p>
4545
</div><aside class="tsd-sources">
4646
<ul>
47-
<li>Defined in main.ts:131</li></ul></aside></section>
47+
<li>Defined in <a href="https://github.com/pichillilorenzo/http-request-method-db/blob/03725fa/src/main.ts#L131">main.ts:131</a></li></ul></aside></section>
4848
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="supported" class="tsd-anchor"></a>
4949
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>supported</span><a href="#supported" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
5050
<div class="tsd-signature">supported<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div>
5151
<div class="tsd-comment tsd-typography"><p>If the HTTP Request Method is supported by the browser.</p>
5252
</div><aside class="tsd-sources">
5353
<ul>
54-
<li>Defined in main.ts:141</li></ul></aside></section>
54+
<li>Defined in <a href="https://github.com/pichillilorenzo/http-request-method-db/blob/03725fa/src/main.ts#L141">main.ts:141</a></li></ul></aside></section>
5555
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="version" class="tsd-anchor"></a>
5656
<h3 class="tsd-anchor-link"><span>version</span><a href="#version" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
5757
<div class="tsd-signature">version<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
5858
<div class="tsd-comment tsd-typography"><p>HTTP Request Method browser info label version.</p>
5959
</div><aside class="tsd-sources">
6060
<ul>
61-
<li>Defined in main.ts:136</li></ul></aside></section></section></div>
61+
<li>Defined in <a href="https://github.com/pichillilorenzo/http-request-method-db/blob/03725fa/src/main.ts#L136">main.ts:136</a></li></ul></aside></section></section></div>
6262
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
6363
<div class="tsd-navigation settings">
6464
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">

docs/interfaces/HTTPRequestMethodDb.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ <h4>Hierarchy</h4>
2727
<h4 class="tsd-before-signature">Indexable</h4>
2828
<div class="tsd-signature"><span class="tsd-signature-symbol">[</span>key: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">]: </span><a href="HTTPRequestMethod.html" class="tsd-signature-type" data-tsd-kind="Interface">HTTPRequestMethod</a></div></section><aside class="tsd-sources">
2929
<ul>
30-
<li>Defined in main.ts:89</li></ul></aside></div>
30+
<li>Defined in <a href="https://github.com/pichillilorenzo/http-request-method-db/blob/03725fa/src/main.ts#L89">main.ts:89</a></li></ul></aside></div>
3131
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
3232
<div class="tsd-navigation settings">
3333
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">

docs/interfaces/HTTPRequestMethodSpecification.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ <h4>Hierarchy</h4>
2424
<ul class="tsd-hierarchy">
2525
<li><span class="target">HTTPRequestMethodSpecification</span></li></ul></section><aside class="tsd-sources">
2626
<ul>
27-
<li>Defined in main.ts:103</li></ul></aside>
27+
<li>Defined in <a href="https://github.com/pichillilorenzo/http-request-method-db/blob/03725fa/src/main.ts#L103">main.ts:103</a></li></ul></aside>
2828
<section class="tsd-panel-group tsd-index-group">
2929
<section class="tsd-panel tsd-index-panel">
3030
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
@@ -43,14 +43,14 @@ <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code
4343
<div class="tsd-comment tsd-typography"><p>HTTP Request Method specification documentation link.</p>
4444
</div><aside class="tsd-sources">
4545
<ul>
46-
<li>Defined in main.ts:112</li></ul></aside></section>
46+
<li>Defined in <a href="https://github.com/pichillilorenzo/http-request-method-db/blob/03725fa/src/main.ts#L112">main.ts:112</a></li></ul></aside></section>
4747
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="name" class="tsd-anchor"></a>
4848
<h3 class="tsd-anchor-link"><span>name</span><a href="#name" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
4949
<div class="tsd-signature">name<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
5050
<div class="tsd-comment tsd-typography"><p>HTTP Request Method specification name.</p>
5151
</div><aside class="tsd-sources">
5252
<ul>
53-
<li>Defined in main.ts:107</li></ul></aside></section></section></div>
53+
<li>Defined in <a href="https://github.com/pichillilorenzo/http-request-method-db/blob/03725fa/src/main.ts#L107">main.ts:107</a></li></ul></aside></section></section></div>
5454
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
5555
<div class="tsd-navigation settings">
5656
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">

docs/variables/default.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<h1>Variable default</h1></div>
1616
<div class="tsd-signature">default<span class="tsd-signature-symbol">:</span> <a href="../interfaces/HTTPRequestMethodDb.html" class="tsd-signature-type" data-tsd-kind="Interface">HTTPRequestMethodDb</a></div><aside class="tsd-sources">
1717
<ul>
18-
<li>Defined in main.ts:312</li></ul></aside></div>
18+
<li>Defined in <a href="https://github.com/pichillilorenzo/http-request-method-db/blob/03725fa/src/main.ts#L312">main.ts:312</a></li></ul></aside></div>
1919
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
2020
<div class="tsd-navigation settings">
2121
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "http-request-method-db",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "HTTP Request Method Database",
55
"author": {
66
"name": "Lorenzo Pichilli",

0 commit comments

Comments
 (0)