Skip to content

This a command line program written using Node.js and TypeScript which applies specific promotional rules to a dummy basket consisting of items provided via user input.

License

Notifications You must be signed in to change notification settings

KyranRana/basket-promotional-rules-applier

Repository files navigation

CI License: MIT

Basket Promotional Rule Applier

This is a command line program written using Node.js and TypeScript which applies specific promotional rules to a dummy basket consisting of items provided via user input.

The items the user can select from can be found below:

ID | Name | Price
0001 | Water Bottle | £24.95
0002 | Hoodie | £65.00
0003 | Sticker Set | £3.99

The promotional rules:

  • If you spend over £75 then you get a 10% discount
  • If you buy two or more water bottles then the price drops to £22.99 each

The steps to run this program:

  1. cd into the project directory
  2. yarn run:dev

Example usage:

Enter item ids: 0001,0001,0002,0003
£103.47

To optionally transpile the entire app to JS you can run yarn build.

About

This a command line program written using Node.js and TypeScript which applies specific promotional rules to a dummy basket consisting of items provided via user input.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published