Author: Zeta Ret
Zeta Ret ProtoSS
Requires: protoss.all.js
Version: 1.7.0
Date: 2017 - Today
required*
Interfaces: IProtoSS
autoImplement Boolean
default true, resolveHeaders automatically implements interfaces using static headerImplement
autoSuper Boolean
default true, resolveHeaders automatically adds setSuper using static headerSuper
autoSuperList Boolean
default true, resolveHeaders automatically adds superList using static headerSuperList
autoSuperList2 Boolean
default true, resolveHeaders automatically adds superList2 using static headerSuperList2
errorData Object
default null, resolveHeaders outputs error data upon throwing an error
debug Function
default null, resolveHeaders calls debug("error", "resolveHeaders", o, o.errorData), where o=this
ProtoSS() : void
return void
toInterface(Object i, Object pack) : Object
- i* - Object, key-value map of interface definitions
- pack - Object, pack obj to internal the interface
return Object, interface map
stringPattern(String pat, String str, Number pos) : Array
- pat* - String, pattern to search in str string
- str* - String, string to search in for patterns
- pos - Number, initial position to start the search
return Array, 0 - number of patterns found; 1 - str without found patterns
getSuperCls(String sname, Object toppack, String path) : Function
- sname* - String, super name split in pipes | to allow multiple super check
- toppack* - Object, package object to search in
- path - String, path used to append to found patterns of parent search /
return Function, first found reading left to right
resolveCls(Object s, Object toppack, String path) : ProtoSS
- s* - Object, map of string classes to convert using getSuperCls
- toppack - Object, pass var to getSuperCls
- path - String, pass var to getSuperCls
return ProtoSS, current scope object
resolveHeaders(Object toppack, String path) : ProtoSS
- toppack - Object, pass var to getSuperCls
- path - String, pass var to getSuperCls
return ProtoSS, current scope object, resolves all headers from static properties
headerImplement Array
default [], define implement inheritance using an [ProtoSS Class|classsupername string, super in strings/class] template
headerSuper Array
default [], define setSuper inheritance using an [ProtoSS Class|classsupername string, super in strings/class] template
headerSuperList Array
default [], define superList inheritance using an [ProtoSS Clas|classsupername strings, Array of supers in strings/class] template
headerSuperList2 Array
default [], define superList2 inheritance using an [ProtoSS Class|classsupername string, Array of supers in strings/class] template
stringmap Object
default {}, add dynamic string key-value pairs
eventProps(Object event, Array props) : Object
- event* - Object, function object
- props* - Array, string properties
return Object, event, props attached as uppercase keys including _CHANGE property
staticProps(Object stat, Object props) : Object
- stat* - Object, function object
- props* - Object, key-value pairs attached to stat object
return Object, stat, props attached as is
getDefinitionByName(String sname, Object toppack) : Function
- sname* - String, class super name
- toppack - Object, default is window
return Function