Skip to content

Commit

Permalink
feat: add ignores keys with undefined values
Browse files Browse the repository at this point in the history
  • Loading branch information
msimerson authored May 28, 2022
1 parent 919b84f commit 4415e9a
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 12 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule ".release"]
path = .release
url = https://github.com/msimerson/.release
1 change: 1 addition & 0 deletions .release
Submodule .release added at 4d5c90
29 changes: 19 additions & 10 deletions Changes.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@

## 2.2.1 - 2022-05-27
#### N.N.N - YYYY-MM-DD


#### 2.2.2 - 2022-05-28

- feat: add ignores keys with undefined values
- add .release submodule


#### 2.2.1 - 2022-05-27

- chore(ci): depend on shared GHA workflows


## 2.2.0 - 2022-05-23
#### 2.2.0 - 2022-05-23

- dep(node): require 14+
- dep(redis): bump 3 -> 4
Expand All @@ -14,7 +23,7 @@
- doc(README): update badges


## 2.1.0 - 2021-10-14
#### 2.1.0 - 2021-10-14

- bump redis dep 2.8.0 -> 3.1.2
- replace nodeunit with mocha
Expand All @@ -23,38 +32,38 @@
- es6: use "for item of array" syntax for array iterator


## 2.0.3 - 2017-08-26
#### 2.0.3 - 2017-08-26

- add redis_publish boolean to disable redis results publishing


## 2.0.2 - 2017-06-26
#### 2.0.2 - 2017-06-26

- revert #4, until a proper and tested fix is available


## 2.0.1 - 2017-05-26
#### 2.0.1 - 2017-05-26

- eslint 4 compat


## 2.0.0 - 2017-05-26
#### 2.0.0 - 2017-05-26

- Disable Redis pub/sub by default


## 1.0.2 - 2017-02-13
#### 1.0.2 - 2017-02-13

- publish incr operations
- update eslint to inherit eslint-plugin-haraka
- added AppVeyor (windows) testing


## 1.0.1 - 2017-01-26
#### 1.0.1 - 2017-01-26

- update eslint to inherit eslint-plugin-haraka
* depend on haraka-config
* vs ./config, which doesn't work for npm packaged plugin tests


## 1.0.0 - initial release
#### 1.0.0 - initial release
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ class ResultStore {

// anything else is an arbitrary key/val to store
for (const key in obj) {
if (all_opts.indexOf(key) !== -1) continue; // weed out our keys
if (all_opts.includes(key)) continue; // weed out our keys
if (obj[key] === undefined) continue; // ignore keys w/undef value
result[key] = obj[key]; // save the rest
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "haraka-results",
"version": "2.2.1",
"version": "2.2.2",
"description": "Haraka results store for connections and transactions",
"main": "index.js",
"directories": {
Expand Down

0 comments on commit 4415e9a

Please sign in to comment.