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-4/

{
  "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
    }
  ]
}

tile.json