Skip to content

Crawlee—A web scraping and browser automation library for Node.js to build reliable crawlers. In JavaScript and TypeScript. Extract data for AI, LLMs, RAG, or GPTs. Download HTML, PDF, JPG, PNG, and other files from websites. Works with Puppeteer, Playwright, Cheerio, JSDOM, and raw HTTP. Both headful and headless mode. With proxy rotation.

Updated docs and comments: changed "key value store" to "key-value store"

Jan Curnbdec22ceb7d8
diff --git a/src/key_value_store.js b/src/key_value_store.js
index 183c378c7..76b50e3cb 100644
--- a/src/key_value_store.js
+++ b/src/key_value_store.js
@@ -123,7 +123,7 @@ export const maybeStringify = (value, options) => {
* ```
* {APIFY_LOCAL_STORAGE_DIR}/key_value_stores/{STORE_ID}/{INDEX}.{EXT}
* ```
- * Note that `{STORE_ID}` is the name or ID of the key-value store. The default key value store has ID: `default`,
+ * Note that `{STORE_ID}` is the name or ID of the key-value store. The default key-value store has ID: `default`,
* unless you override it by setting the `APIFY_DEFAULT_KEY_VALUE_STORE_ID` environment variable.
* The `{KEY}` is the key of the record and `{EXT}` corresponds to the MIME content type of the data value.
*
@@ -305,7 +305,7 @@ export class KeyValueStore {
/**
* Returns a URL for the given key that may be used to publicly
- * access the value in the remote key value store.
+ * access the value in the remote key-value store.
*
* @param {string} key
* @return {string}
@@ -315,7 +315,7 @@ export class KeyValueStore {
}
/**
- * Iterates over key value store keys, yielding each in turn to an `iteratee` function.
+ * Iterates over key-value store keys, yielding each in turn to an `iteratee` function.
* Each invocation of `iteratee` is called with three arguments: `(key, index, info)`, where `key`
* is the record key, `index` is a zero-based index of the key in the current iteration
* (regardless of `options.exclusiveStartKey`) and `info` is an object that contains a single property `size`
@@ -332,7 +332,7 @@ export class KeyValueStore {
* });
* ```
*
- * @param {KeyConsumer} iteratee A function that is called for every key in the key value store.
+ * @param {KeyConsumer} iteratee A function that is called for every key in the key-value store.
* @param {Object} [options] All `forEachKey()` parameters are passed
* via an options object with the following keys:
* @param {string} [options.exclusiveStartKey] All keys up to this one (including) are skipped from the result.
@@ -598,7 +598,7 @@ const getOrCreateKeyValueStore = (storeIdOrName) => {
export const openKeyValueStore = (storeIdOrName, options = {}) => {
checkParamOrThrow(storeIdOrName, 'storeIdOrName', 'Maybe String');
checkParamOrThrow(options, 'options', 'Object');
- ensureTokenOrLocalStorageEnvExists('key value store');
+ ensureTokenOrLocalStorageEnvExists('key-value store');
const { forceCloud = false } = options;
checkParamOrThrow(forceCloud, 'options.forceCloud', 'Boolean');
diff --git a/src/request_list.js b/src/request_list.js
index d7e51c438..cc37f3f2f 100644
--- a/src/request_list.js
+++ b/src/request_list.js
@@ -758,7 +758,7 @@ export class RequestList {
*
* {@link RequestList} represents a list of URLs to crawl, which is always stored in memory.
* To enable picking up where left off after a process restart, the request list sources
- * are persisted to the key value store at initialization of the list. Then, while crawling,
+ * are persisted to the key-value store at initialization of the list. Then, while crawling,
* a small state object is regularly persisted to keep track of the crawling status.
*
* For more details and code examples, see the {@link RequestList} class.
@@ -777,11 +777,11 @@ export class RequestList {
*
* @param {string|null} listName
* Name of the request list to be opened. Setting a name enables the `RequestList`'s state to be persisted
- * in the key value store. This is useful in case of a restart or migration. Since `RequestList` is only
+ * in the key-value store. This is useful in case of a restart or migration. Since `RequestList` is only
* stored in memory, a restart or migration wipes it clean. Setting a name will enable the `RequestList`'s
* state to survive those situations and continue where it left off.
*
- * The name will be used as a prefix in key value store, producing keys such as `NAME-REQUEST_LIST_STATE`
+ * The name will be used as a prefix in key-value store, producing keys such as `NAME-REQUEST_LIST_STATE`
* and `NAME-REQUEST_LIST_SOURCES`.
*
* If `null`, the list will not be persisted and will only be stored in memory. Process restart