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

react-animationjs

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-animationjs - npm Package Compare versions

Comparing version 2.4.0 to 2.4.1

20

build/index.js

@@ -119,8 +119,15 @@ 'use strict';

}, {
key: 'render',
key: 'checkIfStyledComponent',
value: function checkIfStyledComponent(child) {
if (typeof child.type === 'function') {
return child.type.displayName === 'styled(Component)';
}
}
/**
* Render children, and their diffs until promise of anime finishes.
*/
}, {
key: 'render',
value: function render() {

@@ -137,3 +144,10 @@ var _this2 = this;

cur.filter(filterNullEls).map(function (child, i) {
return _react2.default.cloneElement(child, { key: i, ref: _this2.addTarget, innerRef: _this2.addTarget });
var props = {
key: i,
ref: _this2.addTarget
};
if (_this2.checkIfStyledComponent(child)) {
props.innerRef = _this2.addTarget;
}
return _react2.default.cloneElement(child, props);
})

@@ -140,0 +154,0 @@ );

2

package.json
{
"name": "react-animationjs",
"version": "2.4.0",
"version": "2.4.1",
"description": "An animation library that applies anime.js to it's react children",

@@ -5,0 +5,0 @@ "main": "build/index.js",

@@ -99,2 +99,8 @@ import React, { Component } from 'react';

checkIfStyledComponent(child) {
if ( typeof child.type === 'function' ) {
return child.type.displayName === 'styled(Component)';
}
}
/**

@@ -112,5 +118,12 @@ * Render children, and their diffs until promise of anime finishes.

.filter(filterNullEls)
.map((child, i) =>
React.cloneElement(child, { key: i, ref: this.addTarget, innerRef: this.addTarget })
)
.map((child, i) =>{
let props = {
key: i,
ref: this.addTarget
};
if (this.checkIfStyledComponent(child)) {
props.innerRef = this.addTarget;
}
return React.cloneElement(child, props);
})
}

@@ -117,0 +130,0 @@ </g>

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