You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Indentation: Each block should consist of 4 spaces
Object/namespace identifiers: CamelCase
Function/variable names: camelCase
Constants: UNDERSCORE_UPPER_CASE
Source code encoding: UTF-8
All source files must end with a newline
Line endings: UNIX style (\n)
Testing
All Pull Requests should, unless impossible/impractical, contain tests for the new functionality.
For a new feature this should be a basic smoke test of the feature plus tests for edge cases and for parameter changes.
For a bug fix there should be at least one test that fails without the fix and passes with it.
Design Principles
If at all possible, all operations and features should be client-side and not rely on connections to an external server. This increases the utility of CyberChef on closed networks and in virtual machines that are not connected to the Internet. Calls to external APIs may be accepted if there is no other option, but not for critical components.
Latency should be kept to a minimum to enhance the user experience. This means that operation code should sit on the client and be executed there. However, as a trade-off between latency and bandwidth, operation code with large dependencies can be loaded in discrete modules in order to reduce the size of the initial download. The downloading of additional modules must remain entirely transparent so that the user is not inconvenienced.
Large libraries should be kept in separate modules so that they are not downloaded by everyone who uses the app, just those who specifically require the relevant operations.
Use Vanilla JS if at all possible to reduce the number of libraries required and relied upon. Frameworks like jQuery, although included, should not be used unless absolutely necessary.
With these principles in mind, any changes or additions to CyberChef should keep it: