Deterministic and safely JSON.stringify to quickly serialize JavaScript objects
90
Evaluation — 90%
↑ 1.08xAgent success when using this tile
{
"context": "This evaluation assesses how well the engineer uses safe-stable-stringify's performance optimization features to build an efficient serialization service. The focus is on leveraging the library's optimized implementations for different scenarios.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Basic stringify usage",
"description": "Uses the main stringify function from safe-stable-stringify as the core serialization mechanism. Should import and use stringify() directly.",
"max_score": 15
},
{
"name": "Deterministic configuration",
"description": "Enables deterministic mode (deterministic: true) to ensure sorted keys. This leverages the library's adaptive sorting optimization (insertion sort for <=200 keys, native sort for larger).",
"max_score": 20
},
{
"name": "Indentation support",
"description": "Uses the 'space' parameter (third argument) of stringify() to provide formatted output with indentation for readability.",
"max_score": 10
},
{
"name": "Configure function",
"description": "Uses the configure() function to create specialized serializers with preset options. This enables the creation of optimized instances for different scenarios.",
"max_score": 20
},
{
"name": "Fast mode optimization",
"description": "Creates a fast serializer configuration using configure() with minimal options (e.g., deterministic: true) and without replacer or space parameters to achieve optimal performance for simple serialization.",
"max_score": 15
},
{
"name": "Function replacer",
"description": "Implements custom value transformation using a function replacer (callback function with signature (key, value) => any) as the second parameter to stringify() or via configure().",
"max_score": 10
},
{
"name": "Array replacer",
"description": "Implements property whitelisting using an array replacer (array of property names to include) as the second parameter to stringify() or via configure().",
"max_score": 10
}
]
}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