daily pastebin goal
43%
SHARE
TWEET

Untitled

a guest Mar 14th, 2018 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. let FilterModel = {
  2.   filtersList: {},
  3.   filtersCount: 0,
  4.   isFilterActive: false,
  5.   setFilters: function(filter) {
  6.         let uuid = generateUniqueId();
  7.         filter['id'] = uuid;
  8.     this.filtersList[uuid] = filter;
  9.     this.filtersCount = Object.keys(this.filtersList).length;
  10.   },
  11.   removeFilter: function(filter) {
  12.     if (!filter || !filter.Name) return;
  13.     let d = delete this.filtersList[filter.id];
  14.     if (d) this.filtersCount -= 1;
  15.     return d;
  16.   }};
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top