@chiper-inc/ecommerce-lib
TypeScript icon, indicating that this package has built-in type declarations

1.3.8 • Public • Published

ecommerce lib

Features

  • Type base Shop Cart
  • Calculate total and subtotal of a Cart

Installing

$ npm install ecommerce-lib

Example

// for v3 payload
const cart = Cart.fromShopCart(data.json);
// or for v4 payload
const cart = Cart.from(data.json);

cart.items[1].quanitty = 5;

const total = cart.getTotal();
const subtotal = cart.getSubtotal();

Publish

npm install
npm run build
npm login
npm publish 

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.3.866latest

Version History

VersionDownloads (Last 7 Days)Published
1.3.866
1.3.72
1.3.60
1.3.50
1.3.40
1.3.30
1.3.20
1.3.10
1.3.01
1.2.90
1.2.80
1.2.70
1.2.60
1.2.51
1.2.40
1.2.30
1.2.20
1.2.10
1.2.00
1.1.45
1.1.30
1.1.20
1.1.10
1.1.00
1.0.20
1.0.10
1.0.00
0.9.124
0.9.00
0.8.10
0.8.00
0.7.70
0.7.60
0.7.50
0.7.40
0.7.30
0.7.20
0.7.10
0.7.01
0.6.140
0.6.130
0.6.120
0.6.110
0.6.100
0.6.90
0.6.80

Package Sidebar

Install

npm i @chiper-inc/ecommerce-lib

Weekly Downloads

70

Version

1.3.8

License

ISC

Unpacked Size

147 kB

Total Files

50

Last publish

Collaborators

  • chespisan
  • tomas2400
  • devleonardomrabelo
  • brayanacebo
  • michaelrl
  • oscardrt
  • oscardev
  • jjuan1k94
  • brunomacedo