'use strict';/** * Create a markdown-formatted link from the given values. * * ```js * mdlink('micromatch', 'https://github.com/jonschlinkert/micromatch', 'hover title'); * //=> [micromatch](https://github.com/jonschlinkert/micromatch "hover title") * ``` * * @name link * @param {String} `anchor` * @param {String} `href` * @param {String} `title` * @api public */module.exports=functionlink(anchor,href,title){if(typeofanchor!=='string'){thrownewTypeError('markdown-link expects anchor to be a string.');}if(typeofhref!=='string'){thrownewTypeError('markdown-link expects href to be a string.');}title=title?' "'+title+'"':'';return'['+anchor+']('+href+title+')';};