react-tween-state
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -5,2 +5,6 @@ Legend: | ||
### 0.0.4 (November 14th 2014) | ||
- [I] Bower support! | ||
- [F] The passed-in config object is no longer mutated. | ||
### 0.0.3 (August 2nd 2014) | ||
@@ -7,0 +11,0 @@ - [F] Stop animation after the component's unmounted. |
13
index.js
@@ -13,2 +13,13 @@ 'use strict'; | ||
function shallowClone(obj) { | ||
var ret = {}; | ||
for (var key in obj) { | ||
if (!obj.hasOwnProperty(key)) { | ||
continue; | ||
} | ||
ret[key] = obj[key]; | ||
} | ||
return ret; | ||
} | ||
// see usage below | ||
@@ -52,2 +63,4 @@ function returnState(state) { | ||
_tweenState: function(stateRefFunc, stateName, config) { | ||
config = shallowClone(config); | ||
var state = this._pendingState || this.state; | ||
@@ -54,0 +67,0 @@ var stateRef = stateRefFunc(state); |
{ | ||
"name": "react-tween-state", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "React animation.", | ||
@@ -10,3 +10,4 @@ "main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"build-bower": "./node_modules/.bin/browserify -s tweenState index.js > index-bower.js" | ||
}, | ||
@@ -32,3 +33,6 @@ "repository": { | ||
}, | ||
"homepage": "https://github.com/chenglou/react-tween-state" | ||
"homepage": "https://github.com/chenglou/react-tween-state", | ||
"devDependencies": { | ||
"browserify": "^6.3.2" | ||
} | ||
} |
@@ -7,2 +7,3 @@ # [React](http://facebook.github.io/react/) Tween State | ||
Npm: | ||
```sh | ||
@@ -12,2 +13,9 @@ npm install react-tween-state | ||
Bower: | ||
```sh | ||
bower install react-tween-state | ||
``` | ||
*For Bower*: the single source file is `index-bower.js`, not `index.js`. | ||
## API | ||
@@ -14,0 +22,0 @@ |
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
17272
263
123
0
1