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

forage-bootstrap

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

forage-bootstrap - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

26

js/forage-app.js

@@ -66,7 +66,12 @@ var app = angular.module('forageSearchUI', ['ngRoute',

for (var i = 0; i < possibleFilters.length; i++) {
if ($location.search()['filter[' + possibleFilters[i] + '][]'])
if ($location.search()['filter[' + possibleFilters[i] + '][]']) {
url += '&filter[' + possibleFilters[i] + '][]=' +
$location.search()['filter[' + possibleFilters[i] + '][]'];
}
}
url += '&teaser=body'
if ($location.search()['facets']) {
url += '&facets=' + $location.search()['facets'];
}
url += '&teaser=body';
console.log(url);
$http.get(url).success(function(data) {

@@ -78,5 +83,18 @@ console.log(url);

if (data.query.filter) filter = data.query.filter;
for (var i in data.facets) {
//TODO deal with multiple values per filter
if (!filter[i]) {
var thisFacetCat = data.facets[i];
for (var k = 0; k < thisFacetCat.length; k++) {
var nav = {};
nav['label'] = thisFacetCat[k].key;
nav['count'] = thisFacetCat[k].value;
nav['url'] = ('#/' + url + '&filter[' +
i + '][]=' + thisFacetCat[k].key);
if (!navs[i]) navs[i] = [];
navs[i].push(nav);
}
/*
for (var k in data.facets[i]) {

@@ -91,4 +109,6 @@ var nav = {};

}
*/
}
}
}
// console.log(navs);

@@ -95,0 +115,0 @@ var activeFilters = [];

2

package.json
{
"name": "forage-bootstrap",
"version": "0.0.2",
"version": "0.0.3",
"description": "A lighweight bootstrap-angular.js frontend for Forage.js",

@@ -5,0 +5,0 @@ "main": "index.js",

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