Implement PiiOperation.stateName() in JavaScript