# Naming conventions
Generally speaking, having things named in a consistent and systematic manner reduces the cognitive overhead needed to read and understand these things.
NodeScript uses the following set of rules for Standard Library. It is strongly recommended to follow those conventions so that the modules you create are consistent with the rest of the ecosystem.
Cheat sheet
Context | Convention | Example |
---|---|---|
Graph names | Words delimited with / | Util / FX / Get Rates |
Inputs | Camel case | someValue , someOtherValue |
Variables | All-caps case | MY_SECRET_USERNAME , MY_SECRET_PASSWORD |
Graph names
Use capitalized English words separated by a single space.
Use forward slash
/
to denote namespaces and sub-categories.Path components delimited with
/
automatically become folders in the Graphs List view.Use structured naming with at least two path components for naming modules.
Public modules should always include a namespace describing the domain the module belongs to (e.g.
GitHub /
for describing a GitHub-related module).Good
Vector / Add
Services / Hello
FX / Get Rates
GitHub / Repositories / Get Commits
Bad
vector_add
vector-add
Add Vectors
Hello Service
Get FX Slot
Inputs
Use camel case (opens new window) for input names (except for variables).
Prefer simpler, single-word identifiers, where possible.
Good
value
additionalProperties
a
,b
Bad
additional_properties
additional-properties
AdditionalProperties
firstArgument
,secondArgument
Variables
Use ALL_CAPS case.
Good
MY_SECRET_USERNAME
MY_SECRET_PASSWORD
Bad
mySecretUsername
my_secret_password
Note: this convention follows the environment variables (opens new window) traditionally used for the same purpose. It also helps to visually distinguish regular and variable inputs.