Socket
Socket
Sign inDemoInstall

rc-util

Package Overview
Dependencies
Maintainers
1
Versions
211
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-util - npm Package Compare versions

Comparing version 1.0.0 to 2.0.0

1

index.js

@@ -9,3 +9,2 @@ module.exports = {

createChainedFunction: require('./lib/createChainedFunction'),
cloneWithProps: require('./lib/cloneWithProps'),
Dom: {

@@ -12,0 +11,0 @@ addEventListener: require('./lib/Dom/addEventListener'),

20

lib/createChainedFunction.js

@@ -7,20 +7,16 @@ /**

*
* @param {function} one
* @param {function} two
* @returns {function|null}
*/
function createChainedFunction(one, two) {
var hasOne = typeof one === 'function';
var hasTwo = typeof two === 'function';
function createChainedFunction() {
var args = arguments;
if (!hasOne && !hasTwo) { return null; }
if (!hasOne) { return two; }
if (!hasTwo) { return one; }
return function chainedFunction() {
one.apply(this, arguments);
two.apply(this, arguments);
for (var i = 0; i < args.length; i++) {
if (args[i]) {
args[i].apply(this, arguments);
}
}
};
}
module.exports = createChainedFunction;
module.exports = createChainedFunction;
{
"name": "rc-util",
"version": "1.0.0",
"version": "2.0.0",
"description": "Common Utils For React Component",

@@ -5,0 +5,0 @@ "keywords": [

@@ -59,6 +59,2 @@ # rc-util

### cloneWithProps:function
http://facebook.github.io/react/docs/clone-with-props.html
### Dom.addEventListener:function

@@ -65,0 +61,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