1.0.1 ā€¢ Published 4 months ago

viewerjs-soda v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

viewerjs-soda

NPM version NPM downloads

šŸš€ Functional invocation for viewerjs

Type

/**
 * @param image An image or a group of images.
 * @param options The options of the viewer.
 */
export function view(image: string | string[], options?: ViewerOptions): void
/**
 * @param image A group of images.
 * @param indexOrSrc The index of the image or the src to be displayed.
 * @param options The options of the viewer.
 */
export function view(image: string[], indexOrSrc: number | string, options?: ViewerOptions): void

Usage

import { view } from "viewerjs-soda"

const options: ViewerOptions | undefined = {/** your options */}

// view an image directly
view("https://xxx", options)

// view a group of images
view(["https://aaa", "https://bbb", "https://ccc"], options)

// view a group of images, start with an index
view(["https://aaa", "https://bbb", "https://ccc"], 2, options)

// view a group of images, start with a src
view(["https://aaa", "https://bbb", "https://ccc"], "https://ccc", options)
1.0.1

4 months ago

1.0.0

5 months ago

0.0.4

5 months ago

0.0.3

5 months ago

0.0.2

5 months ago

0.0.1

5 months ago