is-autoreply
Advanced tools
Comparing version 1.0.0 to 1.1.0
@@ -23,2 +23,6 @@ | ||
module.exports = (headers) => { | ||
if (!headers) { | ||
return false; | ||
} | ||
if(typeof headers === 'string' || Buffer.isBuffer(headers)) { | ||
@@ -25,0 +29,0 @@ headers = headerParse.parseHeaders(headers); |
{ | ||
"name": "is-autoreply", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "Detect if email is an autoreply according to the email headers.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -19,4 +19,2 @@ | ||
Headers can be String, Buffer or Object (key/value). In case of String or Buffer, the headers are automatically parsed. | ||
```js | ||
@@ -23,0 +21,0 @@ const isAutoreply = require('is-autoreply'); |
11
test.js
@@ -5,5 +5,2 @@ | ||
// Generally email is not autoreply | ||
assert.ok(!isAutoreply({})); | ||
// Test Auto-Submitted header | ||
@@ -104,1 +101,9 @@ assert.ok(!isAutoreply({ 'Auto-Submitted': 'No' })); | ||
assert.ok(!isAutoreply(Buffer.from('MIME-Version: 1.0'))); | ||
// Test falsy header values | ||
assert.ok(!isAutoreply()); | ||
assert.ok(!isAutoreply('')); | ||
assert.ok(!isAutoreply(Buffer.from(''))); | ||
assert.ok(!isAutoreply(null)); | ||
assert.ok(!isAutoreply([])); | ||
assert.ok(!isAutoreply({})); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
10456
155
0
31