Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/haraka/haraka-constants
Haraka constants
https://github.com/haraka/haraka-constants
haraka
Last synced: about 2 months ago
JSON representation
Haraka constants
- Host: GitHub
- URL: https://github.com/haraka/haraka-constants
- Owner: haraka
- License: mit
- Created: 2016-02-21T19:59:40.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2024-05-08T21:42:40.000Z (8 months ago)
- Last Synced: 2024-09-20T12:37:44.076Z (3 months ago)
- Topics: haraka
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/haraka-constants
- Size: 22.5 KB
- Stars: 1
- Watchers: 5
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[![Build Status][ci-img]][ci-url]
[![Coverage Status][cov-img]][cov-url]
[![Code Climate][clim-img]][clim-url][![NPM][npm-img]][npm-url]
# haraka-constants
Haraka constants. Exports the following constants used throughout Haraka:
CONT: 900,
STOP: 901,
DENY: 902,
DENYSOFT: 903,
DENYDISCONNECT: 904,
DISCONNECT: 905,
OK: 906,
NEXT_HOOK: 907,
DELAY: 908,
DENYSOFTDISCONNECT: 909# Exported Functions
## import
Populates an object with the constants.
```js
const constants = require('haraka-constants')
const myObj = {}
constants.import(myObj)// myObj.cont === 900
```## translate
Converts a numeric constant to its string representation.
```js
const constants = require('haraka-constants')
// 'CONT' === constants.translate(900);
```[ci-img]: https://github.com/haraka/haraka-constants/actions/workflows/ci.yml/badge.svg
[ci-url]: https://github.com/haraka/haraka-constants/actions/workflows/ci.yml
[cov-img]: https://codecov.io/github/haraka/haraka-constants/coverage.svg
[cov-url]: https://codecov.io/github/haraka/haraka-constants?branch=master
[clim-img]: https://codeclimate.com/github/haraka/haraka-constants/badges/gpa.svg
[clim-url]: https://codeclimate.com/github/haraka/haraka-constants
[npm-img]: https://nodei.co/npm/haraka-constants.png
[npm-url]: https://www.npmjs.com/package/haraka-constants