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
Packages will work by returning a value that can be used when you import a package.
For example,
import "x"
Will create a local variable x containing the value returned by package "x". You can change the name of the imported package using the syntax below:
x
y = import "x"
The value returned from the package could be anything. See examples below:
Ex.:
# package strings # returns a map of functions fn join(lst, sep) {} fn trimleft(str) {} fn trimright(str) {} fn trim() {} return { "join": $join, "trimleft": $trimleft, "trimright": $trimright, "trim": $trim, }
You can use the package above with code below:
import "strings" str <= strings["trim"](" test ") echo $str # Output: test
The text was updated successfully, but these errors were encountered:
I think this depends on #202
Sorry, something went wrong.
No branches or pull requests
Packages will work by returning a value that can be used when you import a
package.
For example,
Will create a local variable
x
containing the value returned by package "x".You can change the name of the imported package using the syntax below:
The value returned from the package could be anything. See examples below:
Ex.:
You can use the package above with code below:
The text was updated successfully, but these errors were encountered: