Quark
#
Modules #
quark/actionquark/appquark/bubblesquark/bufferquark/checkboxquark/cssquark/ctrquark/defsquark/dialogquark/eventquark/fontquark/fsquark/hashquark/httpquark/indexquark/jsonbquark/keyboardquark/lmdbquark/mediaquark/navquark/netquark/osquark/pathquark/pkgquark/screenquark/statequark/stepperquark/storagequark/testquark/typesquark/uriquark/utilquark/viewquark/windowquark/wsquark/_bufferquark/_commonquark/_decoratorsquark/_eventquark/_extquark/_md5quark/_sha1quark/_sha256quark/_utilquark/_watching
Quark v1.4.0 Documentation
Contents
quark/_util #
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.
stripBOM(content: string): string
stripShebang(content) #
Find end of shebang line and slice it off
stripShebang(content: string): string
assert(value,message?) #
Asserts that value is not null or undefined.
assert(value: any, message?: string)
Class: Hash #
Hash #
hash.hashCode() #
hashCode(): Int
hash.hashStr() #
hashStr(): string
hash.update(data) #
update(data: string | Uint8Array): void
hash.update1f(f1) #
update1f(f1: number): void
hash.update2f(f1,f2) #
update2f(f1: number, f2: number): void
hash.update4f(f1,f2,f3,f4) #
update4f(f1: number, f2: number, f3: number, f4: number): void
hash.equals(other) #
equals(other: Hash): boolean
hash.clear() #
clear(): void
Platform #
type Platform = "darwin" | "android" | "linux" | "win32"
default #
default.debug #
readonly debug: boolean
default.version()string #
Get quark framework version
undefined(): string
default.platform #
readonly platform: Platform
default.argv #
readonly argv: string[]
default.options #
readonly options: object
default.nextTick(cb) #
Wait for the next tick of the message loop to call the callback function
nextTick(cb: Function)
default.sleep(time) #
Asynchronous sleep, equivalent to calling setTimeout
sleep(time: Uint)
default.gc() #
Manually let the JavaScript engine perform GC actions
undefined()
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.
runScript(source: string, name?: string, sandbox?: object): any
Parameters:
source— javascript source code
default.hashCode(obj) #
Read the hash value of a data object
hashCode(obj: any): Uint
default.hash(obj) #
Read the hash value of a data object, and convert the value to a string
hash(obj: any): string
default.debugLog(TAG?) #
debugLog(TAG?: string): Function