[JS] Add condense support to operations

Not all test cases complete yet