1.0.2 • Published 1 year ago
mobile-or-tablet v1.0.2
mobile-or-tablet
Determines if the device is either a mobile phone or a tablet.
Installation
You can install the package using npm, yarn, or pnpm.
pnpm add mobile-or-tablet
yarn install mobile-or-tablet
npm install mobile-or-tabletUsage
import { isMobile, isMobileOrTablet, isTablet } from "mobile-or-tablet";
if (isMobile()) {
  /* is Mobile */
}
if (isMobileOrTablet()) {
  /* is Mobile Or Tablet */
}
if (isTablet()) {
  /* is Tablet */
}tsup
Bundle your TypeScript library with no config, powered by esbuild.
How to use this
- install dependencies
# pnpm
$ pnpm install
# yarn
$ yarn install
# npm
$ npm install- Add your code to src
- Add export statement to src/index.ts
- Test build command to build src. Once the command works properly, you will seedistfolder.
# pnpm
$ pnpm run build
# yarn
$ yarn run build
# npm
$ npm run build- Publish your package
$ npm publish