src/lib/rules.js
// All the rules in the database
All the rules in the database
All the rules in the database
list(type) {
    if (type) {
      return this.rules
        .filter(rule => rule.get('type') === type)
        .map(withSpeed);
    }
    return this.rules.map(withSpeed);
  }
list ( type ) { if ( type ) { return this . rules . filter ( rule => rule . get ( 'type' ) === type ) . map ( withSpeed ) ; } return this . rules . map ( withSpeed ) ; }
All the rules in the database
All the rules in the database