@eldoy/webdb 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +2 -2
  2. package/index.js +1 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -39,8 +39,8 @@ var removed = await db('user').remove(
39
39
  { name: 'B' }
40
40
  )
41
41
 
42
- // Upsert (create or update one)
43
- var doc = await db('user').upsert(
42
+ // Put (create or update one)
43
+ var doc = await db('user').put(
44
44
  { email: 'a@example.com' },
45
45
  { email: 'a@example.com', name: 'Alice' }
46
46
  )
package/index.js CHANGED
@@ -46,7 +46,7 @@ function api(name, server) {
46
46
  return docs.length
47
47
  },
48
48
 
49
- upsert: async function (query, update) {
49
+ put: async function (query, update) {
50
50
  var dbi = await ensure(name, server)
51
51
 
52
52
  // find one match
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eldoy/webdb",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "Document database client powered by CouchDB.",
5
5
  "publishConfig": {
6
6
  "access": "public"