pub.page(i) now returns false if the requested page doesn't exist.
pub.page(i) now returns false if the requested page doesn't exist.

This adds some really nice functionality to this method.
It's really convenient and intuitive to test against this, to check if a page needs to be created or not:

if(!b.page(i)) pages.add();

Before it would have killed the whole script if the page doesn't exist.

PS: This is the first time I'm actually contributing to the core.. if you contribute somehow else (pull request or something) let me know.. for now I'm just going to commit my changes.. its all reversible anyways so it wont do much harm.. cheers :)

greenish/basil.js,fabiantheblind/basil.js,fabiantheblind/basil.js