JS lib to handle products search with E-Com Plus stores
npm install @ecomplus/search-engine   
UMD JS lib to handle products search for E-Com Plus stores
The @ecomplus/search-engine package is a wrapper for E-Com Plus Search API, can be used to handle a full featured products search system, from simple items search to applying multiple filters and aggregations.
It's available for both Node.js and browser environments.
- Get started
- Class reference
``js
import EcomSearch from '@ecomplus/search-engine'
const search = new EcomSearch()
search.setSearchTerm('smartphone').fetch()
.then(result => {
search.getItems().forEach(item => {
console.log(item.name)
})
})
.catch(error => {
console.error(error)
if (error.response) {
console.log(error.response)
}
})
`
It _may_ require and doesn't include core-js (optional) and @ecomplus/utils (peer dependency).
#### Webpack
`bash`
npm i --save core-js @ecomplus/utils @ecomplus/search-engine
#### Node.js
`bash`
npm i --save @ecomplus/utils @ecomplus/search-engine
#### CDN
`html`
When importing from CDN, _.cloneDeep, _.merge, ecomUtils and ecomClient` libraries must be included separately and available on window scope.