[JS] Add primitive push implementation for testing