# universal-getsysteminfosync

> [![npm](https://img.shields.io/npm/v/evapi.svg)](https://www.npmjs.com/package/evapi) [![npm](https://img.shields.io/npm/v/evapi-getSystemInfoSync.svg)](https://www.npmjs.com/package/evapi-getSystemInfoSync)

Latest version **2.0.0-beta** (published 2021-01-12) · BSD-3-Clause license · 0 weekly downloads

## Install

```sh
npm install universal-getsysteminfosync
pnpm add universal-getsysteminfosync
yarn add universal-getsysteminfosync
bun add universal-getsysteminfosync
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0-beta |
| Published | 2021-01-12 |
| First published | 2021-01-12 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 63 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | rax |
| Maintainers | rax-publisher |

## Links

- npm: https://www.npmjs.com/package/universal-getsysteminfosync
- npm.io page: https://npm.io/package/universal-getsysteminfosync

## Dependencies (1)

- [@babel/runtime-corejs3](https://npm.io/package/@babel/runtime-corejs3.md) ^7.11.0

## Recent versions

- 2.0.0-beta (latest) — 2021-01-12

## README

# getSystemInfoSync 

[![npm](https://img.shields.io/npm/v/evapi.svg)](https://www.npmjs.com/package/evapi)
[![npm](https://img.shields.io/npm/v/evapi-getSystemInfoSync.svg)](https://www.npmjs.com/package/evapi-getSystemInfoSync)

获取系统信息。

<div style="display: flex;flex-direction: row;justify-content: space-between;">
<div style="margin-right: 20px;">

## 支持

<img alt="browser" src="https://gw.alicdn.com/tfs/TB1uYFobGSs3KVjSZPiXXcsiVXa-200-200.svg" width="25px" height="25px" title="h5" /> <img alt="miniApp" src="https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg" width="25px" height="25px" title="阿里小程序" /> <img alt="wechatMiniprogram" src="https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg" width="25px" height="25px" title="微信小程序"> <img alt="bytedanceMicroApp" src="https://gw.alicdn.com/tfs/TB1jFtVzO_1gK0jSZFqXXcpaXXa-200-200.svg" width="25px" height="25px" title="字节跳动小程序">

## 安装

```bash
$ npm install universal-getSystemInfoSync --save
```
or
```bash
$ npm install universal-api --save
```
## 示例

```javascript
import getSystemInfoSync from 'universal-getSystemInfoSync';

let res = getSystemInfoSync();

```

你也可以从大包引入：
```js
import { getSystemInfoSync } from 'universal-api';
```

## 方法

### `getSystemInfoSync()`

#### 返回

| 成员 | 类型 | 描述 |
| --- | --- | --- |
| pixelRatio | `number` | 设备像素比 |
| screenWidth | `number` | 屏幕宽度，单位px |
| screenHeight | `number` | 屏幕高度，单位px |
| windowWidth | `number` | 可使用窗口宽度，单位px |
| windowHeight | `number` | 可使用窗口高度，单位px |
| language | `string` | 设置的语言 |
| version | `string` | 版本号 |
| platform | `string` | 客户端平台 |

</div>
<div>

```jsx | inline
/**
 * iframe: true
 */
import React from 'react';
export default () => (
  <iframe style={{
      boxShadow: '0 2px 15px rgba(0,0,0,0.1)',
      width: '375px',
      height: '700px'
    }} src='https://herbox.online/p/109000004/app_1aKtEd7SK?previewZoom=100&view=preview&defaultPage=pages/universal-getsysteminfosync/index&topSlider=false'></iframe>
);
```

<div style="display: flex;margin-top: 50px;">
  <div>
    <img src="https://img.alicdn.com/imgextra/i4/O1CN01XDvKVV1DKGftHeaEp_!!6000000000197-0-tps-616-638.jpg" width="200" height="200" />
    <div style="text-align: center;">微信小程序</div>
  </div>
</div>

</div>
</div>

---
_Source: https://npm.io/package/universal-getsysteminfosync · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
