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

{
  "context": "This criteria evaluates how well the engineer uses the is-buffer package to implement an efficient Buffer validator, focusing on proper usage of the package's API for minimal performance overhead in high-frequency validation scenarios.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uses is-buffer package",
      "description": "The solution imports and uses the is-buffer package (via require('is-buffer') or similar) rather than implementing Buffer detection from scratch or using other methods like Buffer.isBuffer().",
      "max_score": 30
    },
    {
      "name": "Direct delegation",
      "description": "The isValidBuffer() function directly delegates to the is-buffer package's function without adding unnecessary wrapper logic, loops, or additional validation steps that would introduce performance overhead.",
      "max_score": 25
    },
    {
      "name": "Minimal wrapping overhead",
      "description": "The implementation avoids creating unnecessary objects, performing type coercion, adding try-catch blocks, or executing any operations beyond calling the is-buffer function.",
      "max_score": 20
    },
    {
      "name": "Correct return value",
      "description": "The function correctly returns the boolean result from is-buffer without transformation, ensuring the API contract (boolean return type) is maintained.",
      "max_score": 15
    },
    {
      "name": "No redundant checks",
      "description": "The implementation does not include redundant null/undefined checks, type validations, or other pre-processing before calling is-buffer, since the package already handles these cases efficiently.",
      "max_score": 10
    }
  ]
}

tile.json