Skip to content

Instantly share code, notes, and snippets.

@robertkowalski
Last active June 22, 2016 12:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robertkowalski/851511f067eef53e9a1d81581270a2cb to your computer and use it in GitHub Desktop.
Save robertkowalski/851511f067eef53e9a1d81581270a2cb to your computer and use it in GitHub Desktop.

api:

const database = 'animaldb';
const doc = 'flamingo';
FauxtonAPI.navigateUrl(['document', database, doc], { trigger: true });

implementation:

FauxtonAPI.navigateUrl = (list, opts) => {
  const key = list.shift(0);

  const url = FauxtonAPI.url.call(this, [key, 'app', ...list]);

  return FauxtonAPI.navigate(url, opts);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment