This repository has been archived by the owner on Aug 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
7 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ This module is meant to provide memory-efficient lazy-evaluation iteration for i | |
Use the following import: | ||
|
||
```ts | ||
import { Lazy } from 'https://deno.land/x/[email protected].0/mod.ts'; | ||
import { Lazy } from 'https://deno.land/x/[email protected].1/mod.ts'; | ||
``` | ||
|
||
Make sure the `@v{version}` tag is the correct one you want. I'd recommend against master, as it could change without notice & might be broken (although I will try not to break it). | ||
|
@@ -79,12 +79,12 @@ The `Lazy` class is the root of the module, all things come from it and are deri | |
|
||
```ts | ||
// Static method import. | ||
import { Lazy } from 'https://deno.land/x/[email protected].0/mod.ts'; | ||
import { Lazy } from 'https://deno.land/x/[email protected].1/mod.ts'; | ||
|
||
const iterable = Lazy.from([1, 2, 3, 4, 5]); | ||
|
||
// Direct function import. | ||
import { from } from 'https://deno.land/x/[email protected].0/mod.ts'; | ||
import { from } from 'https://deno.land/x/[email protected].1/mod.ts'; | ||
|
||
const iterable = from([1, 2, 3, 4, 5]); | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,7 +91,7 @@ <h2 id="contents">Contents</h2> | |
<h2 id="installation">Installation</h2> | ||
<h3 id="deno">Deno</h3> | ||
<p>Use the following import:</p> | ||
<pre><code class="language-ts"><span class="hljs-keyword">import</span> { Lazy } <span class="hljs-keyword">from</span> <span class="hljs-string">'https://deno.land/x/[email protected].0/mod.ts'</span>;</code></pre> | ||
<pre><code class="language-ts"><span class="hljs-keyword">import</span> { Lazy } <span class="hljs-keyword">from</span> <span class="hljs-string">'https://deno.land/x/[email protected].1/mod.ts'</span>;</code></pre> | ||
<p>Make sure the <code>@v{version}</code> tag is the correct one you want. I'd recommend against master, as it could change without notice & might be broken (although I will try not to break it).</p> | ||
<h3 id="node">Node</h3> | ||
<p>The packge can be found here: <a href="https://www.npmjs.com/package/@luvies/lazy">https://www.npmjs.com/package/@luvies/lazy</a>.</p> | ||
|
@@ -112,12 +112,12 @@ <h2 id="overview">Overview</h2> | |
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">repeat</span><<span class="hljs-title">TElement</span>>(<span class="hljs-params">element: TElement, count?: <span class="hljs-built_in">number</span></span>): <span class="hljs-title">Lazy</span><<span class="hljs-title">TElement</span>></span>;</code></pre> | ||
<p>The <code>Lazy</code> class is the root of the module, all things come from it and are derived off it. To start using it, do something like the following:</p> | ||
<pre><code class="language-ts"><span class="hljs-comment">// Static method import.</span> | ||
<span class="hljs-keyword">import</span> { Lazy } <span class="hljs-keyword">from</span> <span class="hljs-string">'https://deno.land/x/[email protected].0/mod.ts'</span>; | ||
<span class="hljs-keyword">import</span> { Lazy } <span class="hljs-keyword">from</span> <span class="hljs-string">'https://deno.land/x/[email protected].1/mod.ts'</span>; | ||
|
||
<span class="hljs-keyword">const</span> iterable = Lazy.from([<span class="hljs-number">1</span>, <span class="hljs-number">2</span>, <span class="hljs-number">3</span>, <span class="hljs-number">4</span>, <span class="hljs-number">5</span>]); | ||
|
||
<span class="hljs-comment">// Direct function import.</span> | ||
<span class="hljs-keyword">import</span> { <span class="hljs-keyword">from</span> } <span class="hljs-keyword">from</span> <span class="hljs-string">'https://deno.land/x/[email protected].0/mod.ts'</span>; | ||
<span class="hljs-keyword">import</span> { <span class="hljs-keyword">from</span> } <span class="hljs-keyword">from</span> <span class="hljs-string">'https://deno.land/x/[email protected].1/mod.ts'</span>; | ||
|
||
<span class="hljs-keyword">const</span> iterable = <span class="hljs-keyword">from</span>([<span class="hljs-number">1</span>, <span class="hljs-number">2</span>, <span class="hljs-number">3</span>, <span class="hljs-number">4</span>, <span class="hljs-number">5</span>]);</code></pre> | ||
<p>After you have done this, the full power of the module is available to play with.</p> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters