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 effectively the engineer uses the is-buffer package to implement a buffer detection utility that works across different JavaScript environments. The focus is exclusively on proper usage of the is-buffer API and understanding its cross-platform capabilities.",
"type": "weighted_checklist",
"checklist": [
{
"name": "is-buffer import",
"description": "Correctly imports the is-buffer package using require() or import statement (e.g., const isBuffer = require('is-buffer') or import isBuffer from 'is-buffer')",
"max_score": 15
},
{
"name": "Direct isBuffer usage",
"description": "Uses the imported isBuffer function directly to check if values are buffers, without reimplementing the logic or using Buffer.isBuffer() instead",
"max_score": 30
},
{
"name": "Correct return value",
"description": "Returns the boolean result from isBuffer() function without unnecessary transformations or conditional logic",
"max_score": 15
},
{
"name": "No redundant validation",
"description": "Avoids implementing redundant null/undefined checks or type validations that the is-buffer package already handles internally",
"max_score": 20
},
{
"name": "TypeScript definitions",
"description": "If using TypeScript, properly leverages the is-buffer package's type definitions (imported types work correctly with TypeScript's type system)",
"max_score": 10
},
{
"name": "Single responsibility",
"description": "The implementation delegates buffer detection entirely to is-buffer rather than mixing it with custom buffer detection logic or alternative methods like instanceof Buffer",
"max_score": 10
}
]
}docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9