1.0.0-4 • Published 2 years ago
@actjs.on/mathrix v1.0.0-4
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
2 years ago
1.0.0-1
3 years ago
1.0.0-0
3 years ago
1.0.0-3
2 years ago
1.0.0-2
3 years ago
1.0.0-rc.13
3 years ago
1.0.0-rc.12
3 years ago
1.0.0-rc.15
3 years ago
1.0.0-rc.14
3 years ago
1.0.0-rc.11
3 years ago
1.0.0-rc.10
3 years ago
1.0.0-rc.9
3 years ago
1.0.0-rc.8
3 years ago
1.0.0-rc.7
3 years ago
1.0.0-rc.6
3 years ago
1.0.0-rc.5
3 years ago
1.0.0-rc.3
3 years ago
1.0.0-rc.4
3 years ago
1.0.0-rc.2
3 years ago
1.0.0-rc.1
3 years ago