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 with TypeScript, focusing on proper type definitions, correct package usage, and TypeScript integration. The evaluation assesses whether the engineer leverages the package's TypeScript support correctly.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Import is-buffer",
"description": "The solution imports the is-buffer package (e.g., `import isBuffer from 'is-buffer'` or `const isBuffer = require('is-buffer')`)",
"max_score": 15
},
{
"name": "Use isBuffer function",
"description": "The solution uses the isBuffer() function from the is-buffer package to determine if the input is a Buffer",
"max_score": 25
},
{
"name": "TypeScript type annotations",
"description": "The solution includes proper TypeScript type annotations for the function parameter and return type, matching or compatible with the API specification (ProcessResult return type)",
"max_score": 20
},
{
"name": "Type-safe conditionals",
"description": "The solution uses the isBuffer() check in a type-safe manner within conditional logic to distinguish between Buffer and non-Buffer inputs",
"max_score": 20
},
{
"name": "TypeScript compilation",
"description": "The solution is valid TypeScript code that would compile without type errors when is-buffer's type definitions are available",
"max_score": 20
}
]
}docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9