Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

haraka-constants

Package Overview
Dependencies
Maintainers
4
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

haraka-constants - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

8

.eslintrc.json
{
"env": {
"node": true,
"es6": true,
"mocha": true
},
"plugins": [
"haraka"
],
"extends": ["eslint:recommended", "plugin:haraka/recommended"],
"extends": [ "eslint:recommended", "plugin:haraka/recommended" ],
"rules": {
"no-console": 0
}
}

@@ -6,3 +6,3 @@ 'use strict';

let translationTable = {};
const translationTable = {};

@@ -22,5 +22,6 @@ exports.cont = 900;

exports.import = function (object) {
for (var k in exports) {
for (const k in exports) {
if (k === 'import') continue;
if (k === 'translate') continue;
if (k === 'connection') continue;
if (exports.hasOwnProperty(k)) {

@@ -36,3 +37,3 @@ object[k.toUpperCase()] = exports[k];

if (Object.keys(translationTable).length === 0) {
for (var k in exports) {
for (const k in exports) {
if (typeof exports[k] === 'number') {

@@ -49,1 +50,18 @@ translationTable[exports[k]] = k.toUpperCase();

exports.import(exports);
exports.connection = {
state: {
CMD: 1,
LOOP: 2,
DATA: 3,
PAUSE: 4,
PAUSE_SMTP: 5,
PAUSE_DATA: 6,
DISCONNECTING: 99,
DISCONNECTED: 100,
}
}
Object.keys(exports.connection.state).forEach((state) => {
exports.connection.state['STATE_' + state] = exports.connection.state[state];
})
{
"author": "Haraka Team <harakamail@gmail.com>",
"author": "Haraka Team <haraka.mail@gmail.com>",
"name": "haraka-constants",
"license": "MIT",
"description": "Haraka constants",
"version": "1.0.4",
"version": "1.0.5",
"homepage": "http://haraka.github.io",

@@ -8,0 +8,0 @@ "repository": {

const node_const = require('constants');
let constants = require('../index');
let write_excl_val = node_const.O_CREAT | node_const.O_TRUNC | node_const.O_WRONLY | node_const.O_EXCL;
const constants = require('../index');
const write_excl_val = node_const.O_CREAT | node_const.O_TRUNC | node_const.O_WRONLY | node_const.O_EXCL;

@@ -48,4 +48,5 @@ exports.constants = {

test.expect(1);
var newObj = {};
const newObj = {};
constants.import(newObj);
delete newObj.connection;
test.deepEqual(newObj,

@@ -83,1 +84,24 @@ {

};
exports.connection = {
'has connection state CMD' : function (test) {
test.expect(1);
test.equal(constants.connection.state.CMD, 1);
test.done();
},
'has connection state STATE_CMD' : function (test) {
test.expect(1);
test.equal(constants.connection.state.STATE_CMD, 1);
test.done();
},
'has connection state DISCONNECTED' : function (test) {
test.expect(1);
test.equal(constants.connection.state.DISCONNECTED, 100);
test.done();
},
'has connection state STATE_DISCONNECTED' : function (test) {
test.expect(1);
test.equal(constants.connection.state.STATE_DISCONNECTED, 100);
test.done();
},
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc