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 map’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 structure for years/months/days
Return a tree of changes
Remove all values from the map
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 text values of the deep tree
The in-order leaf values of the tree
Delete the value for the key from map
Create a document object with the text and data
The map’s [key, value] pairs
Protocol.explore
Treat a website with JSON keys as a tree
Origami.extension
Helpers for working with file extensions
Fetch a resource from a URL with support for extensions
Protocol.files
File system folders and files
Filter a tree by a condition
The first value in the map
Apply fn to each (value, key)
Create a map from an object
A tree whose keys can include glob wildcard patterns
A new map with values grouped by the function
True if key exists in map
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
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 a map
True if object can be coerced to a tree
True if object is a read-only map
True if object is traversable
Render the tree in JSON format
Add .keys.json files to a tree
Parse text as JSON
The keys of the map
Log message to the console and return a
Create a new map by transforming keys and/or values
Create a new map by transforming extensions
Map the keys and/or values in a tree 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
The outline structure of the markdown document
Return a new tree merging the given maps
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 map’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
An array of n copies of the object
Reverse the order of the map’s keys
The root node of the given tree
Transforms a JSON Feed tree to RSS XML
A merged view of the tree and its ancestors
Start a web server for the tree
Run the text as a shell command, return the output
Shuffle the keys of the map
Generate a sitemap for the tree
The map’s size (number of keys)
Origami.slash
Helpers for working with trailing slashes
A version of the text suitable for use in URLs
A new map 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
Awaits all asynchronous values in the tree
The first n values in the map
Tagged template literal for rendering trees
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 map’s values
Return the version number of the Origami language
Reevaluate fn when tree changes
Use the given keys for the map
Render the object in YAML format
Parse text as YAML