https://github.com/raulcatalinas/getuseros
get-user-os is a lightweight, easy-to-use JavaScript library that provides a simple API to detect the operating system of a user. It's built with TypeScript and works seamlessly across different browsers
https://github.com/raulcatalinas/getuseros
Last synced: about 2 months ago
JSON representation
get-user-os is a lightweight, easy-to-use JavaScript library that provides a simple API to detect the operating system of a user. It's built with TypeScript and works seamlessly across different browsers
- Host: GitHub
- URL: https://github.com/raulcatalinas/getuseros
- Owner: RaulCatalinas
- License: mit
- Created: 2024-03-08T11:30:49.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-10T10:06:05.000Z (8 months ago)
- Last Synced: 2024-09-10T11:31:31.935Z (8 months ago)
- Language: TypeScript
- Size: 1.26 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# get-user-os
get-user-os is a lightweight, easy-to-use JavaScript library that provides a simple API to detect the operating system of a user. It's built with TypeScript and works seamlessly across different browsers.
## Installation
```bash
npm install get-user-os
yarn add get-user-os
pnpm add get-user-os
bun add get-user-os
```## Use
```JavaScript
import { getUserOS, UserOS } from "get-user-os"const userOS = getUserOS();
if (userOS === UserOS.Windows) {
console.log("The user is using Windows")
} else if (userOS === UserOS.Mac) {
console.log("The user is using Mac")
} else if (userOS === UserOS.Linux) {
console.log("The user is using Linux")
} else {
console.log(`The user is using ${userOS}`)
}
```## Contribution
Contributions are welcome. Please open an issue or pull request for suggestions for improvements or bug fixes.
## License
The license information is contained in the file [LICENSE.md](LICENSE.md).
## Authors
- [Raul Catalinas Esteban](https://github.com/RaulCatalinas)