Determine if an object is a Buffer without including the full buffer module
93
Pending
Does it follow best practices?
Impact
93%
1.02xAverage score across 9 eval scenarios
Pending
The risk profile of this skill
{
"context": "This criteria evaluates how well the engineer uses the is-buffer package to implement an efficient Buffer validator, focusing on proper usage of the package's API for minimal performance overhead in high-frequency validation scenarios.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Uses is-buffer package",
"description": "The solution imports and uses the is-buffer package (via require('is-buffer') or similar) rather than implementing Buffer detection from scratch or using other methods like Buffer.isBuffer().",
"max_score": 30
},
{
"name": "Direct delegation",
"description": "The isValidBuffer() function directly delegates to the is-buffer package's function without adding unnecessary wrapper logic, loops, or additional validation steps that would introduce performance overhead.",
"max_score": 25
},
{
"name": "Minimal wrapping overhead",
"description": "The implementation avoids creating unnecessary objects, performing type coercion, adding try-catch blocks, or executing any operations beyond calling the is-buffer function.",
"max_score": 20
},
{
"name": "Correct return value",
"description": "The function correctly returns the boolean result from is-buffer without transformation, ensuring the API contract (boolean return type) is maintained.",
"max_score": 15
},
{
"name": "No redundant checks",
"description": "The implementation does not include redundant null/undefined checks, type validations, or other pre-processing before calling is-buffer, since the package already handles these cases efficiently.",
"max_score": 10
}
]
}docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9