Skip to content

Commit

Permalink
Code linting; fixed #4
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxArt2501 committed Mar 31, 2015
1 parent e4a5711 commit e3985fe
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 25 deletions.
2 changes: 1 addition & 1 deletion bower.json
@@ -1,6 +1,6 @@
{
"name": "object.observe",
"version": "0.2.3",
"version": "0.2.4",
"homepage": "https://github.com/MaxArt2501/object-observe",
"authors": [
"Massimo Artizzu <maxart.x@gmail.com>"
Expand Down
19 changes: 8 additions & 11 deletions dist/object-observe-lite.js
@@ -1,5 +1,5 @@
/*!
* Object.observe "lite" polyfill - v0.2.3
* Object.observe "lite" polyfill - v0.2.4
* by Massimo Artizzu (MaxArt2501)
*
* https://github.com/MaxArt2501/object-observe
Expand Down Expand Up @@ -210,7 +210,6 @@ Object.observe || (function(O, A, root) {
var initial = +new Date,
last = initial;
return function(func) {
var now = +new Date;
return setTimeout(function() {
func((last = +new Date) - initial);
}, 17);
Expand Down Expand Up @@ -247,7 +246,7 @@ Object.observe || (function(O, A, root) {
*/
createObjectData = function(object, data) {
var props = getProps(object),
values = [], descs, i = 0,
values = [], i = 0,
data = {
handlers: createMap(),
properties: props,
Expand Down Expand Up @@ -276,10 +275,8 @@ Object.observe || (function(O, A, root) {

var props, proplen, keys,
values = data.values,
descs = data.descriptors,
i = 0, idx,
key, value, ovalue,
proto, descr;
key, value, ovalue;

props = data.properties.slice();
proplen = props.length;
Expand Down Expand Up @@ -434,7 +431,7 @@ Object.observe || (function(O, A, root) {
* @param {String[]} acceptList
*/
setHandler = function(object, data, handler, acceptList) {
var hdata = handlers.get(handler), odata;
var hdata = handlers.get(handler);
if (!hdata)
handlers.set(handler, hdata = {
observed: createMap(),
Expand Down Expand Up @@ -490,10 +487,10 @@ Object.observe || (function(O, A, root) {
if (O.isFrozen && O.isFrozen(handler))
throw new TypeError("Object.observe cannot deliver to a frozen function object");

if (arguments.length > 2) {
if (!acceptList || typeof acceptList !== "object")
throw new TypeError("Object.observe cannot use non-object accept list");
} else acceptList = defaultAcceptList;
if (typeof acceptList === "undefined")
acceptList = defaultAcceptList;
else if (!acceptList || typeof acceptList !== "object")
throw new TypeError("Third argument to Object.observe must be an array of strings.");

doObserve(object, handler, acceptList);

Expand Down
2 changes: 1 addition & 1 deletion dist/object-observe-lite.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e3985fe

Please sign in to comment.