~openstore-team/openstore-web/openstore-web

« back to all changes in this revision

Viewing changes to www/app/filters/permission.js

  • Committer: Brian Douglass
  • Date: 2017-10-23 03:06:29 UTC
  • Revision ID: git-v1:c230934d1c657653901bbedc2e44e92286b2c7ab
Cleaned up permissions

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
var permission = function() {
 
2
    return function(str) {
 
3
        return str.replace(/_/g, ' ').replace(/-/g, ' ').replace(/\w\S*/g, function(txt) {
 
4
            return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase(); //To title Case
 
5
        });
 
6
    };
 
7
};
 
8
 
 
9
module.exports = permission;