Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/airtap/browser-names
Get the alternative names of a browser.
https://github.com/airtap/browser-names
aliases browsers names nodejs npm-package
Last synced: about 2 months ago
JSON representation
Get the alternative names of a browser.
- Host: GitHub
- URL: https://github.com/airtap/browser-names
- Owner: airtap
- License: mit
- Created: 2020-01-25T09:30:15.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-11-24T21:50:40.000Z (about 4 years ago)
- Last Synced: 2024-09-18T08:33:12.586Z (4 months ago)
- Topics: aliases, browsers, names, nodejs, npm-package
- Language: JavaScript
- Size: 8.79 KB
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# browser-names
> **Get the alternative names of a browser.**
> Includes names used in `browserslist`, `airtap`, `testling`, sauce labs, `karma`, `win-detect-browsers` and `@httptoolkit/browser-launcher`.[![npm status](http://img.shields.io/npm/v/browser-names.svg)](https://www.npmjs.org/package/browser-names)
[![node](https://img.shields.io/node/v/browser-names.svg)](https://www.npmjs.org/package/browser-names)
[![Travis](https://img.shields.io/travis/com/airtap/browser-names.svg)](https://travis-ci.com/airtap/browser-names)
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)## Usage
```js
const names = require('browser-names')
```Get an array of alternative names:
```js
names('ff') // ['firefox', 'mozilla firefox', ..]
names('firefox') // same
```Get a common name to use as your main identifier, by any name:
```js
names.common('internet explorer') // 'ie'
names.common('ie') // same
```Get the title of a browser, by any name:
```js
names.title('and_chr') // 'Google Chrome for Android'
names.title('ios safari') // 'iOS Safari'
```All functions are case- and casing-insensitive. Their output is lowercase (except for titles). PRs for additional browsers are welcome.
## Install
With [npm](https://npmjs.org) do:
```
npm install browser-names
```## License
[MIT](LICENSE.md) © 2020-present Vincent Weevers