sergey-scherbina / checkout Goto Github PK
View Code? Open in Web Editor NEWJust coding task
Just coding task
Two main design principles are considered in the coding task implementation: 1. Keep it as simple as possible. 2. Functional programming for concise representation. Real production code had to be much more complicated for various reasons: 1. More rich API for items management - removing items, list items with prices for receipts etc. Basically, these additional API methods aren't hard to add, just some additional usual code. 2. Some management of measurement units and currencies may be required. In this implementation such things are just delegated to higher layers - this component just does its work for total cost checkout computations. 3. Error handling if price for some items aren't found in price list - this implementation just supposes that it shouldn' be possible. 4. Some cache of prices could be added - here such cache is delegated to price look-up mechanism. Author: Sergiy Shcherbyna [email protected]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.