New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-native-device-info

Package Overview
Dependencies
Maintainers
5
Versions
259
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

to
1.3.0

android/gradle/wrapper/gradle-wrapper.jar

3

CHANGELOG.md
## Release Notes
### 1.3.0
* feat: Add support for preferred languages function (https://github.com/react-native-community/react-native-device-info/pull/610)
### 1.2.0

@@ -4,0 +7,0 @@ * feat: Support 'dom' Platform.OS for react-native-dom (https://github.com/react-native-community/react-native-device-info/pull/406)

@@ -25,2 +25,3 @@ /**

deviceLocale: '',
preferredLocales: [],
deviceCountry: '',

@@ -27,0 +28,0 @@ timezone: '',

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

getDeviceLocale: () => string;
getPreferredLocales: () => Array<string>;
getDeviceCountry: () => string;

@@ -24,0 +25,0 @@ getTimezone: () => string;

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

},
getPreferredLocales: function() {
return RNDeviceInfo.preferredLocales;
},
getDeviceCountry: function() {

@@ -262,0 +265,0 @@ return RNDeviceInfo.deviceCountry;

2

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

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

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

| [getDeviceLocale()](#getdevicelocale) | `string` | ✅ | ✅ | ✅ | 0.7.0 |
| [getPreferredLocales()](#getpreferredlocale) | `Array<string>` | ✅ | ✅ | ❌ | ? |
| [getDeviceName()](#getdevicename) | `string` | ✅ | ✅ | ✅ | ? |

@@ -424,2 +425,18 @@ | [getFirstInstallTime()](#getfirstinstalltime) | `number` | ❌ | ✅ | ✅ | 0.12.0 |

### getPreferredLocales()
Gets the preferred locales defined by the user.
**Examples**
```js
const preferredLocales = DeviceInfo.getPreferredLocales();
// iOS: "[es-ES, en-US]"
// Android: "[es-ES, en-US]"
// Windows: ?
```
---
### getDeviceName()

@@ -426,0 +443,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet