acuminous/power-merge

View on GitHub
lib/Node.js

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
const R = require('ramda');

module.exports = function() {

  const path = [];

  this.getFacts = function() {
    return {
      depth: path.length,
      path: path.join('.'),
      name: R.last(path)
    };
  };

  this.push = function(name) {
    path.push(name);
  };

  this.pop = function() {
    return path.pop();
  };
};