terminal-link
Advanced tools
Comparing version 2.1.0 to 2.1.1
@@ -8,3 +8,3 @@ declare namespace terminalLink { | ||
*/ | ||
fallback?: ((text: string, url: string) => string) | false; | ||
fallback?: ((text: string, url: string) => string) | boolean; | ||
} | ||
@@ -11,0 +11,0 @@ } |
@@ -12,3 +12,3 @@ 'use strict'; | ||
return options.fallback ? options.fallback(text, url) : `${text} (\u200B${url}\u200B)`; | ||
return typeof options.fallback === 'function' ? options.fallback(text, url) : `${text} (\u200B${url}\u200B)`; | ||
} | ||
@@ -15,0 +15,0 @@ |
{ | ||
"name": "terminal-link", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"description": "Create clickable links in the terminal", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -50,3 +50,3 @@ # terminal-link [![Build Status](https://travis-ci.org/sindresorhus/terminal-link.svg?branch=master)](https://travis-ci.org/sindresorhus/terminal-link) | ||
Type: `Function | false` | ||
Type: `Function | boolean` | ||
@@ -53,0 +53,0 @@ Override the default fallback. The function receives the `text` and `url` as parameters and is expected to return a string. |
6520