# react-native-rotation-info

> Get device rotation info

Latest version **0.1.1** (published 2022-02-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-rotation-info
pnpm add react-native-rotation-info
yarn add react-native-rotation-info
bun add react-native-rotation-info
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2022-02-18 |
| First published | 2022-02-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 249.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | xulihang |
| Maintainers | xulihang |
| Keywords | react-native, ios, android |

## Links

- npm: https://www.npmjs.com/package/react-native-rotation-info
- Repository: https://github.com/xulihang/react-native-rotation-info
- Homepage: https://github.com/xulihang/react-native-rotation-info#readme
- Issues: https://github.com/xulihang/react-native-rotation-info/issues
- npm.io page: https://npm.io/package/react-native-rotation-info

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.1.1 (latest) — 2022-02-18
- 0.1.0 — 2022-02-18

## README

# react-native-rotation-info

Get device rotation info

## Installation

```sh
npm install react-native-rotation-info
```

## Usage

```js
import { getRotation, Surface } from "react-native-rotation-info";

// ...

const rotation = await getRotation();
if (rotation == Surface.ROTATION_0) {
  console.log(0);
} else if (rotation == Surface.ROTATION_90) {
  console.log(90);
} else if (rotation == Surface.ROTATION_180) {
  console.log(180);
} else if (rotation == Surface.ROTATION_270) {
  console.log(270);
}
```

## Contributing

See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.

## License

MIT

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