AWS SDK for JavaScript STS Client for Node.js, Browser and React Native, providing temporary security credentials and role assumption capabilities
92
Evaluation — 92%
↑ 1.05xAgent success when using this tile
A utility library for converting user profile data between standard JavaScript format and a specialized storage format used by the database system.
{id: "user123", name: "Alice", age: 30, active: true}, it converts to the specialized storage format required by the database. @test{id: "user456", name: "Bob", metadata: {tags: ["admin", "verified"], score: 95.5}}, it converts all nested fields including arrays and nested objects to the storage format. @test{id: "user789", name: "Charlie", email: undefined}, it removes undefined values during conversion to storage format. @test{id: "user999", name: "", bio: ""}, it properly converts empty strings during the conversion process. @test@generates
/**
* Converts a JavaScript object representing a user profile into storage format.
* Handles all standard JavaScript types including strings, numbers, booleans, objects, and arrays.
* Removes undefined values from the object.
*
* @param {Object} profile - The user profile object to convert
* @returns {Object} The profile in storage format
*/
function convertToStorage(profile) {
// IMPLEMENTATION HERE
}
/**
* Converts a storage format object back into a standard JavaScript object.
* Handles all storage format types and nested structures.
*
* @param {Object} storageData - The storage format data to convert
* @returns {Object} The standard JavaScript object
*/
function convertFromStorage(storageData) {
// IMPLEMENTATION HERE
}
module.exports = {
convertToStorage,
convertFromStorage,
};Provides utilities for converting between JavaScript and database storage formats.
@satisfied-by
Install with Tessl CLI
npx tessl i tessl/npm-aws-sdk--client-stsdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10