Skip to content

Latest commit

 

History

History
46 lines (31 loc) · 806 Bytes

README.md

File metadata and controls

46 lines (31 loc) · 806 Bytes

various-devices

This is a cross-platform open source library for obtaining device name and device model.

Installation

npm install various-devices

CDN

<script src='https://unpkg.com/various-devices/dist/various-devices.iife.js'></script>

It will be exposed to global as variousDevices

usage

Get the current environment

cjs

const { getEnv } = require('various-devices');

esm

import { getEnv } from 'various-devices';

Return value

params introduce
electron 桌面程序
browser 浏览器
node node环境
webworker webworker

more

For more APIs, please refer to the

documentation