CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-is-buffer

Determine if an object is a Buffer without including the full buffer module

93

1.02x
Quality

Pending

Does it follow best practices?

Impact

93%

1.02x

Average score across 9 eval scenarios

SecuritybySnyk

Pending

The risk profile of this skill

Overview
Eval results
Files

criteria.jsonevals/scenario-6/

{
  "context": "This evaluation assesses how well the engineer uses the is-buffer package for Buffer type detection, specifically testing understanding of its constructor-based validation approach. The focus is on proper usage of the package's API rather than general coding practices.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Imports is-buffer",
      "description": "The solution correctly imports the is-buffer package using require('is-buffer') or appropriate import syntax.",
      "max_score": 15
    },
    {
      "name": "Uses is-buffer function",
      "description": "The solution calls the is-buffer function (typically named isBuffer) to check if input data is a Buffer, rather than using instanceof or other type checking methods.",
      "max_score": 30
    },
    {
      "name": "Buffer passthrough logic",
      "description": "When is-buffer returns true, the solution returns the Buffer unchanged without unnecessary conversion or processing.",
      "max_score": 20
    },
    {
      "name": "Non-Buffer handling",
      "description": "When is-buffer returns false, the solution correctly branches to handle string conversion or error throwing based on input type.",
      "max_score": 20
    },
    {
      "name": "Proper error handling",
      "description": "The solution uses is-buffer to distinguish Buffers from non-Buffers before throwing errors for invalid types (not strings or Buffers).",
      "max_score": 15
    }
  ]
}

tile.json