### Complete Workflow Example Source: https://context7.com/unjs/rc9/llms.txt Demonstrates a comprehensive usage pattern for managing project and user configurations in a CLI application. ```APIDOC ## Complete Workflow Example ### Description A comprehensive example showing typical usage patterns for a CLI application, integrating project and user configuration management. ### Code Example ```typescript import { read, write, update, readUserConfig, writeUserConfig, updateUserConfig, parse, serialize } from "rc9"; // Initialize default project configuration const projectDefaults = { project: { name: "my-app", version: "1.0.0" }, build: { outDir: "dist", minify: true, sourceMaps: false }, server: { port: 3000, host: "localhost" } }; write(projectDefaults, { name: ".myapprc" }); // Read and modify project config const config = read({ name: ".myapprc" }); config.server.port = 8080; write(config, { name: ".myapprc" }); // Or use update for partial changes update({ "build.sourceMaps": true, "server.cors": true }, { name: ".myapprc" }); // Store user-specific settings (API tokens, preferences) writeUserConfig({ apiToken: "user-secret-token", defaultProject: "/path/to/project" }, ".myapprc"); // Update user config while preserving existing values updateUserConfig({ lastUsed: new Date().toISOString() }, ".myapprc"); // Parse configuration from environment or string source const envConfig = parse(process.env.MY_APP_CONFIG || ""); // Serialize for logging or debugging const configStr = serialize(read({ name: ".myapprc" })); console.log("Current configuration:\n" + configStr); ``` ``` -------------------------------- ### Define Configuration File Source: https://github.com/unjs/rc9/blob/main/README.md Example content for a .conf file. ```ini db.username=username db.password=multi word password db.enabled=true ``` -------------------------------- ### Install RC9 Source: https://github.com/unjs/rc9/blob/main/README.md Commands to install the package using various package managers. ```sh # ✨ Auto-detect npx nypm install rc9 # npm npm install rc9 # yarn yarn add rc9 # pnpm pnpm add rc9 # bun bun install rc9 # deno deno install npm:rc9 ``` -------------------------------- ### Implement complete workflow Source: https://context7.com/unjs/rc9/llms.txt Demonstrates a full lifecycle for managing project-local and user-specific configuration files. ```typescript import { read, write, update, readUserConfig, writeUserConfig, updateUserConfig, parse, serialize } from "rc9"; // Initialize default project configuration const projectDefaults = { project: { name: "my-app", version: "1.0.0" }, build: { outDir: "dist", minify: true, sourceMaps: false }, server: { port: 3000, host: "localhost" } }; write(projectDefaults, ".myapprc"); // Read and modify project config const config = read(".myapprc"); config.server.port = 8080; write(config, ".myapprc"); // Or use update for partial changes update({ "build.sourceMaps": true, "server.cors": true }, ".myapprc"); // Store user-specific settings (API tokens, preferences) writeUserConfig({ apiToken: "user-secret-token", defaultProject: "/path/to/project" }, ".myapprc"); // Update user config while preserving existing values updateUserConfig({ lastUsed: new Date().toISOString() }, ".myapprc"); // Parse configuration from environment or string source const envConfig = parse(process.env.MY_APP_CONFIG || ""); // Serialize for logging or debugging const configStr = serialize(read(".myapprc")); console.log("Current configuration:\n" + configStr); ``` -------------------------------- ### read Source: https://context7.com/unjs/rc9/llms.txt Reads a configuration file from the current working directory or a specified location. ```APIDOC ## read ### Description Reads a configuration file from the current working directory or a specified location. This is the primary function for reading project-level configuration. ### Parameters #### Request Body - **options** (string|object) - Optional - The filename or an object containing { name, dir, flat }. ### Response #### Success Response (200) - **config** (object) - The configuration object. ``` -------------------------------- ### Read and Write Configuration Source: https://github.com/unjs/rc9/blob/main/README.md Reading a configuration file, modifying it, and writing the changes back. ```ts const config = read(); // or read('.conf') // config = { // db: { // username: 'username', // password: 'multi word password', // enabled: true // } // } config.enabled = false; write(config); // or write(config, '.conf') ``` -------------------------------- ### parseFile Source: https://context7.com/unjs/rc9/llms.txt Reads and parses a configuration file from a specified path. ```APIDOC ## parseFile ### Description Reads and parses a configuration file from a specified path. Returns an empty object if the file does not exist. ### Parameters #### Path Parameters - **path** (string) - Required - The file system path to the configuration file. #### Query Parameters - **options** (object) - Optional - Configuration options (e.g., { flat: boolean }). ### Response #### Success Response (200) - **config** (object) - The parsed configuration object or {} if file does not exist. ``` -------------------------------- ### write Source: https://context7.com/unjs/rc9/llms.txt Writes a configuration object to a file, automatically serializing nested objects using dot notation. ```APIDOC ## write ### Description Writes a configuration object to a file, automatically serializing nested objects using dot notation. ### Parameters #### Request Body - **config** (object) - Required - The configuration object to write. - **options** (string|object) - Optional - The filename or an object containing { name, dir }. ### Response #### Success Response (200) - **void** - Writes the file to the disk. ``` -------------------------------- ### Manage User Configuration Source: https://github.com/unjs/rc9/blob/main/README.md Storing and reading configuration files in the user's config directory using XDG conventions. ```js writeUserConfig({ token: 123 }, ".zoorc"); // Will be saved in ~/.config/.zoorc const conf = readUserConfig(".zoorc"); // { token: 123 } ``` -------------------------------- ### serialize Source: https://context7.com/unjs/rc9/llms.txt Converts a configuration object to a string in the RC file format. ```APIDOC ## serialize ### Description Converts a configuration object to a string in the RC file format. ### Parameters #### Request Body - **config** (object) - Required - The configuration object to serialize. ### Response #### Success Response (200) - **string** (string) - The serialized RC format string. ``` -------------------------------- ### Project-Local Configuration Functions Source: https://context7.com/unjs/rc9/llms.txt Functions for managing configuration files within the project directory. ```APIDOC ## Project-Local Configuration Functions ### Description Functions for reading, writing, and updating configuration files located within the project directory. ### Functions - **`read(options?: RCOptions): object`**: Reads a configuration file. - **`write(config: object, options?: RCOptions): void`**: Writes a configuration object to a file. - **`update(updates: object, options?: RCOptions): object`**: Updates a configuration file by merging new values. ### Endpoint N/A (Local file system operation) ### Parameters - **`options`** (`RCOptions`) - Optional - Configuration options including `name`, `dir`, and `flat`. - **`config`** (`object`) - Required for `write` - The configuration object to write. - **`updates`** (`object`) - Required for `update` - An object containing the key-value pairs to update. Nested keys can be specified using dot notation. ### Request Example ```typescript import { read, write, update } from "rc9"; // Initialize default project configuration const projectDefaults = { project: { name: "my-app", version: "1.0.0" }, build: { outDir: "dist", minify: true, sourceMaps: false }, server: { port: 3000, host: "localhost" } }; write(projectDefaults, { name: ".myapprc" }); // Read and modify project config const config = read({ name: ".myapprc" }); config.server.port = 8080; write(config, { name: ".myapprc" }); // Or use update for partial changes update({ "build.sourceMaps": true, "server.cors": true }, { name: ".myapprc" }); ``` ### Response - **`read`**: Returns the parsed configuration object. - **`write`**: Returns void. - **`update`**: Returns the entire merged configuration object. ``` -------------------------------- ### Parsing and Serialization Source: https://context7.com/unjs/rc9/llms.txt Functions for parsing configuration from strings or environment variables and serializing configuration objects. ```APIDOC ## Parsing and Serialization ### Description Functions for parsing configuration from various sources and serializing configuration objects into strings. ### Functions - **`parse(source: string, options?: RCOptions): object`**: Parses configuration from a string (e.g., environment variables). - **`serialize(config: object, options?: RCOptions): string`**: Serializes a configuration object into a string. ### Endpoint N/A (Utility functions) ### Parameters - **`source`** (`string`) - Required for `parse` - The string source to parse (e.g., `process.env.MY_APP_CONFIG`). - **`config`** (`object`) - Required for `serialize` - The configuration object to serialize. - **`options`** (`RCOptions`) - Optional - Configuration options. ### Request Example ```typescript import { read, serialize, parse } from "rc9"; // Parse configuration from environment or string source const envConfig = parse(process.env.MY_APP_CONFIG || ""); // Serialize for logging or debugging const configStr = serialize(read(".myapprc")); console.log("Current configuration:\n" + configStr); ``` ### Response - **`parse`**: Returns the parsed configuration object. - **`serialize`**: Returns the serialized configuration as a string. ``` -------------------------------- ### update Source: https://context7.com/unjs/rc9/llms.txt Reads an existing configuration file, merges it with new values, and writes the result back. ```APIDOC ## update ### Description Reads an existing configuration file, merges it with new values, and writes the result back. New values take precedence over existing ones. ### Parameters #### Request Body - **updates** (object) - Required - The new values to merge. - **filename** (string) - Optional - The name of the file to update. ### Response #### Success Response (200) - **config** (object) - The merged configuration object. ``` -------------------------------- ### Import RC9 Utilities Source: https://github.com/unjs/rc9/blob/main/README.md Importing the available utility functions for ESM environments. ```js import { defaults, parse, parseFile, read, readUser, serialize, write, writeUser, readUserConfig, writeUserConfig, updateUserConfig, update, updateUser, } from "rc9"; ``` -------------------------------- ### Read user configuration Source: https://context7.com/unjs/rc9/llms.txt Reads a configuration file from the user's XDG-compliant config directory. ```typescript import { readUserConfig } from "rc9"; // Read from ~/.config/.myapprc const userConfig = readUserConfig(".myapprc"); // Example: Reading user preferences for a CLI tool // File: ~/.config/.mytoolrc // theme=dark // editor=vim // notifications=true const prefs = readUserConfig(".mytoolrc"); console.log(prefs.theme); // "dark" console.log(prefs.editor); // "vim" console.log(prefs.notifications); // true ``` -------------------------------- ### Write user configuration Source: https://context7.com/unjs/rc9/llms.txt Writes a configuration object to the user's XDG-compliant config directory. ```typescript import { writeUserConfig, readUserConfig } from "rc9"; // Store user preferences writeUserConfig({ token: "abc123xyz", defaultOrg: "my-organization", preferences: { theme: "dark", notifications: true } }, ".myapprc"); // Creates ~/.config/.myapprc // Verify the write const config = readUserConfig(".myapprc"); console.log(config.token); // "abc123xyz" ``` -------------------------------- ### Write configuration files with RC9 Source: https://context7.com/unjs/rc9/llms.txt Writes a configuration object to a file, automatically serializing nested objects using dot notation. ```typescript import { write, read } from "rc9"; // Write configuration to default .conf file const config = { db: { host: "localhost", port: 5432, credentials: { username: "admin", password: "secret" } }, cache: { enabled: true, ttl: 3600 } }; write(config); // Creates .conf file: // db.host="localhost" // db.port=5432 // db.credentials.username="admin" // db.credentials.password="secret" // cache.enabled=true // cache.ttl=3600 // Write to a named file write(config, ".myapprc"); // Write with options write(config, { name: ".myapprc", dir: "/path/to/project" }); ``` -------------------------------- ### Parse configuration files with RC9 Source: https://context7.com/unjs/rc9/llms.txt Reads and parses a configuration file from a specified path. Returns an empty object if the file does not exist. ```typescript import { parseFile } from "rc9"; // Parse a specific configuration file const config = parseFile("/path/to/.myapprc"); // Result: parsed configuration object or {} if file doesn't exist // With options const flatConfig = parseFile("/path/to/.myapprc", { flat: true }); ``` -------------------------------- ### Read configuration files with RC9 Source: https://context7.com/unjs/rc9/llms.txt Reads a configuration file from the current working directory or a specified location. This is the primary function for reading project-level configuration. ```typescript import { read } from "rc9"; // Read default .conf file from current directory const config = read(); // Read a named configuration file const npmConfig = read(".npmrc"); // Read with full options const customConfig = read({ name: ".myapprc", dir: "/path/to/project", flat: false }); // Example: Reading database configuration // File: .conf // db.host=localhost // db.port=5432 // db.ssl=true const dbConfig = read(); console.log(dbConfig.db.host); // "localhost" console.log(dbConfig.db.port); // 5432 (number, not string) console.log(dbConfig.db.ssl); // true (boolean) ``` -------------------------------- ### writeUserConfig Source: https://context7.com/unjs/rc9/llms.txt Writes a configuration object to the user's config directory, supporting XDG conventions. ```APIDOC ## writeUserConfig ### Description Writes a configuration object to the user's config directory (`$XDG_CONFIG_HOME` or `~/.config`). ### Method `writeUserConfig(config: object, fileName: string): void` ### Endpoint N/A (Local file system operation) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **config** (object) - Required - The configuration object to write. - **fileName** (string) - Required - The name of the configuration file. ### Request Example ```typescript import { writeUserConfig, readUserConfig } from "rc9"; // Store user preferences writeUserConfig({ token: "abc123xyz", defaultOrg: "my-organization", preferences: { theme: "dark", notifications: true } }, ".myapprc"); // Creates ~/.config/.myapprc // Verify the write const config = readUserConfig(".myapprc"); console.log(config.token); // "abc123xyz" ``` ### Response #### Success Response (200) None (operation is void). ``` -------------------------------- ### parse Source: https://context7.com/unjs/rc9/llms.txt Parses a configuration string into a JavaScript object with support for dot notation and automatic type conversion. ```APIDOC ## parse ### Description Parses a configuration string into a JavaScript object. Supports dot notation for nested objects, array syntax with `[]`, and automatic type conversion. ### Parameters #### Request Body - **input** (string) - Required - The configuration string to parse. - **options** (object) - Optional - Configuration options (e.g., { flat: boolean }). ### Request Example parse("db.port=5432\ndb.enabled=true") ### Response #### Success Response (200) - **object** (object) - The parsed configuration object. ``` -------------------------------- ### Serialize configuration objects with RC9 Source: https://context7.com/unjs/rc9/llms.txt Converts a configuration object to a string in the RC file format. ```typescript import { serialize } from "rc9"; const config = { api: { url: "https://api.example.com", timeout: 5000, retry: true }, logging: { level: "info" } }; const serialized = serialize(config); // Output: // api.url="https://api.example.com" // api.timeout=5000 // api.retry=true // logging.level="info" ``` -------------------------------- ### Configure RCOptions Source: https://context7.com/unjs/rc9/llms.txt Defines configuration options for rc9 functions, including file name, directory path, and object flattening behavior. ```typescript import { read, write, update } from "rc9"; interface RCOptions { name?: string; // Config file name (default: ".conf") dir?: string; // Directory path (default: process.cwd()) flat?: boolean; // Disable object flattening (default: false) } // Using options with different functions const config = read({ name: ".myapprc", dir: "/custom/path", flat: false }); write({ key: "value" }, { name: ".myapprc", dir: "/custom/path" }); update({ newKey: "newValue" }, { name: ".myapprc", dir: "/custom/path", flat: true }); ``` -------------------------------- ### Update configuration files with RC9 Source: https://context7.com/unjs/rc9/llms.txt Reads an existing configuration file, merges it with new values, and writes the result back. New values take precedence over existing ones. ```typescript import { update, read } from "rc9"; // Update specific values while preserving others // Existing .conf: db.host=localhost, db.port=5432 update({ "db.port": 3306 }); // Result: db.host=localhost, db.port=3306 // Update nested values update({ "db.credentials.password": "newpassword", "cache.enabled": false }); // Push to arrays using [] syntax update({ "plugins[]": "newPlugin" }); // Appends "newPlugin" to existing plugins array // Update returns the merged configuration const newConfig = update({ debug: true }, ".myapprc"); console.log(newConfig); ``` -------------------------------- ### readUserConfig Source: https://context7.com/unjs/rc9/llms.txt Reads a configuration file from the user's config directory, following XDG Base Directory conventions. ```APIDOC ## readUserConfig ### Description Reads a configuration file from the user's config directory (`$XDG_CONFIG_HOME` or `~/.config`). Follows XDG Base Directory conventions. ### Method `readUserConfig(fileName: string): object` ### Endpoint N/A (Local file system operation) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```typescript import { readUserConfig } from "rc9"; // Read from ~/.config/.myapprc const userConfig = readUserConfig(".myapprc"); // Example: Reading user preferences for a CLI tool // File: ~/.config/.mytoolrc // theme=dark // editor=vim // notifications=true const prefs = readUserConfig(".mytoolrc"); console.log(prefs.theme); // "dark" console.log(prefs.editor); // "vim" console.log(prefs.notifications); // true ``` ### Response #### Success Response (200) - **object** - The parsed configuration object from the user's config file. ``` -------------------------------- ### RCOptions Interface Source: https://context7.com/unjs/rc9/llms.txt Defines the configuration options available for RC9 functions. ```APIDOC ## RCOptions Interface ### Description Configuration options for all RC9 functions (`read`, `write`, `update`, `readUserConfig`, `writeUserConfig`, `updateUserConfig`). ### Interface Definition ```typescript interface RCOptions { name?: string; // Config file name (default: ".conf") dir?: string; // Directory path (default: process.cwd() for project-local, or user's config dir for user-specific) flat?: boolean; // Disable object flattening (default: false) } ``` ### Usage Example ```typescript import { read, write, update } from "rc9"; // Using options with different functions const config = read({ name: ".myapprc", dir: "/custom/path", flat: false }); write({ key: "value" }, { name: ".myapprc", dir: "/custom/path" }); update({ newKey: "newValue" }, { name: ".myapprc", dir: "/custom/path", flat: true }); ``` ``` -------------------------------- ### RC9 User Configuration API Source: https://github.com/unjs/rc9/blob/main/README.md Functions for managing configuration files within the user's home directory, adhering to XDG conventions. ```APIDOC ## RC9 User Configuration API ### Description Provides functions to read, write, and update configuration files stored in the user's config directory (e.g., `~/.config`). These functions follow XDG base directory specifications. ### Methods #### `readUserConfig(options?: RCOptions | string): RC` Reads configuration from the user's config directory. #### `writeUserConfig(config: RC, options?: RCOptions | string): void` Writes the given configuration object to the user's config directory. #### `updateUserConfig(config: RC, options?: RCOptions | string): RC` Updates an existing configuration in the user's config directory and returns the updated configuration. ### Parameters #### `options` (RCOptions | string) - `name` (string) - Optional - The name of the configuration file (e.g., '.zoorc'). - `dir` (string) - Optional - The directory to look for the configuration file (default: user's config directory). - `flat` (boolean) - Optional - If true, disables automatic flattening/unflattening of nested keys (default: false). ### Examples **Writing User Configuration:** ```ts import { writeUserConfig } from 'rc9'; writeUserConfig({ token: 123 }, '.zoorc'); // Saved in ~/.config/.zoorc ``` **Reading User Configuration:** ```ts import { readUserConfig } from 'rc9'; const conf = readUserConfig('.zoorc'); // Reads { token: 123 } from ~/.config/.zoorc console.log(conf); ``` **Updating User Configuration:** ```ts import { updateUserConfig } from 'rc9'; updateUserConfig({ 'api.key': 'new-key' }, '.apprc'); ``` ### Deprecated Methods > **Note:** `readUser`, `writeUser`, and `updateUser` are deprecated. Use `readUserConfig`, `writeUserConfig`, and `updateUserConfig` instead. ``` -------------------------------- ### RC9 Configuration Management API Source: https://github.com/unjs/rc9/blob/main/README.md This section covers the core functions for reading, writing, and updating configuration files using RC9. ```APIDOC ## RC9 Configuration Management API ### Description Provides functions to read, write, and update configuration files. ### Methods #### `read(options?: RCOptions | string): RC` Reads configuration from a file. If no path is provided, it defaults to '.conf'. #### `write(config: RC, options?: RCOptions | string): void` Writes the given configuration object to a file. Defaults to '.conf'. #### `update(config: RC, options?: RCOptions | string): RC` Updates an existing configuration with new values and returns the updated configuration. #### `parse(contents: string, options?: RCOptions): RC` Parses configuration content from a string. #### `parseFile(path: string, options?: RCOptions): RC` Parses configuration directly from a file path. #### `serialize(config: RC): string` Serializes a configuration object into a string format. ### Parameters #### `options` (RCOptions | string) - `name` (string) - Optional - The name of the configuration file (default: '.conf'). - `dir` (string) - Optional - The directory to look for the configuration file (default: process.cwd()). - `flat` (boolean) - Optional - If true, disables automatic flattening/unflattening of nested keys (default: false). ### Types #### `RC` - `Record` - Represents the configuration object. #### `RCOptions` - `name?: string` - `dir?: string` - `flat?: boolean` ### Examples **Reading Configuration:** ```ts import { read } from 'rc9'; const config = read(); // Reads from '.conf' by default console.log(config); const customConfig = read('myconfig.json'); // Reads from 'myconfig.json' ``` **Writing Configuration:** ```ts import { write } from 'rc9'; const newConfig = { db: { enabled: true } }; write(newConfig); // Writes to '.conf' by default write(newConfig, 'myconfig.yaml'); // Writes to 'myconfig.yaml' ``` **Updating Configuration:** ```ts import { update } from 'rc9'; // Update a nested value update({ 'db.enabled': false }); // Push to an array update({ 'modules[]': 'new-module' }); ``` ``` -------------------------------- ### Parse configuration strings with RC9 Source: https://context7.com/unjs/rc9/llms.txt Parses a configuration string into a JavaScript object. Supports dot notation, array syntax, and flat mode. ```typescript import { parse } from "rc9"; // Basic key-value parsing const config = parse(` db.username=admin db.password=secret123 db.port=5432 db.enabled=true `); // Result: { db: { username: "admin", password: "secret123", port: 5432, enabled: true } } // Array syntax using [] const arrayConfig = parse(` modules[]=auth modules[]=logging modules[]=cache `); // Result: { modules: ["auth", "logging", "cache"] } // Flat mode (disable unflattening) const flatConfig = parse(`x=1 x.y=2`, { flat: true }); // Result: { x: 1, "x.y": 2 } ``` -------------------------------- ### Update Configuration Source: https://github.com/unjs/rc9/blob/main/README.md Updating specific configuration keys or pushing values to arrays. ```ts update({ "db.enabled": false }); // or update(..., { name: '.conf' }) ``` ```ts update({ "modules[]": "test" }); ``` -------------------------------- ### Library Exports Source: https://github.com/unjs/rc9/blob/main/README.md Type definitions and function signatures for the RC9 library. ```ts const defaults: RCOptions; function parse(contents: string, options?: RCOptions): RC; function parseFile(path: string, options?: RCOptions): RC; function read(options?: RCOptions | string): RC; function readUserConfig(options?: RCOptions | string): RC; function serialize(config: RC): string; function write(config: RC, options?: RCOptions | string): void; function writeUserConfig(config: RC, options?: RCOptions | string): void; function update(config: RC, options?: RCOptions | string): RC; function updateUserConfig(config: RC, options?: RCOptions | string): RC; ``` ```ts type RC = Record; interface RCOptions { name?: string; dir?: string; flat?: boolean; } ``` ```ini { name: '.conf', dir: process.cwd(), flat: false } ``` -------------------------------- ### Update user configuration Source: https://context7.com/unjs/rc9/llms.txt Merges new values into an existing configuration file within the user's config directory. ```typescript import { updateUserConfig, readUserConfig } from "rc9"; // Update user token without affecting other settings updateUserConfig({ token: "new-token-value" }, ".myapprc"); // Update nested preferences updateUserConfig({ "preferences.theme": "light", "preferences.fontSize": 14 }, ".myapprc"); // The function returns the merged configuration const updatedConfig = updateUserConfig({ lastLogin: Date.now() }, ".myapprc"); console.log(updatedConfig); ``` -------------------------------- ### updateUserConfig Source: https://context7.com/unjs/rc9/llms.txt Updates a configuration file in the user's config directory by merging new values with existing configuration. ```APIDOC ## updateUserConfig ### Description Updates a configuration file in the user's config directory by merging new values with existing configuration. ### Method `updateUserConfig(updates: object, fileName: string): object` ### Endpoint N/A (Local file system operation) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **updates** (object) - Required - An object containing the key-value pairs to update. Nested keys can be specified using dot notation (e.g., `"preferences.theme": "light"`). - **fileName** (string) - Required - The name of the configuration file. ### Request Example ```typescript import { updateUserConfig, readUserConfig } from "rc9"; // Update user token without affecting other settings updateUserConfig({ token: "new-token-value" }, ".myapprc"); // Update nested preferences updateUserConfig({ "preferences.theme": "light", "preferences.fontSize": 14 }, ".myapprc"); // The function returns the merged configuration const updatedConfig = updateUserConfig({ lastLogin: Date.now() }, ".myapprc"); console.log(updatedConfig); ``` ### Response #### Success Response (200) - **object** - The entire merged configuration object after the update. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.