This package aims to provide an easy way to generate Amazon Urls for a range of page types.
npm i amazon-url-builder
5 methods are available to generate Urls. Each one for a specific page type:
buildUrlBestSellerByNodeSlug(slug)
generates an Url for a Node bestsellersbuildUrlNodeById(id)
generates an Url for a NodebuildUrlNodeById(id)
generates an Url for a NodebuildUrlSearchByTerm(searchTerm)
generates an Url for a search pagebuildUrlSearchByTermAndCategory(searchTerm, i)
generates an Url for a search page within a specific category identified by itsi
GET parameter
Tests and examples are not included in the Npm package to keep it lightweight. Use the repository for development
An example application is included. Run it with :
npm run dev
Issue reports, pull requests, suggestions and comments are very welcome !
Please keep in mind that this repo use commitizen -style commit messages and follow js standard's style