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/_ext #
number #
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number
@typenumber=Number@global
boolean #
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean
@typeboolean=Boolean@global
object #
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object
@typeobject=Object@global
string #
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String
@typestring=String@global
Int #
32-bit integer, Range: -2147483648 to 2147483647
@typeInt=number@global
Uint #
32-bit signed integer, Range: 0 to 4294967295
@typeUint=number@global
Uint16 #
16-bit signed integer, Range: 0 to 65535
@typeUint16=number@global
Int16 #
16-bit integer, Range: -32768 to 32767
@typeInt16=number@global
Uint8 #
8-bit signed integer, Range: 0 to 255
@typeUint8=number@global
Int8 #
8-bit integer, Range: -128 to 127
@typeInt8=number@global
Float #
32-bit floating point, Range: -3.402823466E+38 to 3.402823466E+38
@typeFloat=number@global
Interface: Object #
Object #
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object
@global
Interface: Dict #
Dict #
Dictionaries
@global@template<T>
Interface: Function #
Function #
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function
@global
Interface: Array #
Array #
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array
@global@template<T>
Interface: String #
String #
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String
@global
Interface: Number #
Number #
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number
@global
number.toFixedBefore(before,after?) #
Convert to a string with a fixed number of digits before and after the decimal point
@parambefore:UintFixed number of digits before the decimal point@paramafter?:UintFixed number of digits after the decimal point@returnstring
number.toFixedVariable(after,split?,symbol?) #
Fixed the number of digits before the decimal point and used symbol separation
@paramafter:UintFixed number of digits before the decimal point@paramsplit?:UintSplit unit length@paramsymbol?:stringSplit characters
For example:
// Print: 1,000,000.03
console.log((1000000.03).toFixedVariable(8,3,','))
@returnstring
Interface: Boolean #
Boolean #
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean
@global
Interface: Date #
Date #
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date
@global
date.currentTimezone #
current timezone
currentTimezone:Uint@static
date.parseDate(date_str,format?,timezone?) #
Parse a string as a time
@paramstr: The string to parse@paramformat?:stringdate format default yyyyMMddhhmmssfff@paramtimezone?:UintThe time zone of the time to be parsed, the default is the current time zone@returnDateRetruu Date object@static
For example:
let i = '2008-02-13 01:12:13';
let date = Date.parseDate(i); // The new time returned
@paramdate_str:string
date.formatTimeSpan(ts,format?) #
Formatting timestamps
@paramtime_span:UintThe timestamp to format@paramformat?:stringThe timestamp format to be formatted@returnstringThe returned formatted timestamp@static
For example:
// Format timestamp (unit: milliseconds)
let time_span = 10002100;
let format = 'dd hh:mm:ss';
let str = Date.formatTimeSpan(time_span, format); // str = '0 2:46:42'
let format = 'dd天hh时mm分ss秒';
let str = Date.formatTimeSpan(time_span, format); // str = '0天2时46分42秒'
format = 'hh时mm分ss秒';
str = Date.formatTimeSpan(time_span, format); // str = '2时46分42秒'
format = 'mm分ss秒';
str = Date.formatTimeSpan(time_span, format); // str = '166分42秒'
@paramts:
date.add(ms) #
Add milliseconds to the current Date time and change the time value
date.toString(format?,timezone?) #
Returns a date string given a date format
@paramformat?:stringThe format of the string to be converted@returnstringReturns the formatted time string@exmples
let date = new Date();
let format = 'yyyy-MM-dd hh:mm:ss.fff';
let dateStr = date.toString(format); // dateStr的值为 '2008-12-10 10:32:23'
format = 'yyyy-MM-dd hh:mm:ss';
dateStr = date.toString(format); // dateStr的值为 '2008-12-10 10:32:23'
format = 'yyyy/MM/dd';
dateStr = date.toString(format); // dateStr的值为 '2008/12/10'
format = 'yyyy-MM-dd hh';
dateStr = date.toString(format); // dateStr的值为 '2008-12-10 10'
@paramtimezone?:number
Interface: ErrorDescribe #
ErrorDescribe #
@global
ErrnoCode #
The [errno,message,description] of Array
@typeErrnoCode=[number,string,string?]@global
ErrorNewArg #
@typeErrorNewArg=ErrnoCode|Error|string|ErrorDescribe@global
Interface: Error #
Error #
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error
@global
error.captureStackTrace(targetObject,constructorOpt?) #
Create .stack property on a target object