Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sinchang/os-parser

get OS name and version from navigator
https://github.com/sinchang/os-parser

navigator os useragent

Last synced: 7 days ago
JSON representation

get OS name and version from navigator

Awesome Lists containing this project

README

        

# os-parser

[![NPM version](https://img.shields.io/npm/v/os-parser.svg?style=flat)](https://npmjs.com/package/os-parser) [![NPM downloads](https://img.shields.io/npm/dm/os-parser.svg?style=flat)](https://npmjs.com/package/os-parser) [![CircleCI](https://circleci.com/gh/sinchang/os-parser/tree/master.svg?style=shield)](https://circleci.com/gh/sinchang/os-parser/tree/master) [![codecov](https://codecov.io/gh/sinchang/os-parser/branch/master/graph/badge.svg)](https://codecov.io/gh/sinchang/os-parser)

## Install

```bash
yarn add os-parser
```

## Usage

```js
const OSParser = require('os-parser')

OSParser()
//=> { name: 'Mac OS X', version: '10.13.1' }
```

## Contributing

1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request :D

## Author

**os-parser** © [sinchang](https://github.com/sinchang), Released under the [MIT](./LICENSE) License.

Authored and maintained by sinchang with help from contributors ([list](https://github.com/sinchang/os-parser/contributors)).

> [sinchang.me](https://sinchang.me) · GitHub [@sinchang](https://github.com/sinchang) · Twitter [@sinchangwen](https://twitter.com/sinchangwen)