From 83bbddaef628b9c5b8d4ba0b5910e4c84e3d18ad Mon Sep 17 00:00:00 2001 From: Joris <31551856+CSDUMMI@users.noreply.github.com> Date: Fri, 16 Apr 2021 20:41:54 +0200 Subject: [PATCH] Added notice of an edge case --- API.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/API.md b/API.md index 444dd44..4d9f8e6 100644 --- a/API.md +++ b/API.md @@ -390,6 +390,7 @@ Returns a `Promise` that resolves to the multihash of the entry as a `String`. #### get(key) Returns an `Array` with a single `Object` if key exists. +If it does not exist, this returns an empty array. ```javascript const profile = db.get('shamb0t') // [{ _id: 'shamb0t', name: 'shamb0t', followers: 500 }] @@ -399,6 +400,7 @@ Returns an `Array` with a single `Object` if key exists. // [{ _id: 'shamb0t', name: 'shamb0t', followers: 500 }] ``` + #### query(mapper) Returns an `Array` of `Objects` based on the `mapper`. ```javascript