This is the reference point. All the other options are based off this.
|-- app
| |-- controllers
| | |-- admin
// Created by Nando Vieira | |
String.prototype.normalize = function() { | |
var from = "àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßàáâãäåæçèéêëìíîïðñòóôõöøùúûýýþÿŕŕ"; | |
var to = "aaaaaaaceeeeiiiidnoooooouuuuybsaaaaaaaceeeeiiiidnoooooouuuyybyrr"; | |
var value = this; | |
for(var i = 0; i < from.length; i++) { | |
char_re = new RegExp(from.charAt(i), "gim"); | |
value = value.replace(char_re, to.charAt(i)) | |
}; |
var mongoose = require('./index') | |
, TempSchema = new mongoose.Schema({ | |
salutation: {type: String, enum: ['Mr.', 'Mrs.', 'Ms.']} | |
}); | |
var Temp = mongoose.model('Temp', TempSchema); | |
console.log(Temp.schema.path('salutation').enumValues); | |
var temp = new Temp(); | |
console.log(temp.schema.path('salutation').enumValues); |