# axer

> The spider's sharp ax.

Latest version **0.0.7** (published 2017-06-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install axer
pnpm add axer
yarn add axer
bun add axer
```

## 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.7 |
| Published | 2017-06-23 |
| First published | 2017-03-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 (+2 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Author | XueSeason |
| Maintainers | xueseason |
| Keywords | spider, ax |

## Links

- npm: https://www.npmjs.com/package/axer
- Repository: https://github.com/XueSeason/axer
- Homepage: https://github.com/XueSeason/axer#readme
- Issues: https://github.com/XueSeason/axer/issues
- npm.io page: https://npm.io/package/axer

## Dependencies (4)

- [log4js](https://npm.io/package/log4js.md) ^1.1.1
- [request](https://npm.io/package/request.md) ^2.81.0
- [bluebird](https://npm.io/package/bluebird.md) ^3.5.0
- [tough-cookie-filestore-bugfixed](https://npm.io/package/tough-cookie-filestore-bugfixed.md) 0.0.2

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 0.0.7 (latest) — 2017-06-23
- 0.0.6 — 2017-05-19
- 0.0.5 — 2017-04-07
- 0.0.4 — 2017-04-07
- 0.0.3 — 2017-03-30
- 0.0.2 — 2017-03-15
- 0.0.1 — 2017-03-15

## README

# Axer

[![npm](https://img.shields.io/npm/v/axer.svg?style=flat-square)](https://www.npmjs.com/package/axer)
[![Build Status](https://travis-ci.org/XueSeason/axer.svg?branch=master)](https://travis-ci.org/XueSeason/axer)
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/XueSeason/axer/master/LICENSE)
[![Twitter](https://img.shields.io/twitter/url/https/github.com/XueSeason/axer.svg?style=social)](https://twitter.com/intent/tweet?text=Wow:&url=%5Bobject%20Object%5D)

The spider's sharp ax.:octocat:

[![JavaScript Style Guide](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)

## Installation

Axer uses the newest ES2015 feature `async/await`, requires node v7.6.0 or higher and async function support.

```bash
npm install --save axer
```

## Easy to use

```javascript
const path = require('path')

;(async function demo () {
  const cookieJarPath = path.resolve(__dirname, './locals', 'cookieJar.json')
  const Request = require('../request')

  // You can set proxy and request google in China
  const request = new Request(cookieJarPath, {
    proxy: 'http://****:**'
  })
  await request.get('https://www.google.com')

  // login facebook, check result in locals/cookieJar.json
  const email = 'email'
  const pass = 'pass'
  await request.get('https://www.facebook.com')
  await request.post('https://www.facebook.com/login.php?login_attempt=1', { email, pass })

  // or post json
  await request.post('http://localhost:4000/search/result', { type: 'json' }, {
    keyword: 'hello',
    country: 'cn'
  })

  const youtubeMusicUrl = 'https://www.youtube.com/audiolibrary_download?f=m&vid=2837bb75829ae65a'
  await request.download(youtubeMusicUrl, path.resolve(__dirname, './locals', 'mymusic.mp3'))
})()
```

We also encapsulate node's filesystem for conveniently maintain filesystem in Unix style.

```javascript
const file = require('axer').file
const path = require('path')

;(async function demo() {
  const dir = path.resolve(__dirname, './locals', 'file')
  await file.mkdir(dir)

  const filePath = path.resolve(dir, 'info.txt')
  await file.touch(filePath)
  await file.echo('goooooood.', filePath)
  const catContent = await file.cat(filePath)
  console.log(catContent)

  const tailContent = await file.tail(path.resolve(dir, 'py.txt'))
  console.log(tailContent)
})()
```

## Documenation(Comming soon)

- 中文 API 文档
- API document
- FAQ

## Author

See [XueSeason](https://github.com/xueseason)

## License

MIT

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