Class: FramaCDocumentFixer

FramaCDocumentFixer(root_directory_path, optionsopt)

A class to fix 'pos_path' or 'uri' attributes in a document

Constructor

new FramaCDocumentFixer(root_directory_path, optionsopt)

constructor
Parameters:
Name Type Attributes Description
root_directory_path string Root directory path
options FramaCDocumentFixerOptions <optional>
options
Source:

Methods

error(msg)

Log an error message
Parameters:
Name Type Description
msg string an error message
Source:

fix(document, attribute) → {*}

Fix a document
Parameters:
Name Type Description
document * a document
attribute string attribute to fix (either 'pos_path' or 'uri')
Source:
Returns:
a fixed document
Type
*

fix_array(document, attribute) → {Array.<Object>}

Fix array
Parameters:
Name Type Description
document Array.<Object> a document
attribute string attribute to fix (either 'pos_path' or 'uri')
Source:
Returns:
a clone of document
Type
Array.<Object>

fix_object(document, attribute) → {Object}

Fix object. Every pos_path attributes are fixed in the returned document.
Parameters:
Name Type Description
document Object a document
attribute string attribute to fix (either 'pos_path' or 'uri')
Source:
Returns:
a fixed document
Type
Object

fix_path(abs_path, attribute) → {string}

Fix path
Parameters:
Name Type Description
abs_path string absolute - path (or URI) to fix
attribute string attribute to fix (either 'pos_path' or 'uri')
Source:
Returns:
a fixed absolute path
Type
string

log(msg)

Log a message
Parameters:
Name Type Description
msg string a message
Source:

warn(msg)

Log a warning message
Parameters:
Name Type Description
msg string a warning message
Source: