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 safe type validation functions that handle null and undefined inputs without throwing errors. The focus is on leveraging is-buffer's built-in null/undefined safety for the isBuffer function and implementing similar safety patterns for other validators.",
"type": "weighted_checklist",
"checklist": [
{
"name": "is-buffer package import",
"description": "The is-buffer package is imported using require('is-buffer') and assigned to a variable (typically named isBuffer or similar)",
"max_score": 15
},
{
"name": "isBuffer implementation uses is-buffer",
"description": "The isBuffer function directly uses or wraps the imported is-buffer function rather than reimplementing buffer detection logic",
"max_score": 25
},
{
"name": "isBuffer null/undefined safety",
"description": "The isBuffer function correctly returns false for null and undefined inputs without throwing errors, leveraging is-buffer's built-in null/undefined handling",
"max_score": 20
},
{
"name": "isArray null/undefined checks",
"description": "The isArray function includes explicit checks to safely handle null and undefined inputs before checking array type (e.g., using value != null or similar patterns)",
"max_score": 15
},
{
"name": "isPlainObject null/undefined checks",
"description": "The isPlainObject function includes explicit checks to safely handle null and undefined inputs before checking object type (e.g., using value != null or similar patterns)",
"max_score": 15
},
{
"name": "Consistent safety pattern",
"description": "All three validation functions follow a consistent pattern of null/undefined safety, demonstrating understanding of the safety principle exemplified by is-buffer",
"max_score": 10
}
]
}docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9