GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - tinyield/tinyield4ts: A Minimalistic, extensible and lazy sequence implementation for Typescript and Javascript.

BranchesTags
Open more actions menu

Latest commit

 

History

86 Commits
86 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
src
src
 
 
.editorconfig
.editorconfig
 
 
.eslintignore
.eslintignore
 
 
.eslintrc.json
.eslintrc.json
 
 
.gitignore
.gitignore
 
 
.prettierrc
.prettierrc
 
 
.prettierrc.js
.prettierrc.js
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
analyse.js
analyse.js
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
tsconfig.json
tsconfig.json
 
 
tsconfig.lib.json
tsconfig.lib.json
 
 

Repository files navigation

Tinyield4ts

npm version Quality Gate Status Coverage Bugs Vulnerabilities

A Minimalistic, extensible and lazy sequence implementation for Typescript and Javascript.

Usage

An auxiliary collapse() method, which merges series of adjacent elements is written with Tinyield in the following way:

import {Query, Traverser} from 'tinyield4ts';

function collapse<T>(src: Query<T>): Traverser<T> {
    return yld => {
        let prev: T;
        src.forEach(item => {
            if (prev === undefined || prev !== item) {
                prev = item;
                yld(item);
            }
        });
    };
}

This method can be chained in a sequence like this:

const arrange = [7, 7, 8, 9, 9, 11, 11, 7];
const actual = [];
Query.of(arrange)
    .then(n => collapse(n))
    .filter(n => n % 2 !== 0)
    .forEach(actual.push);

Installation

$ npm i tinyield4ts

License

This project is licensed under Apache License, version 2.0

About

A Minimalistic, extensible and lazy sequence implementation for Typescript and Javascript.

Topics

extensiblejavascriptlazyminimalistnodenodejsnpmnpm-packagenpmjsnpmjs-packagesquerysequencetypescript

Resources

Readme
Apache-2.0 license
Activity
Custom properties

Stars

3 stars

Watchers

2 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.