You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
521 B
14 lines
521 B
var slice = Array.prototype.slice; |
|
|
|
function dashify(method, file) { |
|
return function(path) { |
|
var argv = arguments; |
|
if (path == "-") (argv = slice.call(argv)).splice(0, 1, file); |
|
return method.apply(null, argv); |
|
}; |
|
} |
|
|
|
exports.readFile = dashify(require("./read-file"), "/dev/stdin"); |
|
exports.readFileSync = dashify(require("./read-file-sync"), "/dev/stdin"); |
|
exports.writeFile = dashify(require("./write-file"), "/dev/stdout"); |
|
exports.writeFileSync = dashify(require("./write-file-sync"), "/dev/stdout");
|
|
|