# library-search

> Searches www.librarieswest.org.uk

Latest version **0.0.6** (published 2017-02-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install library-search
pnpm add library-search
yarn add library-search
bun add library-search
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2017-02-18 |
| First published | 2017-01-14 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Nicholas Soper |
| Maintainers | niksoper |

## Links

- npm: https://www.npmjs.com/package/library-search
- Repository: https://github.com/niksoper/library-search
- Homepage: https://github.com/niksoper/library-search#readme
- Issues: https://github.com/niksoper/library-search/issues
- npm.io page: https://npm.io/package/library-search

## Dependencies (3)

- [jsdom](https://npm.io/package/jsdom.md) ^9.9.1
- [lodash](https://npm.io/package/lodash.md) ^4.17.4
- [request-promise](https://npm.io/package/request-promise.md) ^4.1.1

## Recent versions

- 0.0.6 (latest) — 2017-02-18
- 0.0.5 — 2017-01-14
- 0.0.4 — 2017-01-14
- 0.0.3 — 2017-01-14
- 0.0.2 — 2017-01-14
- 0.0.1 — 2017-01-14

## README

# library-search
Searches www.librarieswest.org.uk

```
npm install library-search --save
```

The module exports a function that will:

1. Search www.librarieswest.org.uk
2. Scrape the first page of results for exact matches
3. Follow the link for each exact match
4. Scrape and combine the available books in each book page
5. Filter available books by my favourite libraries ;-)

```javascript
const find = require('library-search')
find('Atonement')
  .then(result => {
    const asJson = JSON.stringify(result, null, 2)
    console.log(asJson)
  })
  .catch(err => {
    console.log('ERROR:', err)
  })
```

A sample reponse from the above snippet:

```json
[
  {
    "url": "https://www.librarieswest.org.uk/client/en_GB/default/search/detailnonmodal/ent:$002f$002fSD_ILS$002f0$002fSD_ILS:729313/ada?qu=atonement&te=ILS&lm=BOOK&rt=false%7C%7C%7CTITLE%7C%7C%7CTitle",
    "availability": [
      {
        "library": "Bedminster Library",
        "status": "On Shelf"
      }
    ]
  }
]

```

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