UNPKG

704 BJavaScriptView Raw
1import { NativeModules } from 'react-native';
2const { ExponentImageManipulator } = NativeModules;
3export async function manipulate(uri, actions = [], saveOptions = {}) {
4 // Remove in SDK 32+
5 console.warn(`ImageManipulator.manipulate is deprecated in favor of manipulateAsync, which has the same API except for the method name`);
6 return manipulateAsync(uri, actions, saveOptions);
7}
8export async function manipulateAsync(uri, actions = [], saveOptions = {}) {
9 if (!(typeof uri === 'string')) {
10 throw new TypeError(`The "uri" argument must be a string`);
11 }
12 return ExponentImageManipulator.manipulate(uri, actions, saveOptions);
13}
14//# sourceMappingURL=ImageManipulator.js.map
\No newline at end of file