1 | import { NativeModules } from 'react-native';
|
2 | const { ExponentImageManipulator } = NativeModules;
|
3 | export async function manipulate(uri, actions = [], saveOptions = {}) {
|
4 |
|
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 | }
|
8 | export 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 |
|
\ | No newline at end of file |