We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I will introduce two handy functions: is() and as(). The first one checks if a given value is from a given type.
is()
as()
Examples:
is("String", "Test string") // true is("Number", true) // false is_bool = is("Boolean"); is_bool(14 ~= 7) // true
As the helpers (e.g., is_bool) are trivial to create on the fly (using currying) these won't be provided.
is_bool
Similarly, there will be the as function, which is a defined way to do type casts.
as
as("String", 3.5) // "3.5" as("Matrix", true) // [1] as("String", null) // ""
If a cast fails the result is of type "Undefined" (.NET null).
null
The text was updated successfully, but these errors were encountered:
Implemented is / as functions #29
93dc8b0
Added more tests to verify #29
50ab58b
FlorianRappl
No branches or pull requests
I will introduce two handy functions:
is()
andas()
. The first one checks if a given value is from a given type.Examples:
As the helpers (e.g.,
is_bool
) are trivial to create on the fly (using currying) these won't be provided.Similarly, there will be the
as
function, which is a defined way to do type casts.Examples:
If a cast fails the result is of type "Undefined" (.NET
null
).The text was updated successfully, but these errors were encountered: