CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-snazzy

Format JavaScript Standard Style as Stylish (i.e. snazzy) output

94

1.18x
Overview
Eval results
Files

rubric.jsonevals/scenario-3/

{
  "context": "This criteria evaluates how well the engineer uses the snazzy package's stream-based transformation patterns to build a custom CSV to JSON converter. The focus is on proper usage of Node.js Transform streams, including the buffering strategy pattern demonstrated by snazzy.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Transform stream extension",
      "description": "The solution extends stream.Transform (from 'stream' or 'readable-stream' module) to create a custom transform stream class, similar to how snazzy's CompactToStylishStream extends Transform.",
      "max_score": 25
    },
    {
      "name": "_transform method implementation",
      "description": "Implements the _transform(chunk, encoding, callback) method to accumulate input chunks into an internal buffer array (e.g., this._buffer or similar), following snazzy's buffering pattern.",
      "max_score": 20
    },
    {
      "name": "_flush method implementation",
      "description": "Implements the _flush(callback) method to process the complete buffered input, parse the CSV data, convert to JSON array, and push the result to the output stream, mirroring snazzy's batch processing approach.",
      "max_score": 25
    },
    {
      "name": "Buffer concatenation",
      "description": "Uses Buffer.concat() or equivalent to combine buffered chunks before processing, similar to snazzy's approach of joining accumulated chunks.",
      "max_score": 15
    },
    {
      "name": "Stdin/stdout piping setup",
      "description": "Sets up proper stdin to stdout piping (e.g., process.stdin.pipe(transformer).pipe(process.stdout)) to enable Unix pipeline usage as demonstrated in snazzy's CLI.",
      "max_score": 15
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-snazzy

tile.json