1.0.0-4 • Published 4 years ago

@actjs.on/mathrix v1.0.0-4

Weekly downloads
-
License
MPL-2.0
Repository
gitlab
Last release
4 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

4 years ago

1.0.0-1

4 years ago

1.0.0-0

4 years ago

1.0.0-3

4 years ago

1.0.0-2

4 years ago

1.0.0-rc.13

4 years ago

1.0.0-rc.12

4 years ago

1.0.0-rc.15

4 years ago

1.0.0-rc.14

4 years ago

1.0.0-rc.11

4 years ago

1.0.0-rc.10

4 years ago

1.0.0-rc.9

4 years ago

1.0.0-rc.8

4 years ago

1.0.0-rc.7

4 years ago

1.0.0-rc.6

4 years ago

1.0.0-rc.5

4 years ago

1.0.0-rc.3

4 years ago

1.0.0-rc.4

4 years ago

1.0.0-rc.2

4 years ago

1.0.0-rc.1

4 years ago