Fireball is the game engine for the future.
Defined in lib/utils.js:3
fmtProcess
Format the process string to arraygetNamespace
Get the namespace string from a target objectescapeHTML
Escapes HTML characters in html.safetrim
Trim in safe modeunindent
Normalizes the initial indentation of the given content so that the first line is unindented, and all other lines are unindented to the same degree as the first line. So if the first line has four spaces at the beginning, then all lines will be unindented four spaces. Ported from SelleckfilterFileName
Normalizes a file path to a writable filename:
var path = 'lib/file.js'; returns 'lib_file.js';
getFoundAt
Parses file and line number from an item object and build's an HREFgetLayouts
LikegetPages()
, but returns only the files under thelayout/
subdirectory of the specified dir.getPages
Loads pages (files with a.handlebars
extension) in the specified directory and returns an object containing a mapping of page names (the part of the filename) preceding the.handlebars
extension) to page content.getPartials
LikegetPages()
, but returns only the files under thepartial/
subdirectory of the specified dir.prepare
Mix/merge/munge data into the template.fixType
Takes a type string and converts it to a "First letter upper cased" type. e.g.(string -> String, object -> Object)
webpath
Produces a normalized web path by joining all the parts and normalizing the filesystem-like path into web compatible url. Supports relative and absolute paths. Courtesy of Mojito's utilslocalize
Localize the string via current Y.optionsmarkdownLink
convert string to markdown linkbuildFileTree
build file tree object