@pga/algolia-utils
Advanced tools
Comparing version 0.0.2 to 0.0.3
{ | ||
"name": "@pga/algolia-utils", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Utility functions for Algolia Search", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
const { map, compose, join, toPairs, filter, trim } = require('ramda') | ||
const calcMarginSalary = compensation => compensation / 10 | ||
const DEFAULT_EMPLOYMENT_FILTERS = 'employment_type:\'Year Round\' OR employment_type:\'Part Time\'' | ||
@@ -16,4 +14,4 @@ | ||
salaryRange: ({ baseCompMin }) => | ||
(typeof baseCompMin === 'number') | ||
? `((base_compensation_max.value > ${baseCompMin - calcMarginSalary(baseCompMin)}) OR (total_compensation > ${baseCompMin - calcMarginSalary(baseCompMin)}))` | ||
baseCompMin | ||
? `(annual_compensation_min.value >= ${baseCompMin} OR annual_compensation_max.value >= ${baseCompMin})` | ||
: '', | ||
@@ -20,0 +18,0 @@ locations: locations => |
6058
161