Coder Social home page Coder Social logo

luvies / lazy Goto Github PK

View Code? Open in Web Editor NEW
31.0 31.0 2.0 968 KB

A linq-like lazy-evaluation enumerable/iteration library that aims to support deno, node & browser

Home Page: https://luvies.github.io/lazy/

License: MIT License

TypeScript 98.63% JavaScript 1.25% Shell 0.11%
browser deno denoland enumerable enumeration iteration iterator lazy linq node node-js nodejs

lazy's People

Contributors

chayimfriedman2 avatar luvies avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

lazy's Issues

Rewrite prebuild.js to deno

This script was taken from another project, but it makes more sense if it used deno instead, as this is a deno project primarily. Will project move it to a gist as well.

Broken on current Deno

 % deno run --reload https://deno.land/x/lazy/lazy.ts
Download https://deno.land/x/lazy/lazy.ts
Warning Implicitly using latest version (v1.7.1) for https://deno.land/x/lazy/lazy.ts
Download https://deno.land/x/[email protected]/lazy.ts
Download https://deno.land/x/[email protected]/iterators.ts
Download https://deno.land/x/[email protected]/aggregates.ts
Check https://deno.land/x/lazy/lazy.ts
error: TS2322 [ERROR]: Type 'Iterable<TElement> & Lazy<any>' is not assignable to type 'Lazy<TElement>'.
  The types returned by 'average()' are incompatible between these types.
    Type 'number' is not assignable to type 'TElement extends number ? number : never'.
      return iterable;
      ~~~~~~~~~~~~~~~~
    at https://deno.land/x/[email protected]/lazy.ts:46:7

 % deno --version
deno 1.6.3 (release, x86_64-unknown-linux-gnu)
v8 8.8.294
typescript 4.1.3

Where - support T is S

The typings for Array in TS provide the following overload for filter:

filter<S extends T>(callbackfn: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S[];

Where should support the same.

Update the deno docs to point to the correct import path

Hi, right now the readme says to import for deno do the follow

import { Lazy } from 'https://deno.land/x/lazy@v{version}/mod.ts';

But this results in a 404. The correct path includes a subdirectory, lib

import { Lazy } from 'https://deno.land/x/lazy@v{version}/lib/mod.ts';

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.