Skip to content

maifeeulasad/os-check

Repository files navigation

os-check NPM Downloads

npm version minified minified + gzipped

GitHub stars GitHub watchers Commits after release

NPM : https://www.npmjs.com/package/os-check

npm install os-check
yarn add os-check

Code

import React, { useEffect } from "react";

import { osCheck, OsType } from "os-check";

const App = () => {
 useEffect(() => {
   // only for testing purposes
   // alert(osCheck())
 }, []);
 return (
   <div>
     <h1>{osCheck()}</h1>
     <h1>{osCheck() === OsType.Windows && "Windows-hmmm"}</h1>
     <h1>{osCheck() === OsType.Linux && "Linux-hmmm"}</h1>
   </div>
 );
};

export default App;

About

os-check, check your os in browser with one simple method call, written in typescript;

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published