Cordova JavaScript step by step sample code?

Is there equivalent JavaScript guidelines for CB Lite and Sync Gateway for Hybrid apps?

I don’t mean sample apps, I mean raw sample code and or steps using JavaScript.

Great example on how to create a manager and a database using Objective-C:

Great detailed documentation for objective-c, but what about JavaScript in terms of CB Lite and SG?

I know there’s got to be more to do this:

if (window.cblite) { window.cblite.getURL(function(err, url) { if (err) { logMessage("error launching Couchbase Lite: " + err) } else { logMessage("Couchbase Lite running at " + url); } }); } else { logMessage("error, Couchbase Lite plugin not found.") }

Any help would be appreciated.

Thank you

Couchbase Lite PhoneGap Plugin and ToDoLite-PhoneGap is the best sample for Cordova,FYI

Here are two more: