# MDN Search Docs
A NPM package that searches the [Mozilla Developer Network](https://developer.mozilla.org/) website.
[](https://saythanks.io/to/Fazendaaa)
[](./README.md)
[](./docs/readme/README_PT.md)
[](https://www.npmjs.com/package/mdn-search-docs)
[](https://travis-ci.org/Fazendaaa/MDNSearch)
[](https://coveralls.io/github/Fazendaaa/MDNSearch?branch=master)
[](https://codeclimate.com/github/Fazendaaa/MDNSearch/maintainability)
[](https://snyk.io/test/github/fazendaaa/MDNSearch?targetFile=package.json)
## About
A simple way of searching MDN content. I just wrote this package to be more complete for what I need -- see what I mean in [MDNSearchBot](https://github.com/Fazendaaa/MDNSearchBot).
# How to use it
* searchMDN ( { __term__: _string_ | _Array<_string_>_; __page__?: _number_; __locale__?: _string_; __topics__?: _string_ | _Array<_string_>_; })
* __locale__: remember that should be in the following format: _"language-COUNTRY"_
Example:
``` typescript
import { searchMDN } from 'mdn-search-docs';
searchMDN({ term: 'Array' }).then(console.log);
searchMDN({ term: 'Array', locale: 'pt-BR' }).then(console.log);
const searched = await searchMDN({ term: 'Array', page: 2 });
```
## Testing
There's a [Travis CI](http://travis-ci.org/) integration and I've written all the testing with [Jest](https://facebook.github.io/jest/).
## Code
Plain and simple [Typescript](http://typescriptlang.org/) and the [Microsoft linter standards](https://github.com/Microsoft/tslint-microsoft-contrib) for it.
# Contributing
Just talk to me through opening a issue.
# Versioning
Just using plain and simple npm version. See the badge at the top of this readme.
# TODO
Since I will be keeping this README up to date with any major change and I don't use any versioning system to log all the fixed bugs or previous projects updates, you can still have a taste of what comes next and what is being under analysis right in the [Projects](https://github.com/Fazendaaa/MDNSearch/projects/) tab.
# Authors
* Only [me](https://github.com/Fazendaaa) for now.
Consider buy me a coffee:
[](https://www.buymeacoffee.com/Fazenda)
Or even becoming a patron:
[](https://www.patreon.com/Fazenda/overview)
# License
Like many Open-Source Software (OSS) the MIT license is used, more about it in [LICENSE](https://github.com/Fazendaaa/MDNSearch/blob/master/LICENSE).