Comparing version 0.0.4 to 1.0.0
@@ -0,1 +1,2 @@ | ||
#!/usr/bin/env node | ||
var touch = require("../touch") | ||
@@ -2,0 +3,0 @@ , fs = require("fs") |
@@ -5,3 +5,3 @@ { | ||
"description": "like touch(1) in node", | ||
"version": "0.0.4", | ||
"version": "1.0.0", | ||
"repository": "git://github.com/isaacs/node-touch.git", | ||
@@ -16,3 +16,9 @@ "main": "touch.js", | ||
}, | ||
"license": "ISC" | ||
"license": "ISC", | ||
"scripts": { | ||
"test": "tap test/*.js" | ||
}, | ||
"devDependencies": { | ||
"tap": "^1.3.1" | ||
} | ||
} |
14
touch.js
@@ -10,3 +10,3 @@ var fs = require("fs") | ||
touch.ftouch = ftouch | ||
touch.ftouchSync = function (fd, options) { | ||
touch.ftouchSync = ftouch.sync = function (fd, options) { | ||
return ftouch(fd, options) | ||
@@ -23,6 +23,9 @@ } | ||
options.atime = options.mtime = now | ||
} else if (true === options.atime) { | ||
options.atime = now | ||
} else if (true === options.mtime) { | ||
options.mtime = now | ||
} else { | ||
if (true === options.atime) { | ||
options.atime = now | ||
} | ||
if (true === options.mtime) { | ||
options.mtime = now | ||
} | ||
} | ||
@@ -34,2 +37,3 @@ | ||
} | ||
if (!options.nocreate) { | ||
@@ -36,0 +40,0 @@ oflags = oflags | cons.O_CREAT |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
12679
8
341
1
1