How to update a record using couch with node sdk

Hi, I am converting from Mongo db to couch base, In cocuh base inserting and getting the records are working fine, But while trying for updating it gives an error when using replace it throws an error like this store.replace is not a function then I tried using upsert then it throws an error like this store.upsert is not a function .

Here is my code

app.put(’/api/store/update/:id’, jsonParser, function(req,res){
store.replace(,{storeName:req.body.storeName} ,function(err,result){
// store.upsert(,{storeName:req.body.storeName} ,function(err,result)
if (err) {
res.status = 400;
else {
res.status = 202;

This is my data in db:

“_type”: “Store”,
“created”: “2016-09-21T12:34:42.142Z”,
“_id”: “3cb6ff5c-2607-4727-a170-e05ade29a147”,
“storeName”: “store12”,
“address1”: “",
“address2”: "
“state”: "
“city”: "",
“zipcode”: "

Please help me if there any issue in my code. I am facing this issue from last two days any help much appreciated.