-
Notifications
You must be signed in to change notification settings - Fork 1.7k
ex_definitions
Puter's configuration object. This includes values from config.json
or their
defaults, and computed values like origin
and api_origin
.
const config = use('core.config');
extension.get('/get-origin', { noauth: true }, (req, res) => {
res.send(config.origin);
})
These utilities come from src/backend/src/util
in Puter's repo.
Each file in this directory has its exports auto-loaded into this
namespace. For example, src/backend/src/util/langutil.js
is available
via use('core.util.langutil')
or use.core.util.langutil
.
Common utility functions used throughout Puter's backend. Use with caution as some of these functions may be deprecated.
note: the following documentation is incomplete
- Returns
"array"
ifthing
is an array. - Returns
"null"
ifthing
isnull
. - Returns
typeof thing
for any other case.
Simply a "null or undefined" check.
Checks if something has the specified capabilities. At the time of
writing the only one supported is iterate
, which will check if
value[Symbol.iterator]
is truthy
You are reading documentation for the open-source repository of Puter.
Getting started on localhost is as simple as git clone
npm install
npm start
.