js/modelload/schemaload.js
function makeMongooseModelName(collectionName) {
    if (collectionName !== collectionName.toLowerCase()) {
        throw new Error('expect lowercase, was ' + collectionName);
    }
    if (collectionName.charAt(collectionName.length - 1) === 's') {
        return collectionName.substring(0, collectionName.length - 1);
    }
    throw new Error('expected name with trailing s');
}
function makeMongooseModelName(collectionName) {
    if (collectionName !== collectionName.toLowerCase()) {
        throw new Error('expect lowercase, was ' + collectionName);
    }
    if (collectionName.charAt(collectionName.length - 1) === 's') {
        return collectionName.substring(0, collectionName.length - 1);
    }
    throw new Error('expected name with trailing s');
}
function makeMongooseModelName ( collectionName ) { if ( collectionName !== collectionName . toLowerCase ( ) ) { throw new Error ( 'expect lowercase, was ' + collectionName ) ; } if ( collectionName . charAt ( collectionName . length - 1 ) === 's' ) { return collectionName . substring ( 0 , collectionName . length - 1 ) ; } throw new Error ( 'expected name with trailing s' ) ; }
return a modelname without a traling s
@param collectionName
return a modelname without a traling s