# rfunc-mock

> Mock utility for rfunc.

Latest version **1.0.8** (published 2016-11-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install rfunc-mock
pnpm add rfunc-mock
yarn add rfunc-mock
bun add rfunc-mock
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.8 |
| Published | 2016-11-28 |
| First published | 2016-07-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6 |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Taka Okunishi |
| Maintainers | okunishinishi |
| Keywords | rfunc |

## Links

- npm: https://www.npmjs.com/package/rfunc-mock
- Repository: https://github.com/rfunc-labo/rfunc-mock
- Homepage: https://github.com/rfunc-labo/rfunc-mock#readme
- Issues: https://github.com/rfunc-labo/rfunc-mock/issues
- npm.io page: https://npm.io/package/rfunc-mock

## Dependencies (1)

- [co](https://npm.io/package/co.md) ^4.6.0

## Recent versions

- 1.0.8 (latest) — 2016-11-28
- 1.0.7 — 2016-07-26
- 1.0.6 — 2016-07-23
- 1.0.5 — 2016-07-23
- 1.0.4 — 2016-07-23
- 1.0.3 — 2016-07-16
- 1.0.2 — 2016-07-16
- 1.0.1 — 2016-07-16
- 1.0.0 — 2016-07-16

## README

rfunc-mock
==========

<!---
This file is generated by ape-tmpl. Do not update manually.
--->

<!-- Badge Start -->
<a name="badges"></a>

[![Build Status][bd_travis_shield_url]][bd_travis_url]
[![Code Climate][bd_codeclimate_shield_url]][bd_codeclimate_url]
[![Code Coverage][bd_codeclimate_coverage_shield_url]][bd_codeclimate_url]
[![npm Version][bd_npm_shield_url]][bd_npm_url]
[![JS Standard][bd_standard_shield_url]][bd_standard_url]

[bd_repo_url]: https://github.com/rfunc-labo/rfunc-mock
[bd_travis_url]: http://travis-ci.org/rfunc-labo/rfunc-mock
[bd_travis_shield_url]: http://img.shields.io/travis/rfunc-labo/rfunc-mock.svg?style=flat
[bd_travis_com_url]: http://travis-ci.com/rfunc-labo/rfunc-mock
[bd_travis_com_shield_url]: https://api.travis-ci.com/rfunc-labo/rfunc-mock.svg?token=
[bd_license_url]: https://github.com/rfunc-labo/rfunc-mock/blob/master/LICENSE
[bd_codeclimate_url]: http://codeclimate.com/github/rfunc-labo/rfunc-mock
[bd_codeclimate_shield_url]: http://img.shields.io/codeclimate/github/rfunc-labo/rfunc-mock.svg?style=flat
[bd_codeclimate_coverage_shield_url]: http://img.shields.io/codeclimate/coverage/github/rfunc-labo/rfunc-mock.svg?style=flat
[bd_gemnasium_url]: https://gemnasium.com/rfunc-labo/rfunc-mock
[bd_gemnasium_shield_url]: https://gemnasium.com/rfunc-labo/rfunc-mock.svg
[bd_npm_url]: http://www.npmjs.org/package/rfunc-mock
[bd_npm_shield_url]: http://img.shields.io/npm/v/rfunc-mock.svg?style=flat
[bd_standard_url]: http://standardjs.com/
[bd_standard_shield_url]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg

<!-- Badge End -->


<!-- Description Start -->
<a name="description"></a>

Mock utility for rfunc.

<!-- Description End -->


<!-- Overview Start -->
<a name="overview"></a>



<!-- Overview End -->


<!-- Sections Start -->
<a name="sections"></a>

<!-- Section from "doc/guides/01.Installation.md.hbs" Start -->

<a name="section-doc-guides-01-installation-md"></a>

Installation
-----

```bash
$ npm install rfunc-mock --save
```


<!-- Section from "doc/guides/01.Installation.md.hbs" End -->

<!-- Section from "doc/guides/02.Usage.md.hbs" Start -->

<a name="section-doc-guides-02-usage-md"></a>

Usage
---------

```javascript
'use strict'

const co = require('co')
const { moduleProxy } = require('rfunc-mock')

co(function * () {
// Create api mock
  {
    let api = moduleProxy({
      $before () {
        /* ... */
        console.log('calling the method...')
      },
      doSomething () {
        /* ... */
        return Promise.resolve('done!')
      }
    })
    yield api.doSomething()
  }
}).catch((err) => console.error(err))

```


<!-- Section from "doc/guides/02.Usage.md.hbs" End -->

<!-- Section from "doc/guides/03.Functions.md.hbs" Start -->

<a name="section-doc-guides-03-functions-md"></a>

Functions
---------

Available functions

| Signature | Description |
| ---- | ----------- |
| `.moduleProxy(module, options) -> Object` | Create a proxy for a module |


<!-- Section from "doc/guides/03.Functions.md.hbs" End -->


<!-- Sections Start -->


<!-- LICENSE Start -->
<a name="license"></a>

License
-------
This software is released under the [MIT License](https://github.com/rfunc-labo/rfunc-mock/blob/master/LICENSE).

<!-- LICENSE End -->


<!-- Links Start -->
<a name="links"></a>

Links
------

+ [rfunc][rfunc_url]

[rfunc_url]: https://github.com/rfunc-labo/rfunc

<!-- Links End -->

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