Skip to content

#5 Common list

Axorax edited this page Apr 14, 2023 · 2 revisions

If you added common list to new kith(), it would add a common list for all tests but with this code it will add a common list for only a particular test.

const pass = new kith();

const test = pass.test('abc', {
    common: [
        "abc"
    ]
});

console.log(test)

output:

{
  score: 20,
  checks: {
    length: false,
    repeated: false,
    symbols: false,
    uppercase: false,
    lowercase: true,
    numbers: false
  },
  rejected: true
}

Clone this wiki locally