Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-device-info

Package Overview
Dependencies
Maintainers
5
Versions
256
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-device-info - npm Package Compare versions

Comparing version 0.26.5 to 0.27.0

3

CHANGELOG.md
## Release Notes
### 0.27.0
* Added `isBatteryCharging()` (https://github.com/rebeccahughes/react-native-device-info/pull/514)
### 0.26.5

@@ -4,0 +7,0 @@ * Use BigInteger to avoid overflow in Disk related functions (https://github.com/rebeccahughes/react-native-device-info/pull/587)

@@ -45,2 +45,3 @@ // should be imported this way:

getBatteryLevel: () => Promise<number>;
isBatteryCharging: () => Promise<boolean>;
isLandscape: () => boolean;

@@ -47,0 +48,0 @@ isAirPlaneMode: () => Promise<boolean>;

@@ -302,2 +302,5 @@ /**

},
isBatteryCharging: function() {
return RNDeviceInfo.isBatteryCharging();
},
isLandscape: function() {

@@ -304,0 +307,0 @@ const { height, width } = Dimensions.get('window');

2

package.json
{
"name": "react-native-device-info",
"version": "0.26.5",
"version": "0.27.0",
"description": "Get device information using react-native",

@@ -5,0 +5,0 @@ "main": "deviceinfo.js",

@@ -247,2 +247,3 @@ # react-native-device-info

| [isAirPlaneMode()](#isairplanemode) | `Promise<boolean>` | ❌ | ✅ | ❌ | 0.25.0 |
| [isBatteryCharging()](#isbatterycharging) | `Promise<boolean>` | ❌ | ✅ | ❌ | 0.27.0 |
| [isEmulator()](#isemulator) | `boolean` | ✅ | ✅ | ✅ | ? |

@@ -828,2 +829,17 @@ | [isPinOrFingerprintSet()](#ispinorfingerprintset) | (callback)`boolean` | ✅ | ✅ | ✅ | 0.10.1 |

---
### isBatteryCharging()
Tells if the battery is currently charging.
**Examples**
```js
DeviceInfo.isBatteryCharging().then(isCharging => {
// true or false
});
```
---
### isEmulator()

@@ -897,2 +913,3 @@

Returns the device's type as a string, which will be one of:
* `Handset`

@@ -909,3 +926,2 @@ * `Tablet`

## Troubleshooting

@@ -912,0 +928,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc