modularize util.isAbsolute
by using a polyfill of the Node 0.12 `path.isAbsolute()` method https://github.com/sindresorhus/path-is-absolute
This commit is contained in:
@@ -69,13 +69,6 @@ exports.arrayify = function (val) {
|
||||
throw new TypeError("illegal type for arrayify");
|
||||
};
|
||||
|
||||
exports.isAbsolute = function (loc) {
|
||||
if (!loc) return false;
|
||||
if (loc[0] === "/") return true; // unix
|
||||
if (loc[1] === ":" && loc[2] === "\\") return true; // windows
|
||||
return false;
|
||||
};
|
||||
|
||||
var templateVisitor = {
|
||||
enter: function (node, parent, scope, nodes) {
|
||||
if (t.isExpressionStatement(node)) {
|
||||
|
||||
Reference in New Issue
Block a user