The Origami language includes a number of functions that you can call from Origami site definitions, Origami templates, and command-line interface commands.
Namespaces #
- Dev — Develop and debug Origami projects
- Origami — Create sites and other digital artifacts
- Protocol — Retrieve resources via URL protocols
- Tree — Work with trees of files and data
Functions and objects by name #
Add next/previous fields to the tree’s values
Apply key/values from source to target
Identify broken internal links and references
Removes an extension from the key if present
Break into the JavaScript debugger, then return a
Caches values from the tree
Return a tree of changes
Remove all values from the tree
Concatenate text and/or trees of text
Origami.config
The current project’s configuration
Return a deep tree with a single constant value
Copy the source tree to the target
A tree of a site’s discoverable resources
Render the tree as a CSV file
Add debug features to the tree
Map the keys and values of a deep tree
Return a deeply-merged tree
Reverse order of keys at all levels of the tree
The first n values from the deep tree
The in-order leaf values of the tree
Only the defined values of the tree
Create a document object with the text and data
The tree’s [key, value] pairs
Protocol.explore
Treat a website with JSON keys as a tree
Origami.extension
Helpers for working with file extensions
Protocol.files
File system folders and files
Filter the source tree
The first value in the tree
Apply fn to each (value, key)
Create a tree from an object
A tree defined by a value function
A tree whose keys can include glob wildcard patterns
A new tree with values grouped by the function
True if key exists in tree
Get help on builtin namespaces and commands
Protocol.http
Web resources via HTTP
Protocol.https
Web resources via HTTPS
Protocol.httpstree
Website tree via HTTPS
Protocol.httptree
Website tree via HTTP
Origami.image
Collection of functions for working with images
Tree.indent
Tagged template literal for normalizing indentation
A default index.html page for the tree
Inline Origami expressions found in the text
The tree’s interior nodes
True if object is an async mutable tree
True if object is an async tree
True if object is traversable
True if object can be coerced to a tree
Render the object in JSON format
Add .keys.json files to a tree
Parse text as JSON
The keys of the tree
The tree’s size (number of keys)
Log message to the console and return a
Create a new tree by mapping keys and/or values
Map values and reduce them
Return the source tree with only the keys in the mask
Matches simple patterns or regular expressions
Render the markdown as HTML
Return a new tree merging the given trees
Origami.naturalOrder
A comparison function for natural sort order
Protocol.node
Installed Node.js modules
Run the function only once, return the same result
Evaluate the text as an Origami expression
Protocol.package
Packages installed in node_modules
Group the tree’s values into fixed-size sets
The parent of the given tree node
Slash-separated paths for the tree’s values
Render the tree as a plain JavaScript object
POST the given data to the URL
Origami.project
The root folder for the current Origami project
Redirect to the given URL
A tree whose keys are regular expression strings
Remove the value for the key from tree
An array of n copies of the object
Reverse the order of the tree’s keys
The root node of the given tree
Transforms a JSON Feed tree to RSS XML
Start a web server for the tree
Applies the source tree to the target
Run the text as a shell command, return the output
Shuffle the keys of the tree
Generate a sitemap for the tree
Origami.slash
Helpers for working with trailing slashes
A version of the text suitable for use in URLs
A new tree with its keys sorted
Define common static files for the tree
Dev.stdin
Returns the content of the standard input stream
Coerce a buffer or document to a string
Render a tree visually in SVG format
The first n values in the tree
Coerce a tree or packed function definition to a function
Return the value at the path of keys
Return the value at the path of keys or throw
Traverse a slash-separated path
Unpack the buffer into a usable form
The tree’s values
Return the version number of the Origami language
Reevaluate fn when tree changes
Render the object in YAML format
Parse text as YAML