1.0.0-4 • Published 5 years ago

@actjs.on/mathrix v1.0.0-4

Weekly downloads
-
License
MPL-2.0
Repository
gitlab
Last release
5 years ago

mathrix-ts

Requirements

  • @angular/common and @angular/core 5 or higher.

Installing

$ npm i @actjs.on/mathrix-ts --save

Usage

Import '@actjs.on/mathrix-ts/extensions/number' as a Promise in your component to use the extended methods of number, so inside an async function wait the Promise resolution with await method, like follow.

import { Component } from '@angular/core';

const numberExtensionPromise = import('@actjs.on/mathrix-ts/extensions/number');


@Component({
    selector: 'app-root',
    templateUrl: './app.component.html',
    styleUrls: ['./app.component.styl']
})
export class AppComponent {

    private number1: number;

    private number2: number;

    constructor() {
        this.number1 = 9000;
        this.number2 = 9001;

        this.isEvenOrOddMessage();
    }

    private async isEvenOrOddMessage() {
        await numberExtensionPromise;

        console.log(`${this.number1} is ${this.number1.isOdd() ? `odd` : `even`}`);
        console.log(`${this.number2} is ${this.number2.isOdd() ? `odd` : `even`}`);
    }

}
1.0.0-4

5 years ago

1.0.0-1

5 years ago

1.0.0-0

5 years ago

1.0.0-3

5 years ago

1.0.0-2

5 years ago

1.0.0-rc.13

5 years ago

1.0.0-rc.12

5 years ago

1.0.0-rc.15

5 years ago

1.0.0-rc.14

5 years ago

1.0.0-rc.11

5 years ago

1.0.0-rc.10

5 years ago

1.0.0-rc.9

5 years ago

1.0.0-rc.8

5 years ago

1.0.0-rc.7

5 years ago

1.0.0-rc.6

5 years ago

1.0.0-rc.5

5 years ago

1.0.0-rc.3

5 years ago

1.0.0-rc.4

5 years ago

1.0.0-rc.2

5 years ago

1.0.0-rc.1

5 years ago