content: Help me validate user input in a form field with the ID 'userInputField' after the user has finished typing?

validateUserInput

description: This function is called after a user has finished typing in a form field, to validate the input provided.

type: dict

type: String

description: The form field whose input needs to be validated.

type: Boolean

description: Indicates if the user has finished typing in the input field.

required: inputField isComplete


content: Help me extract all data entries with the attribute 'data-active' set to true from a list element stored in a variable named 'listElement'?

getActiveDataEntries

description: This function extracts data entries from a list element based on a specified attribute and its value. It checks for the presence of the 'data-active' attribute and whether it is set to true.

type: any

description: The list element from which to extract active data entries.

description: The data attribute used to filter entries. Optional parameter with a default value of 'data-active'.

default: data-active

description: The value of the attribute to match. Optional parameter with a default value of true.


content: Help me extract the last transaction ID that has a status of 'completed' or 'failed' from a database log located at '/var/log/db.log', using 'utf-8' encoding, and process the information with a processing function?

extractLastTransactionId

description: This function scans a database log file for lines indicating transaction completion or failure, extracting the last transaction ID that matches the criteria. It uses a processing function `processFunction` to further handle the extracted transaction ID.

description: The path to the database log file to be examined.

type: array

description: An array of statuses to search for within the log file, indicating the end of a transaction.

description: The encoding of the log file.

description: A function that processes the extracted transaction ID.

required: filepath status encoding processFunction


content: Help me send a 'submit' action to a React form with the ID 'loginForm' at a coordinate that is 30% from the top and 60% from the left?

submitAtCoordinate

description: This function sends a submit action to a React form element at a specific position determined by coordinates relative to its bounding box.

description: The type of action to send.

description: The ID of the React form element to which to send the action.

type: float

description: An array of two numbers representing the x and y coordinates relative to the element's bounding box, in percentages.

required: action formId coordinates


content: Help me verify if an email address 'example@domain.com' conforms to the standard email format, optionally allowing for custom domain validation with 'domain.com'?

emailFormatValidator

description: This function validates if a given email address adheres to the standard email format and can optionally check against specific domain criteria.

description: The email address to validate against the standard email format.

description: An optional parameter for domain-specific validation. Default is an empty string, which means no custom domain validation.


content: Given the manageReactState function, which encapsulates state management logic for React applications including shared state handling and performance optimization, write a line of code to initialize this function. Assume you have an initial state object `initialStateObject`, a map of reducer functions `reducersMap`, a logger middleware `loggerMiddleware`, and an application of middleware as enhancers. Also, assume the existence of custom hooks `useStateSelectorHook` and `useDispatchActionHook` for state access and updates within React components. Use applyMiddleware('myMiddleWare') as enhancers.

manageReactState

description: This function encapsulates the logic for state management in a React application, offering solutions for shared state handling and performance optimization.

description: The initial state object of the React application.

description: A collection of reducer functions to handle state changes.

description: An array of middleware functions for intercepting and potentially altering actions or state changes.

description: An array of store enhancers for extending store capabilities.

description: Configuration object for the application's central store.

description: The React context object for providing and consuming the store in the component tree.

description: Custom hooks for accessing and updating the state within React components.

required: store context hooks


content: Help me create a mapping that assigns each of the first 4 elements from a given array to the category 'transition' for use in CSS transitions?

mapTransitions

description: This function creates a mapping where each key is an element from a given array (up to a specified limit of elements) and each value is set to a predefined category. This is useful for defining categories for CSS transitions.

description: The category to be assigned to each element in the mapping.

description: The number of elements from the array to include in the mapping.

required: category limit


content: In the context of analyzing JSON data structures, help me extract all key-value pairs that follow a specific key within a data analysis context object named 'dataAnalysisContext' that initially has a key of 'userId'?

getNextKeyValues

description: This function extracts all key-value pairs in a JSON object that follow a specified key until it encounters a new nested object or array. It is intended for use within a specific data analysis context that keeps track of the current position within the JSON structure.

