nl_tokens: Test whether a package name is acceptable for use as an android project . Returns a promise fulfilled if the package name is acceptable ; rejected otherwise .
pl_tokens: function validatePackageName ( package_name ) { //Make the package conform to Java package types //http://developer.android.com/guide/topics/manifest/manifest-element.html#package //Enforce underscore limitation var msg = 'Error validating package name. ' ; if ( ! / ^[a-zA-Z][a-zA-Z0-9_]+(\.[a-zA-Z][a-zA-Z0-9_]*)+$ / . test ( package_name ) ) { return Q . reject ( new CordovaError ( msg + 'Package name must look like: com.company.Name' ) ) ; } //Class is a reserved word if ( / \b[Cc]lass\b / . <mask> ( package_name ) ) { return Q . reject ( new CordovaError ( msg + '"class" is a reserved word' ) ) ; } return Q . resolve ( ) ; }