Skip to main content
replaced http://codegolf.stackexchange.com/ with https://codegolf.stackexchange.com/
Source Link

LiveScript - 166

(Replace spaces with tabs.)

(a=->(s=require \fs)readdirSync(it)map (f)->f=it+'/'+f;r=f.replace /\s/g,i='';(while f!=r&&s.existsSync r=>r+=i++);s.statSync(f)isDirectory(s.renameSync f,r)&&a r) \.

Based on nderscore'snderscore's optimized version of c.P.u1c.P.u1's answeranswer.

LiveScript - 166

(Replace spaces with tabs.)

(a=->(s=require \fs)readdirSync(it)map (f)->f=it+'/'+f;r=f.replace /\s/g,i='';(while f!=r&&s.existsSync r=>r+=i++);s.statSync(f)isDirectory(s.renameSync f,r)&&a r) \.

Based on nderscore's optimized version of c.P.u1's answer.

LiveScript - 166

(Replace spaces with tabs.)

(a=->(s=require \fs)readdirSync(it)map (f)->f=it+'/'+f;r=f.replace /\s/g,i='';(while f!=r&&s.existsSync r=>r+=i++);s.statSync(f)isDirectory(s.renameSync f,r)&&a r) \.

Based on nderscore's optimized version of c.P.u1's answer.

added 57 characters in body
Source Link
user344
user344

LiveScript - 166

(Replace spaces with tabs.)

(a=->(s=require \fs)readdirSync(it)map (f)->f=it+'/'+f;r=f.replace /\s/g,i='';(while f!=r&&s.existsSync r=>r+=i++);s.statSync(f)isDirectory(s.renameSync f,r)&&a r) \.

Based on nderscore's optimized version of c.P.u1's answeranswer.

LiveScript - 166

(Replace spaces with tabs.)

(a=->(s=require \fs)readdirSync(it)map (f)->f=it+'/'+f;r=f.replace /\s/g,i='';(while f!=r&&s.existsSync r=>r+=i++);s.statSync(f)isDirectory(s.renameSync f,r)&&a r) \.

Based on nderscore's optimized version of c.P.u1's answer.

LiveScript - 166

(Replace spaces with tabs.)

(a=->(s=require \fs)readdirSync(it)map (f)->f=it+'/'+f;r=f.replace /\s/g,i='';(while f!=r&&s.existsSync r=>r+=i++);s.statSync(f)isDirectory(s.renameSync f,r)&&a r) \.

Based on nderscore's optimized version of c.P.u1's answer.

Source Link
user344
user344

LiveScript - 166

(Replace spaces with tabs.)

(a=->(s=require \fs)readdirSync(it)map (f)->f=it+'/'+f;r=f.replace /\s/g,i='';(while f!=r&&s.existsSync r=>r+=i++);s.statSync(f)isDirectory(s.renameSync f,r)&&a r) \.

Based on nderscore's optimized version of c.P.u1's answer.