The comment at the end of this code snippet says:
In the example above, the "spread" on line 39 divides the array into its 2 parts and passes them as arguments to the callback function defined beginning at line 39, which treats them as "user" and "created" in this case. (So "user" will be the object from index 0 of the returned array and "created" will equal "true".)
There is no mention that this is a bluebird (and maybe others) specific promise implementation function.
Two things should be addressed IMO
- Remove promise specific implementation logic
- Update documentation which mentions things like
line 39. There is no line numbers so it's pointless and confusing
http://docs.sequelizejs.com/manual/tutorial/models-usage.html#-findorcreate-search-for-a-specific-element-or-create-it-if-not-available
