1.0.2 • Published 5 years ago

the-judge v1.0.2

Weekly downloads
12
License
-
Repository
-
Last release
5 years ago

The Judge

Sample usage

const { implementationFn } = require('./uniqueChars')
const { TheJudge } = require('the-judge')

const judge = new TheJudge({
  baseDir: __dirname
})

// 'inputs' and 'outputs' are folders in root directory with matching files for inputs and outputs
judge.judgeByFiles('inputs', 'outputs', implementationFn).then((result) => {
  console.log(JSON.stringify(result))
  process.exit(0)
})

Sample function implementation

// inputLines is an array of strings, where each string is a line from input file
function implementationFn(inputLines) {
  const inputString = inputLines[0]
  const result = []

  // Your implementation

  // Result is expected to be an array of strings, where each string is a line from output file
  return result
}

module.exports = {
  implementationFn
}
1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago