Socket
Socket
Sign inDemoInstall

errlop

Package Overview
Dependencies
Maintainers
1
Versions
110
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

errlop - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

21

es2015/index.js
'use strict';
/**
* Only accept codes that are numbers, otherwise discard them
* @param {*} code
* @returns {number}
* @private
*/
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

@@ -15,10 +22,2 @@

var isValidArray = ['undefined'];
/**
* Only accept codes that are numbers, otherwise discard them
* @param {*} code
* @returns {number}
* @private
*/
function parseCode(code) {

@@ -33,4 +32,4 @@ var number = Number(code);

* @example
* console.log(JSON.stringify(typeof value), Boolean(value), typeof value === 'undefined', value == undefined, typeof value, typeof (typeof value), `[${typeof value}]`, ['undefined'].indexOf(typeof value))
* // "undefined" true false false undefined string [undefined] 0
* console.log(JSON.stringify(typeof value), Boolean(value), typeof value === 'undefined', value == undefined, typeof value, typeof (typeof value), `[${typeof value}]`, ['undefined'].indexOf(typeof value), typeof (typeof value))
* // "undefined" true false false undefined string [undefined] 0 string
* @param {*} value

@@ -41,3 +40,3 @@ * @returns {boolean}

function isValid(value) {
return Boolean(value) && isValidArray.indexOf(typeof value === 'undefined' ? 'undefined' : _typeof(value)) === -1;
return Boolean(value) && String(typeof value === 'undefined' ? 'undefined' : _typeof(value)) !== 'undefined';
}

@@ -44,0 +43,0 @@

# History
## v1.0.2 2018 July 27
- More effecient node version 4 crash prevention
## v1.0.1 2018 July 27

@@ -4,0 +7,0 @@ - Support node version 0.8

{
"name": "errlop",
"version": "1.0.1",
"version": "1.0.2",
"description": "An extended Error class that envelops a parent error, such that the stack trace contains the causation",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/bevry/errlop",

@@ -44,3 +44,3 @@ <!-- TITLE/ -->

<li>Module: <code>require('errlop')</code></li>
<li>CDN URL: <code>//wzrd.in/bundle/errlop@1.0.1</code></li></ul>
<li>CDN URL: <code>//wzrd.in/bundle/errlop@1.0.2</code></li></ul>

@@ -164,3 +164,3 @@ <a href="http://enderjs.com" title="Ender is a full featured package manager for your browser"><h3>Ender</h3></a><ul>

<ul><li><a href="http://balupton.com">Benjamin Lupton</a> — <a href="https://github.com/bevry/errlop/commits?author=balupton" title="View the GitHub contributions of Benjamin Lupton on repository bevry/errlop">view contributions</a></li></ul>
<ul><li><a href="http://balupton.com">Benjamin Lupton</a></li></ul>

@@ -167,0 +167,0 @@ <a href="https://github.com/bevry/errlop/blob/master/CONTRIBUTING.md#files">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>

'use strict'
const isValidArray = ['undefined']
/**

@@ -20,4 +18,4 @@ * Only accept codes that are numbers, otherwise discard them

* @example
* console.log(JSON.stringify(typeof value), Boolean(value), typeof value === 'undefined', value == undefined, typeof value, typeof (typeof value), `[${typeof value}]`, ['undefined'].indexOf(typeof value))
* // "undefined" true false false undefined string [undefined] 0
* console.log(JSON.stringify(typeof value), Boolean(value), typeof value === 'undefined', value == undefined, typeof value, typeof (typeof value), `[${typeof value}]`, ['undefined'].indexOf(typeof value), typeof (typeof value))
* // "undefined" true false false undefined string [undefined] 0 string
* @param {*} value

@@ -28,3 +26,3 @@ * @returns {boolean}

function isValid (value) {
return Boolean(value) && isValidArray.indexOf(typeof value) === -1
return Boolean(value) && String(typeof value) !== 'undefined'
}

@@ -31,0 +29,0 @@

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