Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export async function manipulateAsync(
uri: string,
actions: Action[] = [],
{ format = SaveFormat.JPEG, ...rest }: SaveOptions = {},
): Promise {
if (!ExpoImageManipulator.manipulateAsync) {
throw new UnavailabilityError('ImageManipulator', 'manipulateAsync');
}
if (!(typeof uri === 'string')) {
throw new TypeError('The "uri" argument must be a string');
}
return await ExpoImageManipulator.manipulateAsync(uri, actions, { format, ...rest });
}
setUserId(userId: string): void {
if (!ExponentAmplitude.setUserId) {
throw new UnavailabilityError('Amplitude', 'setUserId');
}
return ExponentAmplitude.setUserId(userId);
},
setGroup(groupType: string, groupNames: string[]): void {
if (!ExponentAmplitude.setGroup) {
throw new UnavailabilityError('Amplitude', 'setGroup');
}
return ExponentAmplitude.setGroup(groupType, groupNames);
},
};
export async function openBrowserAsync(url) {
if (!ExponentWebBrowser.openBrowserAsync) {
throw new UnavailabilityError('WebBrowser', 'openBrowserAsync');
}
return ExponentWebBrowser.openBrowserAsync(url);
}
export function dismissBrowser() {
logEventWithProperties(eventName: string, properties: { [name: string]: any }): void {
if (!ExponentAmplitude.logEventWithProperties) {
throw new UnavailabilityError('Amplitude', 'logEventWithProperties');
}
return ExponentAmplitude.logEventWithProperties(eventName, properties);
},
export function dismissBrowser() {
if (!ExponentWebBrowser.dismissBrowser) {
throw new UnavailabilityError('WebBrowser', 'dismissBrowser');
}
ExponentWebBrowser.dismissBrowser();
}
export async function openAuthSessionAsync(url, redirectUrl) {
export async function openAuthSessionAsync(url, redirectUrl) {
if (_authSessionIsNativelySupported()) {
if (!ExponentWebBrowser.openAuthSessionAsync) {
throw new UnavailabilityError('WebBrowser', 'openAuthSessionAsync');
}
return ExponentWebBrowser.openAuthSessionAsync(url, redirectUrl);
}
else {
return _openAuthSessionPolyfillAsync(url, redirectUrl);
}
}
export function dismissAuthSession() {
export async function getRandomBytesAsync(byteCount) {
assertByteCount(byteCount);
const validByteCount = Math.floor(byteCount);
if (ExpoRandom.getRandomBytesAsync) {
return await ExpoRandom.getRandomBytesAsync(validByteCount);
}
else if (ExpoRandom.getRandomBase64StringAsync) {
const base64 = await ExpoRandom.getRandomBase64StringAsync(validByteCount);
return toByteArray(base64);
}
else {
throw new UnavailabilityError('expo-random', 'getRandomBytesAsync');
}
}
//# sourceMappingURL=Random.js.map
export async function manipulateAsync(uri, actions = [], { format = SaveFormat.JPEG, ...rest } = {}) {
if (!ExpoImageManipulator.manipulateAsync) {
throw new UnavailabilityError('ImageManipulator', 'manipulateAsync');
}
if (!(typeof uri === 'string')) {
throw new TypeError('The "uri" argument must be a string');
}
return await ExpoImageManipulator.manipulateAsync(uri, actions, { format, ...rest });
}
export { FlipType, SaveFormat, };