Skip to content

Latest commit

 

History

History
64 lines (39 loc) · 2.34 KB

utils.md

File metadata and controls

64 lines (39 loc) · 2.34 KB

firedoc 1.9.2

Fireball is the game engine for the future.

utils Module

Defined in lib/utils.js:3

Classes

Enums

Direct Members

Index

Methods
  • fmtProcess Format the process string to array
  • getNamespace Get the namespace string from a target object
  • escapeHTML Escapes HTML characters in html.
  • safetrim Trim in safe mode
  • unindent 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 Selleck
  • filterFileName 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 HREF
  • getLayouts Like getPages(), but returns only the files under the layout/ 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 Like getPages(), but returns only the files under the partial/ 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 utils
  • localize Localize the string via current Y.options
  • markdownLink convert string to markdown link
  • buildFileTree build file tree object