Renamed profiles to presets. Added preconditition.
This commit is contained in:
1 parent
5d95f6039b
commit
04b92945fe
7 files changed
+230
-143
No files matched your search
@@ -1,3 +1,14 @@
|
||||
exports.UNDEFINED_TYPE = '[object Undefined]'
|
||||
exports.NULL_TYPE = '[object Null]'
|
||||
exports.NUMBER_TYPE = '[object Number]'
|
||||
exports.STRING_TYPE = '[object String]'
|
||||
exports.ARRAY_TYPE = '[object Array]'
|
||||
exports.OBJECT_TYPE = '[object Object]'
|
||||
|
||||
exports.typeOf = (obj) ->
|
||||
Object.prototype.toString.call(obj)
|
||||
|
||||
|
||||
exports.endsWith = (str, suffix) ->
|
||||
str.indexOf(suffix, str.length - suffix.length) isnt -1
|
||||
|
||||
@@ -16,7 +27,15 @@ exports.getDeviceId = (deviceIdStruct) ->
|
||||
|
||||
return "#{escape(deviceIdStruct['OUI'])}-#{escape(deviceIdStruct['SerialNumber'])}"
|
||||
|
||||
|
||||
exports.extend = (obj, mixin) ->
|
||||
obj[name] = method for name, method of mixin
|
||||
obj
|
||||
|
||||
|
||||
exports.getParamValueFromPath = (obj, path) ->
|
||||
pp = path.split('.')
|
||||
ref = obj
|
||||
for p in pp
|
||||
ref = ref[p]
|
||||
return ref
|
||||
Reference in new issue
Block a user