# abstract-function

> interface/abstract function that does nothing except throw an error when called. Useful for programing to interface style

Latest version **1.0.1** (published 2015-08-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install abstract-function
pnpm add abstract-function
yarn add abstract-function
bun add abstract-function
```

## 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.1 |
| Published | 2015-08-18 |
| First published | 2015-08-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | quocnguyen@clgt.vn |
| Maintainers | quocnguyen |
| Keywords | asbtract, function, interface, function |

## Links

- npm: https://www.npmjs.com/package/abstract-function
- Repository: https://github.com/quocnguyen/abstract
- Homepage: https://github.com/quocnguyen/abstract#readme
- Issues: https://github.com/quocnguyen/abstract/issues
- npm.io page: https://npm.io/package/abstract-function

## Recent versions

- 1.0.1 (latest) — 2015-08-18
- 1.0.0 — 2015-08-18

## README

# abstract-function

an abstract function that does nothing except throw an error when called.

## Installation

```
npm install abstract-function
```
## Example

```js
var abstract = require('abstract-function');

// interface
var User = {
  login: abstract,
  register: abstract
}

// subclass
function UserRepo() {};
UserRepo.prototype = Object.create(User); // extend the User.
UserRepo.prototype.login = function() {
  console.log('do login');
}

var user = new UserRepo();
user.login(); // ok
user.register();  //throw not implement exception

```

# License

  MIT

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