bracketscript v0.5.0
bracketscript
is a lightweight scripting language that enables you to perform various operations and automate tasks. It provides a set of functions that can be used to manipulate strings, arrays, files, and perform network requests. With bracketscript
, you can create scripts to simplify your workflow and enhance your development process.
Installation
You can install bracketscript
via npm by running the following command:
npm install bracketscript
Usage
To use bracketscript
in your project, you need to require the bracketscript
module and then you can start writing your scripts using the available functions.
Here's a simple example that demonstrates the usage of bracketscript
:
$var[text;${text}];
$var[replace;$replaceText[$get[text];${text};like marmok ❤️]];
$log[$get[replace]];
This script declares two variables, text
and replace
, and uses the $replaceText
function to replace the occurrences of ${text}
in the value of text
with the string "like marmok ❤️". The result is then logged using the $log
function.
You can also make network requests using the $request
function. Here's an example:
$request[https://discord.com/api/v9/webhooks/id/token;{
method: 'POST',
data: {
content: 'New request!',
embeds: [{
description: 'bracketscript ❤️, test request'
}]
},
logError: true
}]
This script sends a POST request to a Discord
webhook URL and includes a JSON
payload with a content
field set to "New request!" and an embeds
array with a single object containing a description
field set to "bracketscript
❤️, test request". The logError
option is set to true
to log any errors that occur during the request.
You can execute bracketscript
scripts by running the following command:
bs index.mk
or
bracketscript index.mk
where index.mk
is the name of your bracketscript
file.
Available Functions
bracketscript
offers a comprehensive collection of functions that enable you to manipulate data, manage control flow, and execute diverse operations. To obtain detailed information about each function and learn how to use them, please consult the documentation.
License
bracketscript
is released under the MIT License. See the LICENSE file for details.
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago