diff --git a/src/docs/src/KV/list.md b/src/docs/src/KV/list.md index 0f66240cfa..03b950b90e 100755 --- a/src/docs/src/KV/list.md +++ b/src/docs/src/KV/list.md @@ -86,22 +86,49 @@ If the user has no keys, the array will be empty. Paginate results with a cursor -```html +```html;kv-list-pagination
+ + ``` Sort keys lexicographically diff --git a/src/docs/src/examples.js b/src/docs/src/examples.js index b6627d3a31..d84a493ed0 100644 --- a/src/docs/src/examples.js +++ b/src/docs/src/examples.js @@ -407,6 +407,12 @@ const examples = [ slug: 'kv-list', source: '/playground/examples/kv-list.html', }, + { + title: 'List (Pagination)', + description: 'Paginate key-value results with a cursor and limit using puter.kv.list(). Run and modify this example in the playground.', + slug: 'kv-list-pagination', + source: '/playground/examples/kv-list-pagination.html', + }, { title: 'List (Sorted)', description: 'See how keys are returned in lexicographic order with puter.kv.list(). Run and modify this example in the playground.', diff --git a/src/docs/src/playground/examples/kv-list-pagination.html b/src/docs/src/playground/examples/kv-list-pagination.html new file mode 100644 index 0000000000..30aa14c712 --- /dev/null +++ b/src/docs/src/playground/examples/kv-list-pagination.html @@ -0,0 +1,41 @@ + + + + + + diff --git a/src/docs/src/playground/examples/kv-list.html b/src/docs/src/playground/examples/kv-list.html index 7c2a8fa9e7..d2fc8dd7e4 100755 --- a/src/docs/src/playground/examples/kv-list.html +++ b/src/docs/src/playground/examples/kv-list.html @@ -7,19 +7,19 @@ await puter.kv.set('name', 'Puter Smith'); await puter.kv.set('age', 21); await puter.kv.set('isCool', true); - document.write("Key-value pairs created/updated