# @types/osmosis

> TypeScript definitions for osmosis

Latest version **1.1.3** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/osmosis
pnpm add @types/osmosis
yarn add @types/osmosis
bun add @types/osmosis
```

## Health

**Score 40/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.1.3 |
| Published | 2023-11-07 |
| First published | 2017-07-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51421 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/osmosis
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/osmosis
- npm.io page: https://npm.io/package/@types/osmosis

## Recent versions

- 1.1.3 (latest) — 2023-11-07
- 1.1.1 (ts2.0) — 2018-10-11
- 1.1.2 — 2023-10-18
- 1.1.0 — 2018-01-11
- 1.0.0 — 2017-07-13

## README

# Installation
> `npm install --save @types/osmosis`

# Summary
This package contains type definitions for osmosis (https://github.com/rchipka/node-osmosis).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/osmosis.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/osmosis/index.d.ts)
````ts
interface Osmosis {
    /**
     * define domain where osmosis is parsing data from
     */
    get(url: string): Osmosis;

    /**
     * set scrapped data as result,
     * 1. string, after find function set data by selector as value with this string as key
     * 2. object, define any json object
     */
    set(json: string | {}): Osmosis;

    /**
     * find DOM by selector
     */
    find(selector: string): Osmosis;

    /**
     * follw links, founded href or src
     * @param selector '@href' or '@src', default '@href'
     */
    follow(selector: string): Osmosis;

    /**
     * paginate followed url
     */
    paginate(selector: string): Osmosis;

    /**
     * passing string to your function
     * log data
     */
    log(callback: (param: string) => any): Osmosis;

    /**
     * passing string to your function
     * debug data
     */
    debug(callback: (param: string) => any): Osmosis;

    /**
     * passing string to your function
     * error data
     */
    error(callback: (param: string) => any): Osmosis;

    /**
     * passing string to your function
     * result data, osmosis finished
     */
    data(callback: (param: any) => any): Osmosis;

    /**
     * Set configuration options for the **preceeding** command on down the chain.
     */
    config(option: string | { [key: string]: any }, value?: any): Osmosis;

    /**
     * Set a cookie. Short for `.config({ cookies: ... })`. Note: Setting a cookie to `null` will delete the cookie.
     */
    cookie(name: string, value: string | null): Osmosis;

    /**
     * Set an HTTP header. Short for `.config({ headers: ... })`
     */
    header(name: string, value: string): Osmosis;

    /**
     * Set multiple HTTP headers. Short for `.config({ headers: ... })`.
     */
    headers(headers: { [key: string]: string }): Osmosis;

    /**
     * Call a callback when the Osmosis instance has completely finished.
     */
    done(callback: () => any): Osmosis;
}

declare const osmosis: Osmosis;

export = osmosis;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
 * Dependencies: none

# Credits
These definitions were written by [Juraj Kočan](https://github.com/jurajkocan), and [Evan Shortiss](https://github.com/evanshortiss).

---
_Source: https://npm.io/package/@types/osmosis · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