description: The data analysis context object which contains the current position and functions to navigate through the JSON structure.

description: The current key from which to start extracting the following key-value pairs.

required: ctx currentKey


content: Help me determine if an email form element referred to as 'emailForm' includes an input with the name attribute 'emailAddress'?

doesEmailInputExist

description: This function verifies whether a given email form contains an input with a specific 'name' attribute value.

description: The email form element to inspect.

description: The value of the 'name' attribute to look for in the input.

required: formElem inputName


content: Help me analyze a JSON payload `responseData` to verify if it contains a specific key for API response validation, and trigger the corresponding processing logic? You should set keyToCheck to `expectedKey` and `processKeyFunction` as processingCallBack variable

validateApiResponse

description: This function analyzes a JSON payload to determine if it contains a specific key, indicating successful API response, and triggers the corresponding processing logic for that key.

description: The JSON object representing the API response to be validated.

description: The specific key to look for in the JSON payload.

description: The callback function to be executed if the key is present in the JSON payload.


content: Help me obtain a collection of records from the 'employeeRecords' database where the 'department' field is 'Sales' using a custom query function in javascript using function variable `getSales`?

fetchSalesDepartmentRecords

description: This function asynchronously fetches a collection of records from a specified database where the 'department' field matches a given criterion, using a custom query function.

description: The name of the database from which to retrieve the records.

description: A function used to query the database. It should take a record as input and return a boolean indicating whether the record should be included in the results based on the 'department' field.

required: databaseName queryFunction


content: Help me sort a list of items  myItemList alphabetically and ascendingly, but place items with a status of 'urgent' at the top, assuming the list is an array of objects with 'name' and 'status' properties?

prioritizeAndSort

description: This function sorts an array of objects based on their 'name' property, while prioritizing items based on a specified status.

description: The array of objects to be sorted.

description: The status value that should be given priority in the sorting.

description: A flag indicating whether the sorting should be in ascending (true) or descending (false) order, excluding priority items.

required: items priorityStatus ascending


content: Help me implement a 'dataFetch' operation with an API endpoint URL of 'https://api.example.com/data', expecting the response to be a JSON object containing '{"key": "value"}', given a request configuration object '{"method": "GET"}'?

performDataFetch

description: This function fetches data from a specified API endpoint using the provided request configuration, checks the response against an expected JSON object, and handles any potential errors. It supports various request methods like GET or POST.

description: The URL of the API endpoint from which the data will be fetched.

description: The HTTP method to be used for the request.

description: Any headers to be included in the request.

description: The request payload, if needed for methods like POST.

description: The configuration object for the API request.

description: The JSON object expected to be returned by the API call.

description: If true, the function will handle errors gracefully and provide appropriate feedback. Default false


content: Help me generate a dynamic chart with user-provided data `userDataArray` and apply a scaling factor of 3 for the axis values, linking it to a given dashboard `dashboardElement`?

DynamicChartGenerator

description: This function creates a dynamic chart based on user input, applies a scaling factor to the axis values, and integrates the chart into a specified dashboard for display.

description: The data provided by the user to plot on the chart.

description: A scaling factor applied to the chart's axis values. Optional parameter.

description: The dashboard where the chart will be displayed.

options:
Additional configuration options for the chart. Default empty dict

required: userData scalingFactor dashboard


content: Help me generate a data accessor for a chart component named 'BarChart', with a module name 'chartModule', in a data visualization library `visualizationLibrary`, to fetch and update its 'DataPoints' and 'Labels' through a configuration object named 'config'?

chartDataAccessorFactory

