Skip to content

Commit

Permalink
add make file
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-ma committed Apr 7, 2014
1 parent 20ed623 commit c20b36d
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 1 deletion.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
test:
mocha --reporter spec

.PHONY: test

5 changes: 4 additions & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
/*
*
* Main entry.
* */

var util = require("./util");
console.log(util);
module.exports.util = util;
22 changes: 22 additions & 0 deletions lib/util.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Util
* */

var Util = {
NameSpace: 'UTIL',
Version: '1.0.0',
upperCaseUUID: function () {
return this.UUID()
.toString()
.toUpperCase();
},
UUID: function () {
var e, t = "89ab",
n = [];
for (e = 0; e < 36; e += 1) n[e] = (Math.random() * 16 | 0)
.toString(16);
return n[8] = n[13] = n[18] = n[23] = "-", n[14] = "4", n[19] = t.charAt(Math.random() * 4 | 0), n.join("");
},
};

module.exports = Util;
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,8 @@
},
"engines": {
"node": ">= 0.8.0"
},
"scripts": {
"test": "make test"
}
}

0 comments on commit c20b36d

Please sign in to comment.