The "I'm feeling lucky" URL shortener.
The Mozilla Developer Network is an awesome JavaScript resource. When looking for JavaScript references on something like Function.apply
, you might use a search engine with "apply site:developer.mozilla.org" and click the first result.
mdn.io does that for you, and can be configured to search any domain.
// Make sure add() takes a single argument (see https://mdn.io/Function.length)
expect(queue.add.length).to.equal(1);
As a lmgtfy replacement for JavaScript questions
friend: dude, is it
call()
orapply()
that takes an array?
you: mdn.io/apply
mdn.io uses DuckDuckGo's Bang! functionality to redirect you to the first search result.
Note that, because this is a search, the page you're redirected to may change in the future. However, you can rest assured that you'll always be redirected to the page that DuckDuckGo finds most relevant.
mdn.io can be used to search any domain. See the configuration section and fire up your own instance.
npm install # Install dependencies.
npm start # Start server locally.
Configure mdn.io with the following environment variables:
Variable | Description | Default |
---|---|---|
PORT |
The port to run the server on. | 3000 |
SERVICE_URL |
The search service URL to use. | https://duckduckgo.com/?q=%21%20%s |
SEARCH_DOMAIN |
The domain to search. | developer.mozilla.org |
FALLBACK_URL |
The fallback URL for empty queries. | https://developer.mozilla.org/en-US/docs/JavaScript |
Alternative service URLs:
- Google -
https://www.google.com/search?btnI&q=%s
- Bing -
https://www.bing.com/search?q=%s
(Bing does not have an "I'm Feeling Lucky" equivalent, you'll be redirected to the search result page instead)
SEARCH_DOMAIN="reddit.com" FALLBACK_URL="https://reddit.com" PORT=8080 npm start
npm run deploy