2.0.8 • Published 7 years ago

switch-favicon v2.0.8

Weekly downloads
1
License
MIT
Repository
gitlab
Last release
7 years ago

switch-favicon

Set the favicon according to the parsed sitename (http://www.[sitename].ch). The module assumes the location of the favicon to be http://www.sitename.ch/favicon.ico but you can specify the pre- and the postfix as optional arguments.

install

npm install switch-favicon

usage

e.g. with React:

import { switchFavicon } from 'switch-favicon'

...
componentDidMount() {
  switchFavicon()
}
...

optional arguments

NameTypeDescriptionDefault
verboseStringpass 'verbose' as first argument to log to the console''
locPrefixStringpart of url to favicon before the parsed hostname'http://www.'
locPostfixStringpart of url to favicon after the parsed hostname.'.ch/favicon'

call like:

import { switchFavicon } from 'switch-favicon'

switchFavicon('verbose', 'http://interaktiv.', '.ch/assets/favicon.ico')
2.0.8

7 years ago

2.0.7

7 years ago

2.0.6

7 years ago

2.0.5

7 years ago

2.0.4

7 years ago

2.0.3

7 years ago

2.0.2

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

0.0.3

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago