1.2.1 • Published 1 year ago

@reddycupe/getappname v1.2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

getAppname

Get the Appname from a URL String

Install

$ npm i @reddycupe/getappname

Usage

const getAppname = require('@reddycupe/getAppname')

getAppname("www.yahoo.com")
//=> "yahoo"

getAppname("https://codesandbox.io")
//=> "codesandbox"

getAppname("something else")
//=> "link"

getAppname(549);
//=> Uncaught TypeError: getAppname requires a string!