description: This function generates a data accessor for a specific chart component within a data visualization librar `. It provides the capability to fetch and update specific properties such as 'DataPoints' and 'Labels' of the chart through a configuration object.

description: The name of the chart component.

description: The module name of the chart component.

description: The details of the chart component.

required: nm mn

description: The instance of the data visualization library where the chart component is defined.

description: The name of the configuration object used to fetch and update the chart's properties.

required: chart library configObject


content: Help me generate a new ChartSeries with initial settings including axis labels `axisLabelsArray`, data points `dataPointsArray`, and a default color scheme `defaultColor`, and then integrate it into a specific chart layout `chartLayoutObject`?

ChartSeriesGenerator

description: This function creates a new ChartSeries with customizable settings for axis labels, data points, and color schemes, and attaches it to a given chart layout.

description: The labels for the chart's axis.

description: The data points for the series.

description: The default color for the series. Optional parameter.

description: The layout object of the chart where the series will be added.

required: labels data chartLayout


content: Help me compute the updated coordinates for a set of vertices (10, 15) and (20, 25) after rotating them around a pivot point (12, 17) by 30 degrees?

rotateVertices

description: This function computes the updated coordinates of a set of vertices after rotating them around a pivot point by a given angle.

description: An array of vertices to rotate, where each vertex is in the format [x, y].

description: The pivot point around which the vertices are to be rotated, in the format [x, y].

description: The rotation angle in degrees.

required: vertices pivot angle


content: Help me generate a notification handler for an application `app` that filters messages based on priority level 3, linked to a messaging service 'messagingSvc', and categorized under notification type 2?

generateNotificationHandler

description: This function generates a notification handler for an application, which can filter incoming messages by priority level. It can also be linked to a specific messaging service and categorized under a certain notification type.

description: The application for which to generate the notification handler.

type: integer

description: The priority level to filter messages. A certain level (e.g., 3) may determine the filtering criteria.

description: The messaging service associated with the notification handler.

description: The notification type category for the handler.

required: app priorityLevel messagingService notificationType


content: What is the final velocity for an object in free fall after 5 seconds, given the gravity g and initial velocity 0?

calculateFinalVelocity

description: This function calculates the final velocity of an object in free fall after a certain time, taking into account the acceleration due to gravity and the initial velocity.

description: The time in seconds for which the object has been in free fall.

description: The acceleration due to gravity, typically in m/s^2.

description: The initial velocity of the object in m/s at the start of the free fall.

required: time gravity initialVelocity


content: Help me configure a ShaderMaterial for a Three.js scene with specific properties 'materialProps', using textures 'textureList', and within the 3D object 'meshObject'?

configureShaderMaterial

description: This function configures a ShaderMaterial for a Three.js scene, applying custom shaders, textures, and properties based on the provided data, texture list, and 3D object.

description: The properties specific to the ShaderMaterial being configured.

description: A list of textures to be used in the ShaderMaterial.

description: The 3D object within which the ShaderMaterial is being applied.

required: property textures object3D


content: Help me add a 'click' event listener to a button element 'myButton' that triggers a function named 'handleButtonClick' and stops the event from propagating by setting options's stopProgation to true?

buttonAddClickHandler

description: This function attaches a click event listener to a specified button element with options to control event flow and behavior.

description: The button element to which the event listener will be added.

description: The function to be called when the button is clicked.

options:
An options object to specify characteristics about the event listener, such as stopping propagation. Optional parameter. Default to be empty dictionary

required: element callback


content: Help me locate a product in a list of products Product A, Product B, Product C where the 'productId' is equal to 123?

findProductById

description: This function iterates over a list of product objects to find a product with a matching 'productId'.

description: The list of product objects to search within.

description: The product ID to look for in the product objects list.

required: products id


content: Help me reset a state property called 'userSession' to 'null' in a React component?

resetStateProperty

description: This function resets a given state property to null. It is typically used in React components to clear state.

description: The name of the state property to reset.


content: Help me generate an authorization token for a user with username 'johndoe', valid for '3600' seconds, issued by 'myapp.net', with a role of 'admin', and encoded with 'HS256' algorithm?

createAuthToken

description: This function generates an authorization token with user details, validity, issuer, role, and encoding algorithm.

description: The username of the user for whom the token is being created.

description: The number of seconds the token remains valid.

options:
options dictionary, default empty dictionary
The entity that issued the token.
The role of the user in the system.
The encoding algorithm to be used for token generation.

required: username options


content: What is the best way to extract the unique elements from an array and return them sorted in ascending order? For a list of numbers 3 1 2 1 4 3

getUniqueSorted

description: This function takes an array of elements and returns a new array of unique elements sorted in ascending order. It does not require any additional parameters for sorting.

description: The array from which to extract unique elements and sort them.


content: Help me track the 'submitForm' action on a 'formHandler' object but only when the form has is required and is valid email validation flags set?

trackSubmitWithValidation

description: This function tracks the 'submitForm' action on a given object. It only logs the submission when specific validation flags are set; if the flags are not set, the original action is performed without tracking.

description: The object with the 'submitForm' action to track.

description: An array of validation flags required to trigger tracking. Possible options are isRequired, isValidEmail.

required: obj validationFlags


content: Help me change the content of a div with the ID 'contentBox' and new content 'Hello World' by invoking the 'update' action?

contentUpdater

description: This function updates the inner content of a specified div element when the 'update' action is called.

description: The ID of the div element whose content is to be updated.

description: The new content that will replace the current content of the div element.

description: The action to be performed. In this case, it should be 'update' to change the content.

required: elementID newContent action


content: Help me validate an object named 'serviceProvider' to ensure it complies with React's prop-type constraints for a component, specifically by checking that it is not an instance of a Promise, nor contains any methods that could lead to side effects, when passed as a prop to the component 'UserProfile'?

validateReactProp

description: This function validates an object to ensure it is safe to pass as a prop in a React component by checking that it is not a Promise and does not contain methods that could lead to side effects, raising a warning if the validation fails.

description: The object to validate for safe usage as a React prop.

description: The name of the React component to which the object is passed as a prop.

required: obj componentName


content: Help me retrieve a list of books bookA,bookB, bookC with a specific author J.K. Rowling from a collection called 'library'?

filterBooksByAuthor

description: This function filters through a collection of books within a library to find all books that are written by a specific author, returning a list of books that match the criteria.

description: The collection of book objects to filter through.

description: The name of the author whose books you want to find.

required: library author


content: Help me schedule a sequence of events where 'setupStage' uses setupStageFunction precedes 'cleanupStage' using cleanStageFunction, ensuring only 3 events can happen at the same time?

EventScheduler

description: This function schedules a series of events, with each event possibly dependent on the completion of other events. It includes concurrency control to limit the number of simultaneous events.

description: An object mapping event names to events or arrays that define an event and its prerequisites.

description: The maximum number of events that can be scheduled concurrently. Optional parameter. Default 0.0

description: A callback function that is invoked after all events have concluded or if an error has occurred. Optional parameter. Default null


content: Help me replace the current text in an editor with 'Hello, World!' starting from position 5 and covering the next 7 characters?

setText

description: This function sets new text in an editor, starting from a specified position for a given length. If the length is not specified, it replaces text till the end.

description: The new text to set.

description: The starting position for the new text.

description: The length of text to replace. Optional parameter. Default 0.0

required: newText start


content: Help me process and transform all decorators of a TypeScript declaration node named 'myNode', within a container named 'myContainer'?

transformAllDecoratorsOfDeclaration

description: This function processes and transforms all decorators associated with a TypeScript declaration node. It combines transformed decorators and parameters decorators into a single array.

description: The TypeScript declaration node to process.

description: The container that holds the node.

required: node container


content: Help me process a queue of file watch objects named 'fileWatchQueue' with a polling interval of 500 milliseconds, starting from index 0 and handling 10 files at a time to check for modifications?

pollQueue

description: This function processes a queue of file watch objects at specified intervals, checking a chunk of files at a time for any modifications.

description: The queue of file watch objects to be processed.

description: The interval in milliseconds at which the queue is polled.

description: The starting index in the queue from which polling begins.

description: The number of files to be checked in each polling interval.

required: queue pollingInterval pollIndex chunkSize


content: Help me ensure that a new line is emitted before the leading comments of a node with position 42 in a TypeScript file, using a lineMap object named 'tsLineMap' and a writer object named 'tsWriter'?

emitNewLineBeforeLeadingComments

description: This function ensures that a new line is emitted before the leading comments of a specified node within a TypeScript file.

description: An object representing the line map of the TypeScript file.

description: An object used for writing to the TypeScript file.

description: The position of the node..

description: An array of leading comment objects associated with the node. Default empty array

required: lineMap writer node


content: Help me apply a function named 'processType' to each type in a union type object named 'unionTypeObj' to analyze its properties?

forEachType

description: This function iterates over each type in a given type object, applying a specified function to it. If the type object represents a union of types, the function is applied to each type in the union; otherwise, it is applied directly to the single type.

description: The type object, potentially representing a union of types.

description: The function to apply to each type in the type object.

required: type f


content: Help me check if two TypeScript declaration objects, one representing a parameter parameterObject and the other a variable declaration variableDeclarationObject, have identical declaration flags considering their optionality, privacy, protection level, asynchronicity, abstractness, readonly status, and static nature?

areDeclarationFlagsIdentical

description: This function compares two TypeScript declaration objects to determine if they have identical declaration flags, taking into account specific allowances for differences in optionality between parameters and variable declarations.

description: The first TypeScript declaration object to compare.

description: The second TypeScript declaration object to compare.

required: left right


content: Help me update the label of a breaknode in my abstract syntax tree to 'loopEnd' if its current label is not already 'loopEnd'?

updateBreak

description: This function updates the label of a break node within an abstract syntax tree. If the current label of the node does not match the provided label, it creates a new break node with the specified label and updates the original node.

description: The break node to be updated.

description: The new label to assign to the break node.

required: node label


content: Help me add statements for initializing properties named 'width' and 'height' for a receiver object named 'shape' into an existing statements array named 'shapeStatements'?

addInitializedPropertyStatements

description: This function adds statements for initializing properties to an array of statements. It is designed to work with TypeScript's AST manipulation.

description: The array of statements to which the new initialized property statements will be added.

description: An array of property names that need to be initialized. Default empty array

description: The name of the object for which the properties are being initialized.

required: statements property receiver


content: Help me determine the appropriate directory to monitor for changes, starting from a failed lookup location directory full path '/projects/myApp/node_modules/react', to ensure efficient file watching in a TypeScript project?

description: This function determines the most suitable directory to watch for file changes based on a given directory path, especially handling paths within 'node_modules' by selecting the top-most 'node_modules' directory or an ancestor directory.

description: The initial directory to consider for watching.

description: The full path of the directory to consider for watching.

required: dir dirPath


content: Help me determine if a synthetic rest parameter should be added to a function declaration that already contains a variadic type in its last parameter, given the declaration object 'funcDeclaration' and its parameters array 'funcParameters'?

maybeAddJsSyntheticRestParameter

description: This function checks a given function declaration to see if it should add a synthetic rest parameter based on the presence of a variadic type in the last parameter or in the JSDoc tags. It modifies the parameters array directly if necessary.

description: The function declaration object to check.

description: The array of parameters for the function declaration.

required: declaration parameters


content: Help me determine the value to be used for a property named 'maxItems' in a configuration object, given that the default value is 10 and the object value 12 , but the configuration object does not explicitly define 'maxItems'?

assignOwnDefaults

description: This function determines the value to be assigned to a property in an object, preferring the object's own value if it exists and is not undefined, otherwise using a source value.

description: The value of the property in the object.

description: The default or source value to use if the object's value is undefined or the object does not have its own property for the key.

description: The key of the property to check in the object.

description: The object to check for the property.

required: objectValue sourceValue key object


content: Help me create a queue with a myWorkerFunction that processes tasks, setting the concurrency level to 5 and without specifying a payload size?

description: This function creates a queue object with a specified worker function and concurrency level. It allows for tasks to be added to the queue and processed according to the concurrency level. Optional payload size can be specified to limit the number of tasks processed per worker call.

description: The worker function that processes each task.

description: The maximum number of tasks to be processed concurrently.

description: Optional. The number of tasks each worker function call should process at most. Default 0.0

required: worker concurrency


content: Help me create a task queue with a concurrency of 5, where tasks are functions that log a message to the console, and ensure that when the queue becomes saturated, it logs 'Queue is saturated', and when it becomes unsaturated, it logs 'Queue is unsaturated'?

B

description: This complex function initializes a task queue with customizable concurrency, task addition, and event handling capabilities. It allows for synchronous and asynchronous task execution, pausing and resuming the queue, and handling various queue events.

description: The initial task or an array of tasks to be added to the queue. Default null

description: The concurrency level of the task queue.

description: The payload size for each task worker. Optional parameter. Default 0.0


content: Help me execute a callback function named 'processResult' that handles an error 'null' and a result value of 'Operation successful'?

invokeCallback

description: This function invokes a callback with an error and a value. If the callback throws an error, it is caught and re-thrown asynchronously.

description: The callback function to be invoked.

description: The error to pass to the callback function. Can be 'null' if there is no error.

description: The value to pass to the callback function.

required: callback error value


content: Help me execute a custom callback function named 'processNode' on a specific node named 'currentNode' with a state object 'nodeState' during a tree traversal?

skipThrough

description: This function allows for a custom operation to be performed on a node during a tree traversal by executing a callback function with the node and a state object as arguments.

description: The current node being processed in the tree traversal.

description: The state object associated with the current node.

description: The callback function to be executed on the current node and state object.

required: node st c


content: Help me asynchronously retrieve a map of remote Git references and their corresponding commit hashes for a repository URL 'https://github.com/yarnpkg/berry' from a starting directory '/home/user/projects'?

Sde

description: This asynchronous function retrieves a map of remote Git references and their corresponding commit hashes for a given repository URL, using a specified starting directory.

description: The repository URL.

description: The starting directory from which the Git command is executed.

description: Additional configuration for the Git command.

description: The execution context for the Git command.

required: t e


content: Help me update the property 'version' of an object named 'packageInfo' to '1.2.3', ensuring the update only occurs if the new value differs from the existing one or if 'version' is not already a property of the object?

vOe

description: This function updates a property of an object to a new value, but only if the new value is different from the existing one or if the property does not already exist on the object.

description: The object to update.

description: The property of the object to update.

description: The new value to assign to the property.

required: r e t


content: Help me calculate the difference in days between the dates '2023-04-01' and '2023-04-15' using a specific time unit of 'days'?

sTe

description: This function calculates the difference between two dates in a specified time unit.

description: The start date for the calculation.

description: The end date for the calculation.

description: The unit of time to calculate the difference in. For example, 'days', 'hours', etc.


content: Help me update the DOM event listeners from an old virtual node oldVirtualNode to a new one newVirtualNode, considering the new virtual node has a click event that needs to be normalized and updated?

updateDOMListeners

description: This function updates the DOM event listeners from an old virtual node to a new one, ensuring that any changes in event listeners are properly handled and applied to the target element.

description: The old virtual node, containing data about previous event listeners.

description: The new virtual node, containing data about current event listeners.

required: oldVnode vnode


content: Help me determine the appropriate boolean string representation for the 'contenteditable' attribute when the value provided is 'plaintext-only', ensuring it's a valid value for contenteditable?

convertEnumeratedValue

description: This function converts a given key-value pair to a 'true' or 'false' string based on specific conditions. It specifically handles falsy values, the string 'false', and validates the 'contenteditable' attribute's value.

description: The attribute key to be evaluated.

description: The value associated with the key.

required: key value