Skip to content
New issue

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

Fix the wrapped value not showing #688

Merged
merged 1 commit into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/docs/standard-lib/json.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ JSON.parse('[1, 2, 3]'); // [1, 2, 3]
JSON.parse('null'); // nil
```

### JSON.stringify(value, String: indent -> Optional) -> Result<String>
### JSON.stringify(value, String: indent -> Optional) -> Result\<String>

Stringify converts a Dictu value into a valid JSON string.
Returns a Result type and unwraps to string.
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/standard-lib/path.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Path.isAbsolute("/usr"); // true
Path.isAbsolute("usr"); // false
```

### Path.realpath(String) -> Result<String>
### Path.realpath(String) -> Result\<String>

Returns A result type and unwraps the canonicalized absolute pathname as a string.

Expand Down
4 changes: 2 additions & 2 deletions docs/docs/standard-lib/process.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ To make use of the Process module an import is required.
import Process;
```

### Process.exec(List) -> Result<Nil>
### Process.exec(List) -> Result\<Nil>

Executing an external process can be done via `.exec`. Unlike `.run()` exec does not wait for the process
to finish executing, so it is only useful for circumstances where you wish to "fire and forget".
Expand All @@ -36,7 +36,7 @@ It will return a Result that unwraps to `nil` on success.
Process.exec(["ls", "-la"]);
```

### Process.run(List, Boolean: captureOutput -> Optional) -> Result<Nil>
### Process.run(List, Boolean: captureOutput -> Optional) -> Result\<Nil>

Similar to `.exec()` except this **will** wait for the external process to finish executing.

Expand Down
4 changes: 2 additions & 2 deletions docs/docs/standard-lib/sqlite.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Note: Unlike SQLite and most other libraries, foreign keys **are** enabled by de
import Sqlite;
```

### Sqlite.connect(String: database, timeout: number -> optional) -> Result<SQLite>
### Sqlite.connect(String: database, timeout: number -> optional) -> Result\<SQLite>

This opens a connection to a SQLite database. Returns a Result type and on success wraps an abstract SQLite type.

Expand All @@ -39,7 +39,7 @@ Sqlite.connect(":memory:").unwrap();
Sqlite.connect("my/database/file.db").unwrap();
```

### sqlite.execute(String: query, List: arguments -> Optional) -> Result<Nil>
### sqlite.execute(String: query, List: arguments -> Optional) -> Result\<Nil>

The `execute` method is ran on the abstract that is returned from `.connect` rather than the `Sqlite` module, hence the
lower case `sqlite`. The `execute` method executes an SQL query and can return one of 3 values.
Expand Down
18 changes: 9 additions & 9 deletions docs/docs/standard-lib/system.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ import System;
| System.W_OK | Test for write permission. |
| System.R_OK | Test for read permission. |

### System.mkdir(String, Number: mode -> Optional) -> Result<Nil>
### System.mkdir(String, Number: mode -> Optional) -> Result\<Nil>

Make directory.
Returns a Result type and on success will unwrap nil.
Expand All @@ -69,7 +69,7 @@ const
System.mkdir(dir, S_IRWXU|S_IRGRP|S_IXGRP|S_IXOTH|S_IROTH);
```

### System.mkdirAll(String, Number: mode -> Optional) -> Result<Nil>
### System.mkdirAll(String, Number: mode -> Optional) -> Result\<Nil>

Make all directories for a given path.
Returns a Result type and on success will unwrap nil.
Expand All @@ -78,7 +78,7 @@ It can take an optional number argument that specifies the mode. If a mode is no

The actual permissions is modified by the process umask, which typically is S_IWGRP\|S_IWOTH (octal 022).

### System.access(String, Number) -> Result<Nil>
### System.access(String, Number) -> Result\<Nil>

Check user's permissions for a file.
Returns a Result type and on success will unwrap nil.
Expand All @@ -91,7 +91,7 @@ var F_OK = System.F_OK;
System.access("/", F_OK);
```

### System.rmdir(String) -> Result<Nil>
### System.rmdir(String) -> Result\<Nil>

Remove directory.

Expand All @@ -101,7 +101,7 @@ Returns a Result type and on success will unwrap nil.
System.rmdir(dir);
```

### System.remove(String) -> Result<Nil>
### System.remove(String) -> Result\<Nil>

Delete a file from filesystem.

Expand Down Expand Up @@ -171,7 +171,7 @@ Returns the effective group ID of the calling process as a number.
System.getegid();
```

### System.getCWD() -> Result<String>
### System.getCWD() -> Result\<String>

Get the current working directory of the Dictu process.

Expand All @@ -181,7 +181,7 @@ Returns a Result type and on success will unwrap a string.
System.getCWD().unwrap(); // '/Some/Path/To/A/Directory'
```

### System.setCWD(String) -> Result<Nil>
### System.setCWD(String) -> Result\<Nil>

Set current working directory of the Dictu process.

Expand Down Expand Up @@ -266,7 +266,7 @@ Note: This is not available on Windows systems.
System.uname();
```

### System.mkdirTemp(String: directory_template -> Optional) -> Result<String>
### System.mkdirTemp(String: directory_template -> Optional) -> Result\<String>

Makes a temporary directory. If an empty string is given, the temporary directory's name will be a random string created in the current working directory. If a string is passed in, the temporary directory will be created with that name in the current working directory.

Expand All @@ -281,7 +281,7 @@ System.mkdirTemp().unwrap(); // "VOO16s"
System.mkdirTemp("test_XXXXXX").unwrap(); // "test_0bL2qS"
```

### System.copyFile(String: src, String: dst) -> Result<Nil>
### System.copyFile(String: src, String: dst) -> Result\<Nil>

Copies the contents from the source file to the destination file.

Expand Down
6 changes: 3 additions & 3 deletions docs/docs/standard-lib/uuid.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ To make use of the UUID module an import is required.
import UUID;
```

### UUID.generate() -> Result<String>
### UUID.generate() -> Result\<String>

Returns a Result value with a string representation of the UUID on success or an Error on failure. This function attempts to use `/dev/urandom` if available but if it's not, it uses alterntive means of generating randomness.

Expand All @@ -36,7 +36,7 @@ print(uuid);
// a9c313d8-5bdb-4537-af9a-0b08be1387fb
```

### UUID.generateRandom() -> Result<String>
### UUID.generateRandom() -> Result\<String>

Returns a Result value with a string representation of the UUID on success or an Error on failure. This function forces the use of the all-random UUID format.

Expand All @@ -48,7 +48,7 @@ print(uuid);
// 95356011-f08c-46d9-9335-d5b988682211
```

### UUID.generateTime() -> Result<String>
### UUID.generateTime() -> Result\<String>

Returns a Result value with a string representation of the UUID on success or an Error on failure. This function forces the use of the alternative algorithm which uses the current time and local MAC address (if available).

Expand Down