function computeLinks(model) {
        if (!model || typeof model.getLineCount !== 'function' || typeof model.getLineContent !== 'function') {
            // Unknown caller!
            return [];
        }
        return LinkComputer.computeLinks(model);
    }
Returns an array of all links contains in the provided
document. *Note* that this operation is computational
expensive and should not run in the UI thread.