util.js 352 Bytes
Newer Older
Scott Sun's avatar
s  
Scott Sun committed
1 2 3 4 5 6 7 8 9 10 11 12 13
var fs = require('fs')
var crypto = require('topsin.crypto');
module.exports = {
    readDir:function(path, suffix, level){
        var level = level || -1
        return fs.listDir(path, level).filter(function(v){
            return v.completeSuffix === suffix
        })
    },
    crypto: function(type,str){
        return crypto[type](str)
    }
}