Deterministic and safely JSON.stringify to quickly serialize JavaScript objects
90
Evaluation — 90%
↑ 1.08xAgent success when using this tile
A logging utility that serializes binary data buffers (TypedArrays) to JSON format for debugging and analysis purposes.
Create a module that exports a function logBinaryData which serializes TypedArray instances to JSON strings. The function should handle various typed array types and preserve any custom properties attached to the arrays.
The function should:
metadata: "test", the function includes both array elements and the metadata property. @test@generates
/**
* Serializes a TypedArray to a JSON string, including numeric indices and custom properties.
*
* @param {TypedArray} typedArray - The typed array to serialize
* @returns {string} JSON string representation of the typed array
*/
function logBinaryData(typedArray) {
// Implementation here
}
module.exports = { logBinaryData };Provides deterministic JSON serialization with TypedArray support.
Install with Tessl CLI
npx tessl i tessl/npm-safe-stable-stringifydocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10