Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. someSchema.pre('save', function(next){
  2. asyncFunction(function(){
  3. this.sub.value = 'something'
  4. next()
  5. })
  6. })
  7.  
  8. some.Schema.pre('save', function(next){
  9. asyncFunction(function(){
  10. next('something')
  11. });
  12. });
  13. some.Schema.pre('save', function(next, value){
  14. this.sub.value=value
  15. next()
  16. })
  17.  
  18. someSchema.pre('save', function(next){
  19. x = this
  20. asyncFunction(function(){
  21. x.sub.value = 'something'
  22. next()
  23. })
  24. })
  25.  
  26. someSchema.pre('save', function(next){
  27. var self = this;
  28. asyncFunction(function(){
  29. self.sub.value = 'something'
  30. next()
  31. })
  32. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement