Closed matthewp closed 6 years ago
API I am thinking of is:
var newPage = page.create(options);
// You can also pass options this way
newPage.configure(options);
newPage('/', function(){
});
newPage.redirect('/foo', '/bar');
newPage.start();
Oops, already have https://github.com/visionmedia/page.js/issues/13
It will be easier to solve problems like https://github.com/visionmedia/page.js/issues/222 once we do this. I was kind of waiting until 2.0 so we could use Object.setPrototypeOf and such to make the
page()
function inherit the page instances stuff, but now I wonder if it's too important to wait on that and if we should just do it a less fancy way.