Created config.coffee for configurations and common.coffee for commonly used functions

This commit is contained in:
Zaid Abdulla committed 2012-10-16 23:43:49 +03:00
1 parent 6f445bf3b9
commit ca70f40201
4 files changed
+18 -27

No files matched your search

+2 -4
View File
@@ -1,8 +1,6 @@
common = require './common'
BATCH_SIZE = 16
endsWith = (str, suffix) ->
str.indexOf(suffix, str.length - suffix.length) isnt -1
this.init = (task, request, response) ->
if not task.subtask?
task.subtask = {'name' : 'getParameterNames', 'parameterPath' : '', 'nextLevel' : false}
@@ -12,7 +10,7 @@ this.init = (task, request, response) ->
if ret? and ret.parameterNames? # task finished
parameterNames = []
for p in ret.parameterNames
if not endsWith(p[0], '.')
if not common.endsWith(p[0], '.')
parameterNames.push(p[0])
task.subtask = {'name' : 'getParameterValues', 'parameterNames' : parameterNames}
else