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(req.params.id,{storeName:req.body.storeName} ,function(err,result){
// store.upsert(req.params.id,{storeName:req.body.storeName} ,function(err,result)
if (err) {
res.status = 400;
res.send(err);
return;
}
else {
res.status = 202;
res.send(result);
}
})
})

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.