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

utility

Package Overview
Dependencies
Maintainers
3
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

utility - npm Package Compare versions

Comparing version 1.16.1 to 1.16.2

9

History.md
1.16.2 / 2019-11-19
==================
**fixes**
* [[`bb8f5d4`](http://github.com/node-modules/utility/commit/bb8f5d4becb61df6e8ce1788a172f8ae4e9937b4)] - fix: getParamNames throw when input is not function (#51) (Daniels.Sun <<better.sunjian@gmail.com>>)
**others**
* [[`7016803`](http://github.com/node-modules/utility/commit/7016803364f22c70c42da59870eee64dd1d99020)] - build: add node 12 in ci (dead-horse <<dead_horse@qq.com>>)
1.16.1 / 2019-03-25

@@ -3,0 +12,0 @@ ==================

'use strict';
var assert = require('assert');
/**

@@ -19,2 +21,5 @@ * A empty function.

exports.getParamNames = function getParamNames(func, cache) {
var type = typeof func;
assert(type === 'function', `The "func" must be a function. Received type "${type}"`);
cache = cache !== false;

@@ -21,0 +26,0 @@ if (cache && func.__cache_names) {

2

package.json
{
"name": "utility",
"version": "1.16.1",
"version": "1.16.2",
"description": "A collection of useful utilities.",

@@ -5,0 +5,0 @@ "main": "lib/utility.js",

@@ -113,2 +113,8 @@ # utility

utils.noop = function () {}
// throw out an assertion error if you were given an invalid "func"
try {
utils.getParamNames(null); // Only function is allowed
} catch (err) {
console.error(err); // Assertion Error
}

@@ -115,0 +121,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