Skip to content

Commit

Permalink
chore(constructor): update constructor methods
Browse files Browse the repository at this point in the history
  • Loading branch information
leomp12 committed Aug 29, 2019
1 parent 03551f1 commit f5046fe
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@ import { _config } from '@ecomplus/utils'

import addItem from './methods/add-item'
import addPoduct from './methods/add-product'
import increaseItemQnt from './methods/increase-item-qnt'
import removeItem from './methods/remove-item'
import save from './methods/save'
import clear from './methods/clear'

/**
* Vanilla JS library to handle shopping cart object on E-Com Plus stores.
* Simple JS library to handle shopping cart object on E-Com Plus stores.
* @module @ecomplus/shopping-cart
* @see EcomCart
*
Expand Down Expand Up @@ -67,6 +71,10 @@ export default function (storeId, storageKey = _key, localStorage = _storage) {
// instance methods
this.addItem = addItem
this.addPoduct = addPoduct
this.increaseItemQnt = increaseItemQnt
this.removeItem = removeItem
this.save = save
this.clear = clear

if (localStorage && storageKey) {
// try to preset cart data from storage
Expand Down

0 comments on commit f5046fe

Please sign in to comment.