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

expo-localization

Package Overview
Dependencies
Maintainers
17
Versions
100
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 3.0.0 to 4.0.0

unimodule.json

2

build/ExpoLocalization.js

@@ -1,3 +0,3 @@

import { NativeModulesProxy } from 'expo-core';
import { NativeModulesProxy } from '@unimodules/core';
export default NativeModulesProxy.ExpoLocalization;
//# sourceMappingURL=ExpoLocalization.js.map

@@ -12,4 +12,3 @@ import * as rtlDetect from 'rtl-detect';

this.locales[0];
// The native format is en-US
return locale.replace('_', '-');
return locale;
},

@@ -16,0 +15,0 @@ get locales() {

import { Localization } from './Localization.types';
export declare const locale: any;
export declare const locale: string;
export declare const locales: any;

@@ -4,0 +4,0 @@ export declare const timezone: any;

import ExpoLocalization from './ExpoLocalization';
export const locale = ExpoLocalization.locale;
export const locales = ExpoLocalization.locales;
// Web, Android, and some iOS values use `-`. This will convert the iOS values that use `_`
// https://github.com/expo/expo/blob/21ae94bae2e8369992050c433a00699d425b35bd/packages/expo/src/Localization.ts#L112-L114
const parseLocale = (locale) => locale.replace('_', '-');
export const locale = parseLocale(ExpoLocalization.locale);
export const locales = ExpoLocalization.locales.map(parseLocale);
export const timezone = ExpoLocalization.timezone;

@@ -9,4 +12,9 @@ export const isoCurrencyCodes = ExpoLocalization.isoCurrencyCodes;

export async function getLocalizationAsync() {
return await ExpoLocalization.getLocalizationAsync();
const { locale, locales, ...localization } = await ExpoLocalization.getLocalizationAsync();
return {
locale: parseLocale(locale),
locales: ExpoLocalization.locales.map(parseLocale),
...localization,
};
}
//# sourceMappingURL=Localization.js.map
{
"name": "expo-localization",
"version": "3.0.0",
"version": "4.0.0",
"description": "Provides an interface for native user localization information.",
"main": "build/Localization.js",
"types": "build/Localization.d.ts",
"sideEffects": false,
"scripts": {

@@ -42,3 +43,3 @@ "build": "expo-module build",

"unimodulePeerDependencies": {
"expo-core": "*"
"@unimodules/core": "*"
},

@@ -48,3 +49,3 @@ "devDependencies": {

},
"gitHead": "9132f99f2ceb431006060c7f89d0928cc2053897"
"gitHead": "8413e821076a2eca36b302e68dd628ce2e1f591a"
}

@@ -46,3 +46,3 @@ # expo-localization

```java
import expo.modules.expo.modules.localization.LocalizationPackage;
import expo.modules.localization.LocalizationPackage;
```

@@ -49,0 +49,0 @@ ```java

@@ -1,3 +0,3 @@

import { NativeModulesProxy } from 'expo-core';
import { NativeModulesProxy } from '@unimodules/core';
export default NativeModulesProxy.ExpoLocalization;

@@ -16,5 +16,3 @@ import * as rtlDetect from 'rtl-detect';

this.locales[0];
// The native format is en-US
return locale.replace('_', '-');
return locale;
},

@@ -21,0 +19,0 @@ get locales(): string[] {

@@ -5,4 +5,8 @@ import ExpoLocalization from './ExpoLocalization';

export const locale = ExpoLocalization.locale;
export const locales = ExpoLocalization.locales;
// Web, Android, and some iOS values use `-`. This will convert the iOS values that use `_`
// https://github.com/expo/expo/blob/21ae94bae2e8369992050c433a00699d425b35bd/packages/expo/src/Localization.ts#L112-L114
const parseLocale = (locale: string): string => locale.replace('_', '-');
export const locale = parseLocale(ExpoLocalization.locale);
export const locales = ExpoLocalization.locales.map(parseLocale);
export const timezone = ExpoLocalization.timezone;

@@ -14,3 +18,8 @@ export const isoCurrencyCodes = ExpoLocalization.isoCurrencyCodes;

export async function getLocalizationAsync(): Promise<Localization> {
return await ExpoLocalization.getLocalizationAsync();
const { locale, locales, ...localization } = await ExpoLocalization.getLocalizationAsync();
return {
locale: parseLocale(locale),
locales: ExpoLocalization.locales.map(parseLocale),
...localization,
};
}

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

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

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