Contains auto-opened utilities related to the dfx programming model.
| Function or value |
Description
|
Full Usage:
!r
Parameters:
'T ref
Returns: 'T
Type parameters: 'T |
|
Full Usage:
r := v
Parameters:
'T ref
v : 'T
Type parameters: 'T |
|
Full Usage:
bytesReadable i
Parameters:
int64
Returns: string
|
Return a human-readable string representation of the given value in Bytes.
|
Full Usage:
fileToBase64String fileName
Parameters:
string
Returns: string
|
Returns the file contents as Base64 encoded string
|
|
Indents all lines of the given string by the given number of spaces.
|
Full Usage:
loadBinary fileName
Parameters:
string
Returns: 'T
Type parameters: 'T |
Loads the given value from the given local file using binary serialization.
|
Full Usage:
log10Val
Returns: float
|
Value of log(10).
|
Full Usage:
logSqrt2Pi
Returns: float
|
Value of log(sqrt(2*Math.PI)).
|
Full Usage:
memoize fn
Parameters:
'a -> 'b
Returns: 'a -> 'b
Type parameters: 'a, 'b (requires equality) |
Returns a function that memoizes the given function using a lookaside table.
|
Full Usage:
pngToHtml fileName widthPixels
Parameters:
string
widthPixels : int
Returns: string
|
Given a PNG image file name, returns an HTML image element with the image content included as a Base64 encoded string
|
Full Usage:
saveBinary object fileName
Parameters:
'T
fileName : string
Type parameters: 'T |
Saves the given value to the given local file using binary serialization.
|
Full Usage:
stringPad s width
Parameters:
string
width : int
Returns: string
|
Left-pads a string up to the given length.
|
Full Usage:
stringPadAs s1 s2
Parameters:
string
s2 : string
Returns: string
|
Left-pads a string to match the length of another string.
|
Full Usage:
thousandsFloat x
Parameters:
float
Returns: string
|
Formats an integer as a string with comma as thousands separator
|
Full Usage:
thousandsInt x
Parameters:
int
Returns: string
|
Formats an integer as a string with comma as thousands separator
|
© Copyright 2021, DiffSharp and dfx Contributors.