diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/.jshintrc | 12 | ||||
-rw-r--r-- | src/data.js | 12 |
2 files changed, 12 insertions, 12 deletions
diff --git a/src/.jshintrc b/src/.jshintrc index ef8723031..71e505e1d 100644 --- a/src/.jshintrc +++ b/src/.jshintrc @@ -1,18 +1,18 @@ { + "boss": true, "curly": true, + "eqeqeq": true, + "eqnull": true, "expr": true, - "newcap": false, + "immed": true, + "noarg": true, "quotmark": "double", + "smarttabs": true, "trailing": true, "undef": true, "unused": true, - "latedef": false, - "eqeqeq": true, - "maxerr": 100, - "eqnull": true, "sub": true, - "boss": true, "browser": true, "es5": true, diff --git a/src/data.js b/src/data.js index acb3fa265..0fd35033a 100644 --- a/src/data.js +++ b/src/data.js @@ -333,12 +333,12 @@ function dataAttr( elem, key, data ) { if ( typeof data === "string" ) { try { data = data === "true" ? true : - data === "false" ? false : - data === "null" ? null : - // Only convert to a number if it doesn't change the string - +data + "" === data ? +data : - rbrace.test( data ) ? - JSON.parse( data ) : data; + data === "false" ? false : + data === "null" ? null : + // Only convert to a number if it doesn't change the string + +data + "" === data ? +data : + rbrace.test( data ) ? JSON.parse( data ) : + data; } catch( e ) {} // Make sure we set the data so it isn't changed later |