Skip to content

Commit

Permalink
doc: Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Sep 28, 2023
1 parent 108fd4f commit 05867cc
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,28 @@ const avatar = await image2uri('https://avatars.githubusercontent.com/u/1680273?
// /9j/2wCEAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDc
```

### API

```ts
export declare const validUrl: (url: string) => boolean;
export declare const extTypeMap: {
'.png': string;
'.apng': string;
'.gif': string;
'.jpg': string;
'.jpeg': string;
'.bm': string;
'.bmp': string;
'.webp': string;
'.ico': string;
'.svg': string;
};
export type ExtType = keyof typeof extTypeMap;
export default function image2uri(file: string, options?: {
ext?: string;
}): string | Promise<string>;
```

### Development

```bash
Expand Down

0 comments on commit 05867cc

Please sign in to comment.