Determines if the device is either a mobile phone or a tablet.
Determines if the device is either a mobile phone or a tablet.
You can install the package using npm, yarn, or pnpm.
``bash
pnpm add mobile-or-tablet
yarn install mobile-or-tablet
npm install mobile-or-tablet
`
`tsx
import { isMobile, isMobileOrTablet, isTablet } from "mobile-or-tablet";
if (isMobile()) {
/ is Mobile /
}
if (isMobileOrTablet()) {
/ is Mobile Or Tablet /
}
if (isTablet()) {
/ is Tablet /
}
`
Bundle your TypeScript library with no config, powered by esbuild.
https://tsup.egoist.dev/
1. install dependencies
`pnpm
$ pnpm install
2. Add your code to
src
3. Add export statement to src/index.ts
4. Test build command to build src.
Once the command works properly, you will see dist folder.`zsh
pnpm
$ pnpm run buildyarn
$ yarn run buildnpm
$ npm run build
`5. Publish your package
`zsh
$ npm publish
``https://www.npmjs.com/package/mobile-or-tablet