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

{
  "context": "This criteria evaluates how well the engineer uses the is-buffer package to implement safe type validation functions that handle null and undefined inputs without throwing errors. The focus is on leveraging is-buffer's built-in null/undefined safety for the isBuffer function and implementing similar safety patterns for other validators.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "is-buffer package import",
      "description": "The is-buffer package is imported using require('is-buffer') and assigned to a variable (typically named isBuffer or similar)",
      "max_score": 15
    },
    {
      "name": "isBuffer implementation uses is-buffer",
      "description": "The isBuffer function directly uses or wraps the imported is-buffer function rather than reimplementing buffer detection logic",
      "max_score": 25
    },
    {
      "name": "isBuffer null/undefined safety",
      "description": "The isBuffer function correctly returns false for null and undefined inputs without throwing errors, leveraging is-buffer's built-in null/undefined handling",
      "max_score": 20
    },
    {
      "name": "isArray null/undefined checks",
      "description": "The isArray function includes explicit checks to safely handle null and undefined inputs before checking array type (e.g., using value != null or similar patterns)",
      "max_score": 15
    },
    {
      "name": "isPlainObject null/undefined checks",
      "description": "The isPlainObject function includes explicit checks to safely handle null and undefined inputs before checking object type (e.g., using value != null or similar patterns)",
      "max_score": 15
    },
    {
      "name": "Consistent safety pattern",
      "description": "All three validation functions follow a consistent pattern of null/undefined safety, demonstrating understanding of the safety principle exemplified by is-buffer",
      "max_score": 10
    }
  ]
}

tile.json