# Code coverage report for lib/register.js

## Statements: 62.5% (5 / 8) Branches: 100% (2 / 2) Functions: 0% (0 / 2) Lines: 57.14% (4 / 7) Ignored: 2 statements, 2 branches

All files » lib/ » register.js

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    151
    1

    1

    1

     var parser = require("./parser");
    var fs     = require("fs");

    require.extensions[".pc"] = function(module, filename) {

      var paper;

      module.exports = function() {

        /* istanbul ignore next */
        if (!paper) paper = parser.compile(fs.readFileSync(filename, "utf8"));
        return paper.apply(this, arguments);
      };
    };