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

expo-localization

Package Overview
Dependencies
Maintainers
25
Versions
93
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

expo-localization - npm Package Compare versions

Comparing version 10.1.0 to 10.2.0

30

build/Localization.d.ts

@@ -6,3 +6,3 @@ import { Localization } from './Localization.types';

*
* @example `USD`, `EUR`, `CNY`, null
* @example `'USD'`, `'EUR'`, `'CNY'`, `null`
*/

@@ -13,3 +13,3 @@ export declare const currency: string | null;

*
* @example `,`, '.'
* @example `','`, `'.'`
*/

@@ -20,3 +20,3 @@ export declare const decimalSeparator: string;

*
* @example `.`, '', ','
* @example `'.'`, `''`, `','`
*/

@@ -44,3 +44,3 @@ export declare const digitGroupingSeparator: string;

*
* @example `en`, `en-US`, `zh-Hans`, `zh-Hans-CN`, `en-emodeng`
* @example `'en'`, `'en-US'`, `'zh-Hans'`, `'zh-Hans-CN'`, `'en-emodeng'`
*/

@@ -55,5 +55,7 @@ export declare const locale: string;

* The current time zone in display format.
* On Web time zone is calculated with Intl.DateTimeFormat().resolvedOptions().timeZone. For a better estimation you could use the moment-timezone package but it will add significant bloat to your website's bundle size.
* On Web time zone is calculated with Intl.DateTimeFormat().resolvedOptions().timeZone. For a
* better estimation you could use the moment-timezone package but it will add significant bloat to
* your website's bundle size.
*
* @example `America/Los_Angeles`
* @example `'America/Los_Angeles'`
*/

@@ -65,10 +67,18 @@ export declare const timezone: string;

*
* @example `US`, `NZ`, null
* @example `'US'`, `'NZ'`, `null`
*/
export declare const region: string | null;
/**
* Get the latest native values from the device.
* Locale can be changed on some Android devices without resetting the app.
* On iOS, changing the locale will cause the device to reset meaning the constants will always be correct.
* Get the latest native values from the device. Locale can be changed on some Android devices
* without resetting the app.
* > On iOS, changing the locale will cause the device to reset meaning the constants will always be
* correct.
*
* # Example
* ```ts
* // When the app returns from the background on Android...
*
* const { locale } = await Localization.getLocalizationAsync();
* ```
*/
export declare function getLocalizationAsync(): Promise<Localization>;
import ExpoLocalization from './ExpoLocalization';
// @needsAudit
/**
* Three-character ISO 4217 currency code. Returns `null` on web.
*
* @example `USD`, `EUR`, `CNY`, null
* @example `'USD'`, `'EUR'`, `'CNY'`, `null`
*/
export const currency = ExpoLocalization.currency;
// @needsAudit
/**
* Decimal separator used for formatting numbers.
*
* @example `,`, '.'
* @example `','`, `'.'`
*/
export const decimalSeparator = ExpoLocalization.decimalSeparator;
// @needsAudit
/**
* Digit grouping separator used when formatting numbers larger than 1000.
*
* @example `.`, '', ','
* @example `'.'`, `''`, `','`
*/
export const digitGroupingSeparator = ExpoLocalization.digitGroupingSeparator;
// @needsAudit
/**

@@ -24,2 +28,3 @@ * A list of all the supported language ISO codes.

export const isoCurrencyCodes = ExpoLocalization.isoCurrencyCodes;
// @needsAudit
/**

@@ -30,2 +35,3 @@ * Boolean value that indicates whether the system uses the metric system.

export const isMetric = ExpoLocalization.isMetric;
// @needsAudit
/**

@@ -38,2 +44,3 @@ * Returns if the system's language is written from Right-to-Left.

export const isRTL = ExpoLocalization.isRTL;
// @needsAudit
/**

@@ -43,5 +50,6 @@ * An [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag),

*
* @example `en`, `en-US`, `zh-Hans`, `zh-Hans-CN`, `en-emodeng`
* @example `'en'`, `'en-US'`, `'zh-Hans'`, `'zh-Hans-CN'`, `'en-emodeng'`
*/
export const locale = ExpoLocalization.locale;
// @needsAudit
/**

@@ -52,9 +60,13 @@ * List of all the native languages provided by the user settings.

export const locales = ExpoLocalization.locales;
// @needsAudit
/**
* The current time zone in display format.
* On Web time zone is calculated with Intl.DateTimeFormat().resolvedOptions().timeZone. For a better estimation you could use the moment-timezone package but it will add significant bloat to your website's bundle size.
* On Web time zone is calculated with Intl.DateTimeFormat().resolvedOptions().timeZone. For a
* better estimation you could use the moment-timezone package but it will add significant bloat to
* your website's bundle size.
*
* @example `America/Los_Angeles`
* @example `'America/Los_Angeles'`
*/
export const timezone = ExpoLocalization.timezone;
// @needsAudit
/**

@@ -64,9 +76,18 @@ * The region code for your device that comes from the Region setting under Language & Region on iOS.

*
* @example `US`, `NZ`, null
* @example `'US'`, `'NZ'`, `null`
*/
export const region = ExpoLocalization.region;
// @needsAudit
/**
* Get the latest native values from the device.
* Locale can be changed on some Android devices without resetting the app.
* On iOS, changing the locale will cause the device to reset meaning the constants will always be correct.
* Get the latest native values from the device. Locale can be changed on some Android devices
* without resetting the app.
* > On iOS, changing the locale will cause the device to reset meaning the constants will always be
* correct.
*
* # Example
* ```ts
* // When the app returns from the background on Android...
*
* const { locale } = await Localization.getLocalizationAsync();
* ```
*/

@@ -73,0 +94,0 @@ export async function getLocalizationAsync() {

@@ -11,2 +11,14 @@ # Changelog

### 💡 Others
## 10.2.0 — 2021-06-16
### 🐛 Bug fixes
- Enable kotlin in all modules. ([#12716](https://github.com/expo/expo/pull/12716) by [@wschurman](https://github.com/wschurman))
### 💡 Others
- Build Android code using Java 8 to fix Android instrumented test build error. ([#12939](https://github.com/expo/expo/pull/12939) by [@kudo](https://github.com/kudo))
## 10.1.0 — 2021-03-10

@@ -13,0 +25,0 @@

{
"name": "expo-localization",
"version": "10.1.0",
"version": "10.2.0",
"description": "Provides an interface for native user localization information.",

@@ -47,3 +47,3 @@ "main": "build/Localization.js",

},
"gitHead": "5b57d1fd0a20294c1dec7c43b5df34dd6425d1a5"
"gitHead": "b33f5e224578564c3e4b1b467f258cc119b3b786"
}

@@ -6,23 +6,27 @@ import ExpoLocalization from './ExpoLocalization';

// @needsAudit
/**
* Three-character ISO 4217 currency code. Returns `null` on web.
*
* @example `USD`, `EUR`, `CNY`, null
* @example `'USD'`, `'EUR'`, `'CNY'`, `null`
*/
export const currency = ExpoLocalization.currency;
// @needsAudit
/**
* Decimal separator used for formatting numbers.
*
* @example `,`, '.'
* @example `','`, `'.'`
*/
export const decimalSeparator = ExpoLocalization.decimalSeparator;
// @needsAudit
/**
* Digit grouping separator used when formatting numbers larger than 1000.
*
* @example `.`, '', ','
* @example `'.'`, `''`, `','`
*/
export const digitGroupingSeparator = ExpoLocalization.digitGroupingSeparator;
// @needsAudit
/**

@@ -33,2 +37,3 @@ * A list of all the supported language ISO codes.

// @needsAudit
/**

@@ -40,2 +45,3 @@ * Boolean value that indicates whether the system uses the metric system.

// @needsAudit
/**

@@ -49,2 +55,3 @@ * Returns if the system's language is written from Right-to-Left.

// @needsAudit
/**

@@ -54,6 +61,7 @@ * An [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag),

*
* @example `en`, `en-US`, `zh-Hans`, `zh-Hans-CN`, `en-emodeng`
* @example `'en'`, `'en-US'`, `'zh-Hans'`, `'zh-Hans-CN'`, `'en-emodeng'`
*/
export const locale = ExpoLocalization.locale;
// @needsAudit
/**

@@ -65,10 +73,14 @@ * List of all the native languages provided by the user settings.

// @needsAudit
/**
* The current time zone in display format.
* On Web time zone is calculated with Intl.DateTimeFormat().resolvedOptions().timeZone. For a better estimation you could use the moment-timezone package but it will add significant bloat to your website's bundle size.
* On Web time zone is calculated with Intl.DateTimeFormat().resolvedOptions().timeZone. For a
* better estimation you could use the moment-timezone package but it will add significant bloat to
* your website's bundle size.
*
* @example `America/Los_Angeles`
* @example `'America/Los_Angeles'`
*/
export const timezone = ExpoLocalization.timezone;
// @needsAudit
/**

@@ -78,10 +90,19 @@ * The region code for your device that comes from the Region setting under Language & Region on iOS.

*
* @example `US`, `NZ`, null
* @example `'US'`, `'NZ'`, `null`
*/
export const region = ExpoLocalization.region;
// @needsAudit
/**
* Get the latest native values from the device.
* Locale can be changed on some Android devices without resetting the app.
* On iOS, changing the locale will cause the device to reset meaning the constants will always be correct.
* Get the latest native values from the device. Locale can be changed on some Android devices
* without resetting the app.
* > On iOS, changing the locale will cause the device to reset meaning the constants will always be
* correct.
*
* # Example
* ```ts
* // When the app returns from the background on Android...
*
* const { locale } = await Localization.getLocalizationAsync();
* ```
*/

@@ -88,0 +109,0 @@ export async function getLocalizationAsync(): Promise<Localization> {

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