Quark
#
Modules #
quark/action
quark/app
quark/bubbles
quark/buffer
quark/checkbox
quark/css
quark/ctr
quark/dialog
quark/event
quark/font
quark/fs
quark/http
quark/index
quark/keyboard
quark/media
quark/nav
quark/os
quark/path
quark/pkg
quark/screen
quark/stepper
quark/storage
quark/test
quark/types
quark/util
quark/view
quark/window
quark/_common
quark/_event
quark/_ext
quark/_util
Quark v1.2.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.txthttp://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?) #
@param
value
:any
@param
message?
:string
Class: Hash5381 #
Hash5381 #
hash5381.hashCode() #
@return
Int
hash5381.update(data) #
@param
data
:string
|Uint8Array
@return
void
hash5381.digest() #
@return
string
hash5381.clear() #
@return
void
Platform #
@type
Platform
="darwin"
|"android"
|"linux"
|"win32"
default #
default.debug #
@get
debug
:boolean
default.version()string #
Get quark
framework version
@return
string
default.platform #
@get
platform
:Platform
default.argv #
@get
argv
:string
[]
default.options #
@get
options
:object
default.nextTick(cb) #
Wait for the next tick of the message loop to call the callback function
@param
cb
:Function
default.sleep(time) #
Asynchronous sleep, equivalent to calling setTimeout
@param
time
: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.
@param
source
:string
javascript source code@param
name?
:string
@param
sandbox?
:object
@return
any
default.hashCode(obj) #
Read the hash value of a data object
@param
obj
:any
@return
Int
default.hash(obj) #
Read the hash value of a data object, and convert the value to a string
@param
obj
:any
@return
string