Update JavaScript implementation with match capability.