<li><code>2223</code> is a Kaprekar number, as <code>2223 * 2223 = 4941729</code>, <code>4941729</code> may be split to <code>494</code> and <code>1729</code>, and <code>494 + 1729 = 2223</code></li>
<li>The series of Kaprekar numbers is known as <ahref="https://oeis.org/A006886"target="_blank">A006886</a>, and begins as <code>1, 9, 45, 55, ...</code></li>
Write a function that takes a number $n$, a base $bs$, and returns true if the number is a Kaprekar number for the given base. Otherwise, the function returns false.
</section>
## Tests
<sectionid='tests'>
``` yml
tests:
- text: <code>isKaprekar</code> should be a function.
testString: assert(typeof isKaprekar == 'function', '<code>isKaprekar</code> should be a function.');
- text: <code>isKaprekar(1, 10)</code> should return a boolean.
testString: assert(typeof isKaprekar(1, 10) == 'boolean', '<code>isKaprekar(1, 10)</code> should return a boolean.');
- text: <code>isKaprekar(1, 10)</code> should return <code>true</code>.
testString: assert.equal(isKaprekar(1, 10), true, '<code>isKaprekar(1, 10)</code> should return <code>true</code>.');
- text: <code>isKaprekar(9, 10)</code> should return <code>true</code>.
testString: assert.equal(isKaprekar(9, 10), true, '<code>isKaprekar(9, 10)</code> should return <code>true</code>.');
- text: <code>isKaprekar(2223, 10)</code> should return <code>true</code>.
testString: assert.equal(isKaprekar(2223, 10), true, '<code>isKaprekar(2223, 10)</code> should return <code>true</code>.');
- text: <code>isKaprekar(22823, 10)</code> should return <code>false</code>.
testString: assert.equal(isKaprekar(22823, 10), false, '<code>isKaprekar(22823, 10)</code> should return <code>false</code>.');
- text: <code>isKaprekar(9, 17)</code> should return <code>false</code>.
testString: assert.equal(isKaprekar(9, 17), false, '<code>isKaprekar(9, 17)</code> should return <code>false</code>.');
- text: <code>isKaprekar(225, 17)</code> should return <code>true</code>.
testString: assert.equal(isKaprekar(225, 17), true, '<code>isKaprekar(225, 17)</code> should return <code>true</code>.');
- text: <code>isKaprekar(999, 17)</code> should return <code>false</code>.
testString: assert.equal(isKaprekar(999, 17), false, '<code>isKaprekar(999, 17)</code> should return <code>false</code>.');