Permalink
Browse files

JSlint enabled in ready's config

  • Loading branch information...
1 parent 4dd1c86 commit 033fbcfb75c12f979744e885ea762289350fb195 @cmilfont cmilfont committed Nov 14, 2011
Showing with 14 additions and 12 deletions.
  1. +5 −4 docs/index.html
  2. +6 −5 lib/jsonform.js
  3. +2 −2 minified/jsonform.min.js
  4. +1 −1 ready.conf.js
View
@@ -295,17 +295,18 @@
<span class="keyword">var</span> <span class="variable">verifyArray</span> = <span class="keyword">function</span>(<span class="variable">name</span>, <span class="variable">value</span>) {
<span class="keyword">var</span> <span class="variable">position</span>;
- <span class="keyword">if</span>( <span class="variable">position</span> = <span class="variable">name</span>.<span class="variable">match</span>(<span class="regexp">/\[(\d+)\]/</span>)) {
+ <span class="keyword">if</span>( <span class="variable">name</span>.<span class="variable">match</span>(<span class="regexp">/\[(\d+)\]/</span>) ) {
+ <span class="variable">position</span> = <span class="variable">name</span>.<span class="variable">match</span>(<span class="regexp">/\[(\d+)\]/</span>);
<span class="keyword">var</span> <span class="variable">arr</span> = [];
<span class="variable">arr</span>[ <span class="variable">position</span>[<span class="number integer">1</span>] ] = <span class="variable">value</span>;
<span class="keyword">return</span> <span class="variable">arr</span>;
} <span class="keyword">else</span> {
<span class="keyword">return</span> <span class="variable">value</span>;
}
- }
+ };
- <span class="keyword">return</span> (<span class="keyword">function</span> <span class="variable">generateJSON</span>(<span class="variable">json</span>, <span class="variable">hierarchy</span>, <span class="variable">value</span>) {
- <span class="keyword">var</span> <span class="variable">hierarchy</span> = <span class="variable">hierarchy</span>.<span class="variable">split</span>(&<span class="variable">quot</span>;.&<span class="variable">quot</span>;);
+ <span class="keyword">return</span> (<span class="keyword">function</span> <span class="variable">generateJSON</span>(<span class="variable">json</span>, <span class="variable">hierarchyIn</span>, <span class="variable">value</span>) {
+ <span class="keyword">var</span> <span class="variable">hierarchy</span> = <span class="variable">hierarchyIn</span>.<span class="variable">split</span>(&<span class="variable">quot</span>;.&<span class="variable">quot</span>;);
<span class="keyword">var</span> <span class="variable">first</span> = <span class="variable">hierarchy</span>.<span class="variable">shift</span>();
<span class="keyword">return</span> <span class="keyword">function</span>(<span class="variable">json</span>, <span class="variable">name</span>){
<span class="variable">json</span>[ <span class="variable">prefix</span> + <span class="variable">name</span>.<span class="variable">replace</span>(<span class="regexp">/\[(\d+)\]/</span>, &<span class="variable">quot</span>;&<span class="variable">quot</span>;) + <span class="variable">suffix</span> ] = (<span class="variable">hierarchy</span>.<span class="variable">length</span> &<span class="variable">gt</span>; <span class="number integer">0</span> ) ?
View
@@ -15,7 +15,7 @@
/**
* @version stable
*/
- version: '1.2.0',
+ version: '1.2.1',
/**
* Example:
@@ -141,17 +141,18 @@
var verifyArray = function(name, value) {
var position;
- if( position = name.match(/\[(\d+)\]/)) {
+ if( name.match(/\[(\d+)\]/) ) {
+ position = name.match(/\[(\d+)\]/);
var arr = [];
arr[ position[1] ] = value;
return arr;
} else {
return value;
}
- }
+ };
- return (function generateJSON(json, hierarchy, value) {
- var hierarchy = hierarchy.split(".");
+ return (function generateJSON(json, hierarchyIn, value) {
+ var hierarchy = hierarchyIn.split(".");
var first = hierarchy.shift();
return function(json, name){
json[ prefix + name.replace(/\[(\d+)\]/, "") + suffix ] = (hierarchy.length > 0 ) ?
View
Oops, something went wrong.
View
@@ -2,6 +2,6 @@
"src" : "./lib"
, "dest" : "./minified"
, "runGCompiler" : true
- , runJslint : false
+ , runJslint : true
, aggregateTo : "jsonform.min.js"
}

0 comments on commit 033fbcf

Please sign in to comment.