From 1e1b1de2cbaffd33f7f369e966a1669acea500d9 Mon Sep 17 00:00:00 2001 From: Vincent Weevers Date: Sat, 20 Oct 2018 15:11:29 +0200 Subject: [PATCH] readme: value may not be null or undefined --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 07cfdd2d..3c5da2e0 100644 --- a/README.md +++ b/README.md @@ -111,7 +111,7 @@ The following options are for advanced performance tuning. Modify them only if y ### `db.put(key, value[, options], callback)` put() is an instance method on an existing database object, used to store new entries, or overwrite existing entries in the LevelDB store. -The `key` and `value` objects may either be strings or Buffers. Other object types are converted to strings with the `toString()` method. Keys may not be `null` or `undefined` and objects converted with `toString()` should not result in an empty-string. Values of `null`, `undefined`, `''`, `[]` and `Buffer.alloc(0)` (and any object resulting in a `toString()` of one of these) will be stored as a zero-length character array and will therefore be retrieved as either `''` or `Buffer.alloc(0)` depending on the type requested. +The `key` and `value` objects may either be strings or Buffers. Other object types are converted to strings with the `toString()` method. Keys may not be `null` or `undefined` and objects converted with `toString()` should not result in an empty-string. Values may not be `null` or `undefined`. Values of `''`, `[]` and `Buffer.alloc(0)` (and any object resulting in a `toString()` of one of these) will be stored as a zero-length character array and will therefore be retrieved as either `''` or `Buffer.alloc(0)` depending on the type requested. A richer set of data-types is catered for in `levelup`.