os-check
TypeScript icon, indicating that this package has built-in type declarations

2.5.0 • Public • Published

os-check

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(() => {
   // 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;

Readme

Keywords

Package Sidebar

Install

npm i os-check

Weekly Downloads

12

Version

2.5.0

License

MIT

Unpacked Size

4.89 kB

Total Files

5

Last publish

Collaborators

  • maifeeulasad