Quark
#
Modules #
quark/actionquark/appquark/bubblesquark/bufferquark/checkboxquark/cssquark/ctrquark/dialogquark/eventquark/fontquark/fsquark/hashquark/httpquark/indexquark/jsonbquark/keyboardquark/mediaquark/navquark/netquark/osquark/pathquark/pkgquark/screenquark/stepperquark/storagequark/testquark/typesquark/utilquark/viewquark/windowquark/wsquark/_bufferquark/_commonquark/_eventquark/_extquark/_md5quark/_sha1quark/_sha256quark/_utilquark/_watching
Quark v1.3.0 Documentation
Table of Contents
quark/_util #
normalizePath(path,retain_up?) #
format part
formatPath(...args) #
file:///home/louis/test.txt
file:///d:/home/louis/test.txt
http://google.com/test.txt
return format path
isAbsolute(path) #
Is it an absolute path?
isLocal(path) #
Is it a local path?
isLocalZip(path) #
isHttp(path) #
stripBOM(content) #
Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
because the buffer-to-string conversion in fs.readFileSync()
translates it to FEFF, the UTF-16 BOM.
stripShebang(content) #
Find end of shebang line and slice it off
assert(value,message?) #
@paramvalue:any@parammessage?:string
Class: Hash5381 #
Hash5381 #
hash5381.hashCode() #
@returnInt
hash5381.update(data) #
@paramdata:string|Uint8Array@returnvoid
hash5381.digest() #
@returnstring
hash5381.clear() #
@returnvoid
Platform #
@typePlatform="darwin"|"android"|"linux"|"win32"
default #
default.debug #
@getdebug:boolean
default.version()string #
Get quark framework version
@returnstring
default.platform #
@getplatform:Platform
default.argv #
@getargv:string[]
default.options #
@getoptions:object
default.nextTick(cb) #
Wait for the next tick of the message loop to call the callback function
@paramcb:Function
default.sleep(time) #
Asynchronous sleep, equivalent to calling setTimeout
@paramtime:Uint
default.gc() #
Manually let the JavaScript engine perform GC actions
default.runScript(source,name?,sandbox?) #
Compile and run a piece of javascript code and return the running result.
You can specify a name and a running context object.
The name is very useful when debugging code or program exceptions. It is usually a file name.
If you do not pass this sandbox sandbox context, the default is to use the global object.
@paramsource:stringjavascript source code@paramname?:string@paramsandbox?:object@returnany
default.hashCode(obj) #
Read the hash value of a data object
@paramobj:any@returnInt
default.hash(obj) #
Read the hash value of a data object, and convert the value to a string
@paramobj:any@returnstring