# depreca

> Mark something as deprecated with a simple module

Latest version **1.3.0** (published 2017-12-04) · MIT license · 0 weekly downloads

## Install

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

## 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.3.0 |
| Published | 2017-12-04 |
| First published | 2017-08-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Fabio Ricali |
| Maintainers | fabioricali |
| Keywords | deprecate, methods, warning, deprecated, console, log |

## Links

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

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads
- [child-process-debug](https://npm.io/package/child-process-debug.md) — 695 weekly downloads

## Recent versions

- 1.3.0 (latest) — 2017-12-04
- 1.2.0 — 2017-08-26
- 1.1.1 — 2017-08-25
- 1.1.0 — 2017-08-25
- 1.0.1 — 2017-08-23

## README

<div align="center">
<h1>depreca</h1>
Mark something as deprecated with a simple module.
<br/><br/>
<a href="https://travis-ci.org/fabioricali/depreca" target="_blank"><img src="https://travis-ci.org/fabioricali/depreca.svg?branch=master" title="Build Status"/></a>
<a href="https://coveralls.io/github/fabioricali/depreca?branch=master" target="_blank"><img src="https://coveralls.io/repos/github/fabioricali/depreca/badge.svg?branch=master" title="Coverage Status"/></a>
<a href="https://opensource.org/licenses/MIT" target="_blank"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" title="License: MIT"/></a>
<img src="https://img.shields.io/badge/team-terrons-orange.svg" title="Team Terrons"/>
</div>

## Installation

### Node.js
```
npm install depreca --save
```

## Example
Just one method!

### Deprecate function
```javascript
const deprecate = require('depreca');

function foo(){
    deprecate('foo() is deprecated use bar() instead'); 
    //=> [DeprecationWarning] foo() is deprecated use bar() instead
}
```
### Deprecate object property
```javascript
const config = {
    foo: 'hello',
    bar: 'world'
};

deprecate(config.foo, 'foo is deprecated use bar instead'); 
//=> [DeprecationWarning] foo is deprecated use bar instead

// set a custom deprecation title
deprecate.title = 'MyCustomDeprecation';
deprecate(config.bar, 'bar is deprecated use foo instead'); 
//=> [MyCustomDeprecation] bar is deprecated use foo instead
```

### Call only once of deprecate
```javascript
deprecate.once('foo() is deprecated use bar() instead'); 
```

## Changelog
You can view the changelog <a target="_blank" href="https://github.com/fabioricali/depreca/blob/master/CHANGELOG.md">here</a>

## License
depreca is open-sourced software licensed under the <a target="_blank" href="http://opensource.org/licenses/MIT">MIT license</a>

## Author
<a target="_blank" href="http://rica.li">Fabio Ricali</a>

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