ngx2-pipes
Version:
Angular pipes library
1,081 lines (1,054 loc) • 187 kB
JavaScript
import * as i0 from '@angular/core';
import { Pipe, NgModule } from '@angular/core';
function isUndefined(value) {
return typeof value === 'undefined';
}
function isNull(value) {
return value === null;
}
function isNumber(value) {
return typeof value === 'number';
}
function isNumberFinite(value) {
return isNumber(value) && isFinite(value);
}
// Not strict positive
function isPositive(value) {
return value >= 0;
}
function isInteger(value) {
// No rest, is an integer
return value % 1 === 0;
}
function isNil(value) {
return value === null || typeof value === 'undefined';
}
function isString(value) {
return typeof value === 'string';
}
function isObject(value) {
return value !== null && typeof value === 'object';
}
function isArray(value) {
return Array.isArray(value);
}
function isFunction(value) {
return typeof value === 'function';
}
function toDecimal(value, decimal) {
return Math.round(value * Math.pow(10, decimal)) / Math.pow(10, decimal);
}
function upperFirst(value) {
return value.slice(0, 1).toUpperCase() + value.slice(1);
}
function createRound(method) {
// <any>Math to suppress error
const func = Math[method];
return function (value, precision = 0) {
if (typeof value === 'string') {
throw new TypeError('Rounding method needs a number');
}
if (typeof precision !== 'number' || isNaN(precision)) {
precision = 0;
}
if (precision) {
let pair = `${value}e`.split('e');
const val = func(`${pair[0]}e` + (+pair[1] + precision));
pair = `${val}e`.split('e');
return +(pair[0] + 'e' + (+pair[1] - precision));
}
return func(value);
};
}
function leftPad(str, len = 0, ch = ' ') {
str = String(str);
ch = toString(ch);
let i = -1;
const length = len - str.length;
while (++i < length && str.length + ch.length <= len) {
str = ch + str;
}
return str;
}
function rightPad(str, len = 0, ch = ' ') {
str = String(str);
ch = toString(ch);
let i = -1;
const length = len - str.length;
while (++i < length && str.length + ch.length <= len) {
str += ch;
}
return str;
}
function toString(value) {
return `${value}`;
}
function pad(str, len = 0, ch = ' ') {
str = String(str);
ch = toString(ch);
let i = -1;
const length = len - str.length;
let left = true;
while (++i < length) {
const l = str.length + ch.length <= len ? str.length + ch.length : str.length + 1;
if (left) {
str = leftPad(str, l, ch);
}
else {
str = rightPad(str, l, ch);
}
left = !left;
}
return str;
}
function flatten(input, index = 0) {
if (index >= input.length) {
return input;
}
if (isArray(input[index])) {
return flatten(input.slice(0, index).concat(input[index], input.slice(index + 1)), index);
}
return flatten(input, index + 1);
}
function getProperty(value, key) {
if (isNil(value) || !isObject(value)) {
return undefined;
}
const keys = key.split('.');
let result = value[keys.shift()];
for (const key of keys) {
if (isNil(result) || !isObject(result)) {
return undefined;
}
result = result[key];
}
return result;
}
function sum(input, initial = 0) {
return input.reduce((previous, current) => previous + current, initial);
}
// http://stackoverflow.com/questions/6274339/how-can-i-shuffle-an-array-in-javascript
function shuffle(input) {
if (!isArray(input)) {
return input;
}
const copy = [...input];
for (let i = copy.length; i; --i) {
const j = Math.floor(Math.random() * i);
const x = copy[i - 1];
copy[i - 1] = copy[j];
copy[j] = x;
}
return copy;
}
function deepIndexOf(collection, value) {
let index = -1;
const length = collection.length;
while (++index < length) {
if (deepEqual(value, collection[index])) {
return index;
}
}
return -1;
}
function deepEqual(a, b) {
if (a === b) {
return true;
}
if (!(typeof a === 'object' && typeof b === 'object')) {
return a === b;
}
const keysA = Object.keys(a);
const keysB = Object.keys(b);
if (keysA.length !== keysB.length) {
return false;
}
// Test for A's keys different from B.
var hasOwn = Object.prototype.hasOwnProperty;
for (let i = 0; i < keysA.length; i++) {
const key = keysA[i];
if (!hasOwn.call(b, keysA[i]) || !deepEqual(a[key], b[key])) {
return false;
}
}
return true;
}
function isDeepObject(object) {
return object.__isDeepObject__;
}
function wrapDeep(object) {
return new DeepWrapper(object);
}
function unwrapDeep(object) {
if (isDeepObject(object)) {
return object.data;
}
return object;
}
class DeepWrapper {
constructor(data) {
this.data = data;
this.__isDeepObject__ = true;
}
}
function count(input) {
if (!isArray(input) && !isObject(input) && !isString(input)) {
return input;
}
if (isObject(input)) {
return Object.keys(input).map(value => input[value]).length;
}
return input.length;
}
function empty(input) {
if (!isArray(input)) {
return input;
}
return input.length === 0;
}
function every(input, predicate) {
if (!isArray(input) || !predicate) {
return input;
}
let result = true;
let i = -1;
while (++i < input.length && result) {
result = predicate(input[i], i, input);
}
return result;
}
function takeUntil(input, predicate) {
let i = -1;
const result = [];
while (++i < input.length && !predicate(input[i], i, input)) {
result[i] = input[i];
}
return result;
}
function takeWhile(input, predicate) {
return takeUntil(input, (item, index, collection) => !predicate(item, index, collection));
}
class GroupByPipe {
transform(input, prop) {
if (!isArray(input)) {
return input;
}
const arr = {};
for (const value of input) {
const field = getProperty(value, prop);
if (isUndefined(arr[field])) {
arr[field] = [];
}
arr[field].push(value);
}
return Object.keys(arr).map(key => ({ key, value: arr[key] }));
}
}
GroupByPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: GroupByPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
GroupByPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: GroupByPipe, name: "groupBy" });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: GroupByPipe, decorators: [{
type: Pipe,
args: [{
name: 'groupBy',
}]
}] });
class NgGroupByPipeModule {
}
NgGroupByPipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgGroupByPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
NgGroupByPipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgGroupByPipeModule, declarations: [GroupByPipe], exports: [GroupByPipe] });
NgGroupByPipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgGroupByPipeModule });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgGroupByPipeModule, decorators: [{
type: NgModule,
args: [{
declarations: [GroupByPipe],
exports: [GroupByPipe],
}]
}] });
class MaxPipe {
transform(input) {
if (!isArray(input)) {
return input;
}
if (input.length === 0) {
return undefined;
}
let max = input[0];
input.forEach((value) => {
if (max < value) {
max = value;
}
});
return max;
}
}
MaxPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MaxPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
MaxPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MaxPipe, name: "max" });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MaxPipe, decorators: [{
type: Pipe,
args: [{
name: 'max',
}]
}] });
class NgMaxPipeModule {
}
NgMaxPipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgMaxPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
NgMaxPipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgMaxPipeModule, declarations: [MaxPipe], exports: [MaxPipe] });
NgMaxPipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgMaxPipeModule });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgMaxPipeModule, decorators: [{
type: NgModule,
args: [{
declarations: [MaxPipe],
exports: [MaxPipe],
}]
}] });
class MeanPipe {
transform(input) {
if (!isArray(input)) {
return input;
}
const count = input.length;
if (count === 0) {
return undefined;
}
return sum(input) / count;
}
}
MeanPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MeanPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
MeanPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MeanPipe, name: "mean" });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MeanPipe, decorators: [{
type: Pipe,
args: [{
name: 'mean',
}]
}] });
class NgMeanPipeModule {
}
NgMeanPipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgMeanPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
NgMeanPipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgMeanPipeModule, declarations: [MeanPipe], exports: [MeanPipe] });
NgMeanPipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgMeanPipeModule });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgMeanPipeModule, decorators: [{
type: NgModule,
args: [{
declarations: [MeanPipe],
exports: [MeanPipe],
}]
}] });
class MinPipe {
transform(input) {
if (!isArray(input)) {
return input;
}
if (input.length === 0) {
return undefined;
}
let min = input[0];
input.forEach((value) => {
if (min > value) {
min = value;
}
});
return min;
}
}
MinPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MinPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
MinPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MinPipe, name: "min" });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MinPipe, decorators: [{
type: Pipe,
args: [{
name: 'min',
}]
}] });
class NgMinPipeModule {
}
NgMinPipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgMinPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
NgMinPipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgMinPipeModule, declarations: [MinPipe], exports: [MinPipe] });
NgMinPipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgMinPipeModule });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgMinPipeModule, decorators: [{
type: NgModule,
args: [{
declarations: [MinPipe],
exports: [MinPipe],
}]
}] });
class SumPipe {
transform(input) {
return !isArray(input) ? input : sum(input);
}
}
SumPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: SumPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
SumPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: SumPipe, name: "sum" });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: SumPipe, decorators: [{
type: Pipe,
args: [{ name: 'sum' }]
}] });
class NgSumPipeModule {
}
NgSumPipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgSumPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
NgSumPipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgSumPipeModule, declarations: [SumPipe], exports: [SumPipe] });
NgSumPipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgSumPipeModule });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgSumPipeModule, decorators: [{
type: NgModule,
args: [{
declarations: [SumPipe],
exports: [SumPipe],
}]
}] });
class NgAggregatePipesModule {
}
NgAggregatePipesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgAggregatePipesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
NgAggregatePipesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgAggregatePipesModule, imports: [NgGroupByPipeModule, NgMaxPipeModule, NgMeanPipeModule, NgMinPipeModule, NgSumPipeModule] });
NgAggregatePipesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgAggregatePipesModule, imports: [[NgGroupByPipeModule, NgMaxPipeModule, NgMeanPipeModule, NgMinPipeModule, NgSumPipeModule]] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgAggregatePipesModule, decorators: [{
type: NgModule,
args: [{
imports: [NgGroupByPipeModule, NgMaxPipeModule, NgMeanPipeModule, NgMinPipeModule, NgSumPipeModule],
}]
}] });
class EmptyPipe {
transform(input) {
return empty(input);
}
}
EmptyPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: EmptyPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
EmptyPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: EmptyPipe, name: "empty" });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: EmptyPipe, decorators: [{
type: Pipe,
args: [{
name: 'empty',
}]
}] });
class NgEmptyPipeModule {
}
NgEmptyPipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgEmptyPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
NgEmptyPipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgEmptyPipeModule, declarations: [EmptyPipe], exports: [EmptyPipe] });
NgEmptyPipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgEmptyPipeModule });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgEmptyPipeModule, decorators: [{
type: NgModule,
args: [{
declarations: [EmptyPipe],
exports: [EmptyPipe],
}]
}] });
class HeadPipe {
transform(input) {
if (!isArray(input)) {
return input;
}
// Will return undefined if length is 0
return input[0];
}
}
HeadPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: HeadPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
HeadPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: HeadPipe, name: "head" });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: HeadPipe, decorators: [{
type: Pipe,
args: [{
name: 'head',
}]
}] });
class NgHeadPipeModule {
}
NgHeadPipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgHeadPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
NgHeadPipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgHeadPipeModule, declarations: [HeadPipe], exports: [HeadPipe] });
NgHeadPipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgHeadPipeModule });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgHeadPipeModule, decorators: [{
type: NgModule,
args: [{
declarations: [HeadPipe],
exports: [HeadPipe],
}]
}] });
class InitialPipe {
transform(input) {
if (!isArray(input)) {
return input;
}
return input.slice(0, input.length - 1);
}
}
InitialPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: InitialPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
InitialPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: InitialPipe, name: "initial" });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: InitialPipe, decorators: [{
type: Pipe,
args: [{
name: 'initial',
}]
}] });
class NgInitialPipeModule {
}
NgInitialPipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgInitialPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
NgInitialPipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgInitialPipeModule, declarations: [InitialPipe], exports: [InitialPipe] });
NgInitialPipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgInitialPipeModule });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgInitialPipeModule, decorators: [{
type: NgModule,
args: [{
declarations: [InitialPipe],
exports: [InitialPipe],
}]
}] });
class LastPipe {
transform(input) {
if (!isArray(input)) {
return input;
}
// Returns undefined if empty
return input[input.length - 1];
}
}
LastPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: LastPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
LastPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: LastPipe, name: "last" });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: LastPipe, decorators: [{
type: Pipe,
args: [{
name: 'last',
}]
}] });
class NgLastPipeModule {
}
NgLastPipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgLastPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
NgLastPipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgLastPipeModule, declarations: [LastPipe], exports: [LastPipe] });
NgLastPipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgLastPipeModule });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgLastPipeModule, decorators: [{
type: NgModule,
args: [{
declarations: [LastPipe],
exports: [LastPipe],
}]
}] });
class JoinPipe {
transform(input, character = '') {
if (!isArray(input)) {
return input;
}
return input.join(character);
}
}
JoinPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: JoinPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
JoinPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: JoinPipe, name: "join" });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: JoinPipe, decorators: [{
type: Pipe,
args: [{
name: 'join',
}]
}] });
class NgJoinPipeModule {
}
NgJoinPipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgJoinPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
NgJoinPipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgJoinPipeModule, declarations: [JoinPipe], exports: [JoinPipe] });
NgJoinPipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgJoinPipeModule });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgJoinPipeModule, decorators: [{
type: NgModule,
args: [{
declarations: [JoinPipe],
exports: [JoinPipe],
}]
}] });
class TailPipe {
transform(input) {
if (!isArray(input)) {
return input;
}
return input.slice(1, input.length);
}
}
TailPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TailPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
TailPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TailPipe, name: "tail" });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TailPipe, decorators: [{
type: Pipe,
args: [{
name: 'tail',
}]
}] });
class NgTailPipeModule {
}
NgTailPipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgTailPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
NgTailPipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgTailPipeModule, declarations: [TailPipe], exports: [TailPipe] });
NgTailPipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgTailPipeModule });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgTailPipeModule, decorators: [{
type: NgModule,
args: [{
declarations: [TailPipe],
exports: [TailPipe],
}]
}] });
class UniqPipe {
transform(input) {
if (!isArray(input) && !isDeepObject(input)) {
return input;
}
if (isDeepObject(input)) {
const unwrappedInput = unwrapDeep(input);
if (!isArray(unwrappedInput)) {
return unwrappedInput;
}
return unwrappedInput.filter((value, index) => deepIndexOf(unwrappedInput, value) === index);
}
return input.filter((value, index) => input.indexOf(value) === index);
}
}
UniqPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: UniqPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
UniqPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: UniqPipe, name: "uniq" });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: UniqPipe, decorators: [{
type: Pipe,
args: [{
name: 'uniq',
}]
}] });
class NgUniqPipeModule {
}
NgUniqPipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgUniqPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
NgUniqPipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgUniqPipeModule, declarations: [UniqPipe], exports: [UniqPipe] });
NgUniqPipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgUniqPipeModule });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgUniqPipeModule, decorators: [{
type: NgModule,
args: [{
declarations: [UniqPipe],
exports: [UniqPipe],
}]
}] });
class WithoutPipe {
transform(input, ...args) {
if (!isArray(input) && !isDeepObject(input)) {
return input;
}
if (isDeepObject(input)) {
const unwrappedInput = unwrapDeep(input);
if (!isArray(unwrappedInput)) {
return unwrappedInput;
}
return unwrappedInput.filter((value) => deepIndexOf(args, value) === -1);
}
return input.filter((value) => args.indexOf(value) === -1);
}
}
WithoutPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: WithoutPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
WithoutPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: WithoutPipe, name: "without" });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: WithoutPipe, decorators: [{
type: Pipe,
args: [{
name: 'without',
}]
}] });
class NgWithoutPipeModule {
}
NgWithoutPipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgWithoutPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
NgWithoutPipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgWithoutPipeModule, declarations: [WithoutPipe], exports: [WithoutPipe] });
NgWithoutPipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgWithoutPipeModule });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgWithoutPipeModule, decorators: [{
type: NgModule,
args: [{
declarations: [WithoutPipe],
exports: [WithoutPipe],
}]
}] });
class MapPipe {
transform(input, fn) {
if (!isArray(input) || !fn) {
return input;
}
return input.map(fn);
}
}
MapPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MapPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
MapPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MapPipe, name: "map" });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MapPipe, decorators: [{
type: Pipe,
args: [{
name: 'map',
}]
}] });
class NgMapPipeModule {
}
NgMapPipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgMapPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
NgMapPipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgMapPipeModule, declarations: [MapPipe], exports: [MapPipe] });
NgMapPipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgMapPipeModule });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgMapPipeModule, decorators: [{
type: NgModule,
args: [{
declarations: [MapPipe],
exports: [MapPipe],
}]
}] });
class WherePipe {
/**
* Support a function or a value or the shorthand ['key', value] like the lodash shorthand.
*/
transform(input, fn) {
if (!isArray(input)) {
return input;
}
if (isFunction(fn)) {
return input.filter(fn);
}
else if (isArray(fn)) {
const [key, value] = fn;
return input.filter((item) => getProperty(item, key) === value);
}
else if (fn) {
return input.filter((item) => item === fn);
}
else {
return input;
}
}
}
WherePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: WherePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
WherePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: WherePipe, name: "where" });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: WherePipe, decorators: [{
type: Pipe,
args: [{
name: 'where',
}]
}] });
class NgWherePipeModule {
}
NgWherePipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgWherePipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
NgWherePipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgWherePipeModule, declarations: [WherePipe], exports: [WherePipe] });
NgWherePipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgWherePipeModule });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgWherePipeModule, decorators: [{
type: NgModule,
args: [{
declarations: [WherePipe],
exports: [WherePipe],
}]
}] });
class FirstOrDefaultPipe {
static find(input, predicate, defaultValue) {
let found = false;
let result;
let i = -1;
while (!found && ++i < input.length) {
found = predicate(input[i], i, input);
}
if (found) {
result = input[i];
}
if (typeof result === 'undefined' && typeof defaultValue !== 'undefined') {
result = defaultValue;
}
return result;
}
transform(input, predicate, defaultValue) {
if (!isArray(input)) {
return input;
}
if (isFunction(predicate)) {
return FirstOrDefaultPipe.find(input, predicate, defaultValue);
}
else if (isArray(predicate)) {
const [key, value] = predicate;
return FirstOrDefaultPipe.find(input, (item) => getProperty(item, key) === value, defaultValue);
}
else if (predicate) {
return FirstOrDefaultPipe.find(input, item => item === predicate, defaultValue);
}
else {
return input;
}
}
}
FirstOrDefaultPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: FirstOrDefaultPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
FirstOrDefaultPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: FirstOrDefaultPipe, name: "firstOrDefault" });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: FirstOrDefaultPipe, decorators: [{
type: Pipe,
args: [{
name: 'firstOrDefault',
}]
}] });
class NgFirstOrDefaultPipeModule {
}
NgFirstOrDefaultPipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgFirstOrDefaultPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
NgFirstOrDefaultPipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgFirstOrDefaultPipeModule, declarations: [FirstOrDefaultPipe], exports: [FirstOrDefaultPipe] });
NgFirstOrDefaultPipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgFirstOrDefaultPipeModule });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgFirstOrDefaultPipeModule, decorators: [{
type: NgModule,
args: [{
declarations: [FirstOrDefaultPipe],
exports: [FirstOrDefaultPipe],
}]
}] });
class RangePipe {
transform(_input, size = 0, start = 1, step = 1) {
const range = [];
for (let length = 0; length < size; ++length) {
range.push(start);
start += step;
}
return range;
}
}
RangePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: RangePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
RangePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: RangePipe, name: "range" });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: RangePipe, decorators: [{
type: Pipe,
args: [{
name: 'range',
}]
}] });
class NgRangePipeModule {
}
NgRangePipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgRangePipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
NgRangePipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgRangePipeModule, declarations: [RangePipe], exports: [RangePipe] });
NgRangePipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgRangePipeModule });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgRangePipeModule, decorators: [{
type: NgModule,
args: [{
declarations: [RangePipe],
exports: [RangePipe],
}]
}] });
class PluckPipe {
transform(input, key) {
if (!isArray(input) || !key) {
return input;
}
return input.map((value) => {
return getProperty(value, key);
});
}
}
PluckPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: PluckPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
PluckPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: PluckPipe, name: "pluck" });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: PluckPipe, decorators: [{
type: Pipe,
args: [{
name: 'pluck',
}]
}] });
class NgPluckPipeModule {
}
NgPluckPipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgPluckPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
NgPluckPipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgPluckPipeModule, declarations: [PluckPipe], exports: [PluckPipe] });
NgPluckPipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgPluckPipeModule });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgPluckPipeModule, decorators: [{
type: NgModule,
args: [{
declarations: [PluckPipe],
exports: [PluckPipe],
}]
}] });
class ReversePipe {
transform(input) {
if (!isArray(input)) {
return input;
}
return [...input].reverse();
}
}
ReversePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: ReversePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
ReversePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: ReversePipe, name: "reverse" });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: ReversePipe, decorators: [{
type: Pipe,
args: [{
name: 'reverse',
}]
}] });
class NgReversePipeModule {
}
NgReversePipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgReversePipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
NgReversePipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgReversePipeModule, declarations: [ReversePipe], exports: [ReversePipe] });
NgReversePipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgReversePipeModule });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgReversePipeModule, decorators: [{
type: NgModule,
args: [{
declarations: [ReversePipe],
exports: [ReversePipe],
}]
}] });
class OrderByPipe {
static _orderBy(a, b) {
if (a instanceof Date && b instanceof Date) {
return a < b ? -1 : a > b ? 1 : 0;
}
const floatA = parseFloat(a);
const floatB = parseFloat(b);
if (typeof a === 'string' && typeof b === 'string' && (isNaN(floatA) || isNaN(floatB))) {
const lowerA = a.toLowerCase();
const lowerB = b.toLowerCase();
return lowerA < lowerB ? -1 : lowerA > lowerB ? 1 : 0;
}
return floatA < floatB ? -1 : floatA > floatB ? 1 : 0;
}
transform(input, config = '+') {
if (!isArray(input)) {
return input;
}
const configIsArray = isArray(config);
// If config === 'param' OR ['param']
if (!configIsArray || (configIsArray && config.length === 1)) {
const propertyToCheck = configIsArray ? config[0] : config;
const first = propertyToCheck.substr(0, 1);
const desc = first === '-'; // First character is '-'
// Basic array (if only + or - is present)
if (!propertyToCheck || propertyToCheck === '-' || propertyToCheck === '+') {
return [...input].sort((a, b) => {
const comparator = OrderByPipe._orderBy(a, b);
return desc ? -comparator : comparator;
});
}
else {
// If contains + or -, substring the property
const property = first === '+' || desc ? propertyToCheck.substr(1) : propertyToCheck;
return [...input].sort((a, b) => {
const comparator = OrderByPipe._orderBy(a[property], b[property]);
return desc ? -comparator : comparator;
});
}
}
else {
// Config is an array of property
return [...input].sort((a, b) => {
for (let i = 0; i < config.length; ++i) {
const first = config[i].substr(0, 1);
const desc = first === '-';
const property = first === '+' || desc ? config[i].substr(1) : config[i];
const comparator = OrderByPipe._orderBy(a[property], b[property]);
const comparison = desc ? -comparator : comparator;
if (comparison !== 0) {
return comparison;
}
}
return 0;
});
}
}
}
OrderByPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: OrderByPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
OrderByPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: OrderByPipe, name: "orderBy" });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: OrderByPipe, decorators: [{
type: Pipe,
args: [{
name: 'orderBy',
}]
}] });
class NgOrderByPipeModule {
}
NgOrderByPipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgOrderByPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
NgOrderByPipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgOrderByPipeModule, declarations: [OrderByPipe], exports: [OrderByPipe] });
NgOrderByPipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgOrderByPipeModule });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgOrderByPipeModule, decorators: [{
type: NgModule,
args: [{
declarations: [OrderByPipe],
exports: [OrderByPipe],
}]
}] });
class CountPipe {
transform(input) {
return count(input);
}
}
CountPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CountPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
CountPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CountPipe, name: "count" });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CountPipe, decorators: [{
type: Pipe,
args: [{
name: 'count',
}]
}] });
class NgCountPipeModule {
}
NgCountPipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgCountPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
NgCountPipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgCountPipeModule, declarations: [CountPipe], exports: [CountPipe] });
NgCountPipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgCountPipeModule });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgCountPipeModule, decorators: [{
type: NgModule,
args: [{
declarations: [CountPipe],
exports: [CountPipe],
}]
}] });
class SomePipe {
transform(input, predicate) {
if (!isArray(input) || !predicate) {
return input;
}
let result = false;
let i = -1;
while (++i < input.length && !result) {
result = predicate(input[i], i, input);
}
return result;
}
}
SomePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: SomePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
SomePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: SomePipe, name: "some" });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: SomePipe, decorators: [{
type: Pipe,
args: [{
name: 'some',
}]
}] });
class NgSomePipeModule {
}
NgSomePipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgSomePipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
NgSomePipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgSomePipeModule, declarations: [SomePipe], exports: [SomePipe] });
NgSomePipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgSomePipeModule });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgSomePipeModule, decorators: [{
type: NgModule,
args: [{
declarations: [SomePipe],
exports: [SomePipe],
}]
}] });
class EveryPipe {
transform(input, predicate) {
return every(input, predicate);
}
}
EveryPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: EveryPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
EveryPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: EveryPipe, name: "every" });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: EveryPipe, decorators: [{
type: Pipe,
args: [{
name: 'every',
}]
}] });
class NgEveryPipeModule {
}
NgEveryPipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgEveryPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
NgEveryPipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgEveryPipeModule, declarations: [EveryPipe], exports: [EveryPipe] });
NgEveryPipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgEveryPipeModule });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgEveryPipeModule, decorators: [{
type: NgModule,
args: [{
declarations: [EveryPipe],
exports: [EveryPipe],
}]
}] });
class ShufflePipe {
transform(input) {
return shuffle(input);
}
}
ShufflePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: ShufflePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
ShufflePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: ShufflePipe, name: "shuffle" });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: ShufflePipe, decorators: [{
type: Pipe,
args: [{
name: 'shuffle',
}]
}] });
class NgShufflePipeModule {
}
NgShufflePipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgShufflePipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
NgShufflePipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgShufflePipeModule, declarations: [ShufflePipe], exports: [ShufflePipe] });
NgShufflePipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgShufflePipeModule });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NgShufflePipeModule, decorators: [{
type: NgModule,
args: [{
declarations: [ShufflePipe],
exports: [ShufflePipe],
}]
}] });
class TakePipe {
transform(input, quantity) {
if (!isArray(input)) {
return input;
}
return input.slice(0, quantity || 1);
}
}
TakePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TakePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
TakePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TakePipe, name: "take" });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: Take