mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
Instead of the deprecated tslint use eslint in the aio's example-lint script PR Close #43218
7 lines
208 B
TypeScript
7 lines
208 B
TypeScript
/* eslint-disable */
|
||
// #docregion
|
||
function plural(n: number): number {
|
||
let i = Math.floor(Math.abs(n)), v = n.toString().replace(/^[^.]*\.?/, '').length;
|
||
if (i === 1 && v === 0) return 1;
|
||
return 5;
|
||
}
|