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/_ext
- number
- boolean
- object
- string
- Interface: NumberConstructor
- Interface: ObjectConstructor
- Interface: Object
- Interface: Dict
- Interface: TimeoutResult
- Interface: Console
- Interface: Function
- Interface: Array
- Interface: ArrayConstructor
- Interface: String
- Interface: StringConstructor
- Interface: Number
- Interface: Boolean
- Interface: DateConstructor
- Interface: Date
- Interface: ErrorDescribe
- Interface: ErrorConstructor
- Interface: Error
quark/_ext #
number #
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number
type number = Number
@global
boolean #
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean
type boolean = Boolean
@global
object #
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object
type object = Object
@global
string #
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String
type string = String
@global
Interface: NumberConstructor #
NumberConstructor #
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number
@global
Interface: ObjectConstructor #
ObjectConstructor #
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object
@global
Interface: Object #
Object #
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object
@global
Interface: Dict #
Dict #
Dictionaries
@global
Type parameters:TExtends:Record<string,T>
Interface: TimeoutResult #
TimeoutResult #
@global
Extends:Any
Interface: Console #
Console #
Console methods provided by the Qk JavaScript runtime.
@global
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
Type parameters:T
Interface: ArrayConstructor #
ArrayConstructor #
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array
@global
Interface: String #
String #
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String
@global
Interface: StringConstructor #
StringConstructor #
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
toFixedBefore(before: Uint, after?: Uint): string
Parameters:
before— Fixed number of digits before the decimal pointafter?— Fixed number of digits after the decimal point
number.toFixedVariable(after,split?,symbol?) #
Fixed the number of digits before the decimal point and used symbol separation
toFixedVariable(after: Uint, split?: Uint, symbol?: string): string
Parameters:
after— Fixed number of digits before the decimal pointsplit?— Split unit lengthsymbol?— Split characters
For example:
// Print: 1,000,000.03
console.log((1000000.03).toFixedVariable(8,3,','))
Interface: Boolean #
Boolean #
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean
@global
Interface: DateConstructor #
DateConstructor #
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date
@global
dateconstructor.currentTimezone #
current timezone
currentTimezone: Uint
@static
dateconstructor.parseDate(date_str,format?,timezone?) #
Parse a string as a time
parseDate(str: any, format?: string, timezone?: Uint, date_str: string): Date
Parameters:
str— The string to parseformat?— date format default yyyyMMddhhmmssffftimezone?— The time zone of the time to be parsed, the default is the current time zone
Returns: Retruu Date object
@static
For example:
let i = '2008-02-13 01:12:13';
let date = Date.parseDate(i); // The new time returned
dateconstructor.formatTimeSpan(ts,format?) #
Formatting timestamps
formatTimeSpan(time_span: Uint, format?: string, ts: any): string
Parameters:
time_span— The timestamp to formatformat?— The timestamp format to be formatted
Returns: The 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秒'
Interface: Date #
Date #
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date
@global
date.addMilliseconds(ms) #
Add milliseconds to the current Date time and change the time value
addMilliseconds(ms: Uint): this
Parameters:
ms— The millisecond value to append
date.toString(format?,timezone?) #
Returns a date string given a date format
toString(format?: string, timezone?: number): string
Parameters:
format?— The format of the string to be converted
Returns: Returns 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'
Interface: ErrorDescribe #
ErrorDescribe #
@global
Extends:Dict
Interface: ErrorConstructor #
ErrorConstructor #
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error
@global
errorconstructor.captureStackTrace(targetObject,constructorOpt?) #
Create .stack property on a target object
captureStackTrace(targetObject: Object, constructorOpt?: Function): void
@static
Interface: Error #
Error #
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error
@global
Extends:Dict