JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 512
  • Score
    100M100P100Q95777F
  • License MIT

JS lib to handle products search with E-Com Plus stores

Package Exports

  • @ecomplus/search-engine

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@ecomplus/search-engine) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

search-engine

CodeFactor npm version License MIT

JS lib to handle products search with E-Com Plus stores

CHANGELOG

Usage

The @ecomplus/search-engine package can be used to handle a full featured products search engine, from simple items search to applying multiple filters and aggregations.

It's available for both Node.js and browser environments.

Example

const search = new EcomSearch()
// Simple search example
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)
    }
  })

Dependencies

It requires and may not include:

Node.js

npm i --save @ecomplus/utils @ecomplus/search-engine

Webpack

npm i --save core-js @ecomplus/utils @ecomplus/search-engine

CDN

<script src="https://cdn.jsdelivr.net/npm/@ecomplus/search-engine/dist/ecom-search.var.min.js"></script>

_.cloneDeep, _.merge, ecomUtils and ecomClient libraries must be included separately and available on window scope.