0.1.11 • Published 8 months ago

@mmit/tools v0.1.11

Weekly downloads
1
License
MIT
Repository
github
Last release
8 months ago

Various TS-Tools

Live-Example | GitHub-Home

Noting spectacular here...

range

    test('Number of iterations', () => {
        let iterations = 0;
        range(0, 10).forEach(() => iterations++);

        expect(iterations).toBe(11);
    });

loop

    test('loop with values', () => {
        let iterations = 0;
        let sum = 0;
        loop(1, 3).through((value: number) => {
            sum += value;
            iterations++;
        });

        expect(iterations).toBe(3);
        expect(sum).toBe(6);

        iterations = 0;
        sum = 0;
        loop(3, 1).through((value: number) => {
            sum += value;
            iterations++;
        });
        expect(iterations).toBe(3);
        expect(sum).toBe(6);
    });
0.1.10

8 months ago

0.1.11

8 months ago

0.1.8

8 months ago

0.1.7

8 months ago

0.1.9

8 months ago

0.1.6

8 months ago

0.1.4

1 year ago

0.1.5

1 year ago

0.1.3

3 years ago

0.1.2

4 years ago

0.1.1

4 years ago