This library can be used both on the server-side and on the client-side. The library's source is in ES6 and during build time, we transpile it to ES5 and generate two artificats - one that can be used on the server-side and another that uses Browserify and can be used on the client side.
Install via npm
$ npm install typesense
Include the minified JS file for use in the browser directly
Read the documentation here: https://typesense.org/api/
Here are some examples that show you how the client works: doc/examples
Tests are also a good place to know how the the library works internally: test
Note: When using this library client-side, please be sure to use the
search-only-api-key instead of the
master API key.
After checking out the repo, run
npm install to install dependencies. Then run
npm test to run the linter and tests.
To release a new version, run
npm build and then
Bug reports and pull requests are welcome on GitHub at https://github.com/typesense/typesense-js.