#JavaScript (ES6), 71

<s>Beating @ETHProductions while he does not see my hint. </s>He saw it.
<!-- language: lang-js -->

    x=>x<1e3?x:x<1e4?(x+='')[0]+','+x.slice(1):(x/1e3).toFixed(x<99950)+'k'

**Test**
<!-- begin snippet: js hide: false -->

<!-- language: lang-js -->

    f=x=>x<1e3?x:x<1e4?(x+='')[0]+','+x.slice(1):(x/1e3).toFixed(x<99950)+'k'

    function test() { n=+I.value, O.textContent = n + ' -> ' + f(n) }

    test()

<!-- language: lang-html -->

    <input id=I type=number value=19557 oninput=test()>
    <pre id=O></pre>

<!-- end snippet -->

**Test**