Comparing version 0.0.0 to 0.0.1
@@ -82,3 +82,3 @@ #! /c/nodejs/node | ||
// Add more checks here | ||
if (!fs.existsSync(DUMP_PATH)) { | ||
if (!dump.exists) { | ||
dump.make(); | ||
@@ -85,0 +85,0 @@ if (program.verbose) { |
@@ -8,2 +8,5 @@ /** | ||
// Shortcut variable for checking existence | ||
var dumpExists = fs.existsSync(DUMP_PATH); | ||
/** | ||
@@ -14,2 +17,3 @@ * Module exports | ||
exports.extend({ | ||
exists: dumpExists, | ||
make: makeDump, | ||
@@ -19,3 +23,4 @@ get: getDump, | ||
add: addToDump, | ||
remove: removeFromDump | ||
remove: removeFromDump, | ||
delete: deleteDump | ||
}); | ||
@@ -33,2 +38,11 @@ | ||
/** | ||
* Deletes dump file at DUMP_PATH. Only used in testing. | ||
* | ||
* @api public | ||
*/ | ||
function deleteDump() { | ||
fs.unlinkSync(DUMP_PATH); | ||
} | ||
/** | ||
* Gets dump file's data. | ||
@@ -35,0 +49,0 @@ * |
{ | ||
"name": "toodo", | ||
"version": "0.0.0", | ||
"version": "0.0.1", | ||
"description": "A minimalistic todo list", | ||
@@ -11,2 +11,3 @@ "main": "index.js", | ||
], | ||
"preferGlobal": true, | ||
"author": { | ||
@@ -26,3 +27,5 @@ "name": "Maverick Chan", | ||
"devDependencies": { | ||
"commander": "^2.5.0" | ||
"commander": "^2.5.0", | ||
"mocha": "^2.0.1", | ||
"should": "^4.1.0" | ||
}, | ||
@@ -29,0 +32,0 @@ "bin": { |
Sorry, the diff of this file is not supported yet
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
298
8577
3