Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ngx-filter-pipe

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-filter-pipe - npm Package Compare versions

Comparing version 2.1.1 to 2.1.2

3

bundles/ngx-filter-pipe.umd.js

@@ -108,6 +108,7 @@ (function (global, factory) {

FilterPipe.prototype.filterByOr = function (filter) {
var _this = this;
return function (value) {
var /** @type {?} */ length = filter.length;
var /** @type {?} */ arrayComparison = function (i) { return value.indexOf(filter[i]) !== -1; };
var /** @type {?} */ otherComparison = function (i) { return value === filter[i]; };
var /** @type {?} */ otherComparison = function (i) { return _this.isMatching(filter[i], value); };
var /** @type {?} */ comparison = Array.isArray(value) ? arrayComparison : otherComparison;

@@ -114,0 +115,0 @@ for (var /** @type {?} */ i = 0; i < length; i++) {

@@ -1,2 +0,2 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core")):"function"==typeof define&&define.amd?define(["exports","@angular/core"],e):e(t["ngx-filter-pipe"]={},t.ng.core)}(this,function(t,e){"use strict";var r=function(){function t(){}return t.isFoundOnWalking=function(t,e){var r=t,n=!1;do{if(r.hasOwnProperty(e)||Object.getOwnPropertyDescriptor(r,e)){n=!0;break}}while(r=Object.getPrototypeOf(r));return n},t.isNumber=function(t){return!isNaN(parseInt(t,10))&&isFinite(t)},t.getValue=function(t){return"function"==typeof t?t():t},t.prototype.filterByString=function(t){return t&&(t=t.toLowerCase()),function(e){return!t||!!e&&-1!==(""+e).toLowerCase().indexOf(t)}},t.prototype.filterByBoolean=function(t){return function(e){return Boolean(e)===t}},t.prototype.filterByObject=function(e){var r=this;return function(n){for(var i in e)if("$or"!==i){if(!n||!t.isFoundOnWalking(n,i))return!1;if(!r.isMatching(e[i],t.getValue(n[i])))return!1}else if(!r.filterByOr(e.$or)(t.getValue(n)))return!1;return!0}},t.prototype.isMatching=function(t,e){switch(typeof t){case"boolean":return this.filterByBoolean(t)(e);case"string":return this.filterByString(t)(e);case"object":return this.filterByObject(t)(e)}return this.filterDefault(t)(e)},t.prototype.filterByOr=function(t){return function(e){for(var r=t.length,n=Array.isArray(e)?function(r){return-1!==e.indexOf(t[r])}:function(r){return e===t[r]},i=0;i<r;i++)if(n(i))return!0;return!1}},t.prototype.filterDefault=function(t){return function(e){return t===undefined||t==e}},t.prototype.transform=function(e,r){if(!e)return e;switch(typeof r){case"boolean":return e.filter(this.filterByBoolean(r));case"string":return t.isNumber(r)?e.filter(this.filterDefault(r)):e.filter(this.filterByString(r));case"object":return e.filter(this.filterByObject(r));case"function":return e.filter(r)}return e.filter(this.filterDefault(r))},t}();r.decorators=[{type:e.Pipe,args:[{name:"filterBy",pure:!1}]},{type:e.Injectable}],r.ctorParameters=function(){return[]};var n=function(){return function(){}}();n.decorators=[{type:e.NgModule,args:[{declarations:[r],providers:[r],exports:[r]}]}],n.ctorParameters=function(){return[]},t.FilterPipeModule=n,t.FilterPipe=r,Object.defineProperty(t,"__esModule",{value:!0})});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core")):"function"==typeof define&&define.amd?define(["exports","@angular/core"],e):e(t["ngx-filter-pipe"]={},t.ng.core)}(this,function(t,e){"use strict";var r=function(){function t(){}return t.isFoundOnWalking=function(t,e){var r=t,n=!1;do{if(r.hasOwnProperty(e)||Object.getOwnPropertyDescriptor(r,e)){n=!0;break}}while(r=Object.getPrototypeOf(r));return n},t.isNumber=function(t){return!isNaN(parseInt(t,10))&&isFinite(t)},t.getValue=function(t){return"function"==typeof t?t():t},t.prototype.filterByString=function(t){return t&&(t=t.toLowerCase()),function(e){return!t||!!e&&-1!==(""+e).toLowerCase().indexOf(t)}},t.prototype.filterByBoolean=function(t){return function(e){return Boolean(e)===t}},t.prototype.filterByObject=function(e){var r=this;return function(n){for(var i in e)if("$or"!==i){if(!n||!t.isFoundOnWalking(n,i))return!1;if(!r.isMatching(e[i],t.getValue(n[i])))return!1}else if(!r.filterByOr(e.$or)(t.getValue(n)))return!1;return!0}},t.prototype.isMatching=function(t,e){switch(typeof t){case"boolean":return this.filterByBoolean(t)(e);case"string":return this.filterByString(t)(e);case"object":return this.filterByObject(t)(e)}return this.filterDefault(t)(e)},t.prototype.filterByOr=function(t){var e=this;return function(r){for(var n=t.length,i=Array.isArray(r)?function(e){return-1!==r.indexOf(t[e])}:function(n){return e.isMatching(t[n],r)},o=0;o<n;o++)if(i(o))return!0;return!1}},t.prototype.filterDefault=function(t){return function(e){return t===undefined||t==e}},t.prototype.transform=function(e,r){if(!e)return e;switch(typeof r){case"boolean":return e.filter(this.filterByBoolean(r));case"string":return t.isNumber(r)?e.filter(this.filterDefault(r)):e.filter(this.filterByString(r));case"object":return e.filter(this.filterByObject(r));case"function":return e.filter(r)}return e.filter(this.filterDefault(r))},t}();r.decorators=[{type:e.Pipe,args:[{name:"filterBy",pure:!1}]},{type:e.Injectable}],r.ctorParameters=function(){return[]};var n=function(){return function(){}}();n.decorators=[{type:e.NgModule,args:[{declarations:[r],providers:[r],exports:[r]}]}],n.ctorParameters=function(){return[]},t.FilterPipeModule=n,t.FilterPipe=r,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=ngx-filter-pipe.umd.min.js.map

@@ -104,3 +104,3 @@ import { Pipe, Injectable, NgModule } from '@angular/core';

const /** @type {?} */ arrayComparison = (i) => value.indexOf(filter[i]) !== -1;
const /** @type {?} */ otherComparison = (i) => value === filter[i];
const /** @type {?} */ otherComparison = (i) => this.isMatching(filter[i], value);
const /** @type {?} */ comparison = Array.isArray(value) ? arrayComparison : otherComparison;

@@ -107,0 +107,0 @@ for (let /** @type {?} */ i = 0; i < length; i++) {

@@ -103,6 +103,7 @@ import { Pipe, Injectable, NgModule } from '@angular/core';

FilterPipe.prototype.filterByOr = function (filter) {
var _this = this;
return function (value) {
var /** @type {?} */ length = filter.length;
var /** @type {?} */ arrayComparison = function (i) { return value.indexOf(filter[i]) !== -1; };
var /** @type {?} */ otherComparison = function (i) { return value === filter[i]; };
var /** @type {?} */ otherComparison = function (i) { return _this.isMatching(filter[i], value); };
var /** @type {?} */ comparison = Array.isArray(value) ? arrayComparison : otherComparison;

@@ -109,0 +110,0 @@ for (var /** @type {?} */ i = 0; i < length; i++) {

{
"name": "ngx-filter-pipe",
"version": "2.1.1",
"version": "2.1.2",
"description": "Angular 5+ pipeline for filtering arrays",

@@ -5,0 +5,0 @@ "author": "Vadym Yatsyuk <vadym.yatsyuk@gmail.com>",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc