🧲Get
search(query: string, {
lang?: "html" | "css" | "js", // Default: js
trad?: "fr" // Default: en-US
skip?: false // Default: false (Skip the cache and request directly to the documentation)
}): Promise<string>
const { mdn } = require('search-docs');
mdn.get('h1', { lang: "html", trad: "fr" })
.then(data => console.log(data));
{
id: 'browser_compatibility',
data: {
__compat: {
mdn_url: '/en-US/docs/Web/HTML/Element/Heading_Elements',
source_file: 'html/elements/h1.json',
spec_url: 'https://html.spec.whatwg.org/multipage/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements',
status: [Object],
support: [Object]
}
},
query: 'html.elements.h1',
browsers: {
chrome: {
accepts_flags: true,
accepts_webextensions: true,
name: 'Chrome',
pref_url: 'chrome://flags',
preview_name: 'Canary',
releases: [Object],
type: 'desktop'
},
chrome_android: {
accepts_flags: true,
accepts_webextensions: false,
name: 'Chrome Android',
pref_url: 'chrome://flags',
releases: [Object],
type: 'mobile',
upstream: 'chrome'
},
deno: {
accepts_flags: true,
accepts_webextensions: false,
name: 'Deno',
releases: [Object],
type: 'server'
},
edge: {
accepts_flags: true,
accepts_webextensions: true,
name: 'Edge',
pref_url: 'about:flags',
releases: [Object],
type: 'desktop',
upstream: 'chrome'
},
firefox: {
accepts_flags: true,
accepts_webextensions: true,
name: 'Firefox',
pref_url: 'about:config',
preview_name: 'Nightly',
releases: [Object],
type: 'desktop'
},
firefox_android: {
accepts_flags: false,
accepts_webextensions: true,
name: 'Firefox for Android',
pref_url: 'about:config',
releases: [Object],
type: 'mobile',
upstream: 'firefox'
},
ie: {
accepts_flags: false,
accepts_webextensions: false,
name: 'Internet Explorer',
releases: {},
type: 'desktop'
},
nodejs: {
accepts_flags: true,
accepts_webextensions: false,
name: 'Node.js',
releases: [Object],
type: 'server'
},
oculus: {
accepts_flags: true,
accepts_webextensions: false,
name: 'Oculus Browser',
pref_url: 'chrome://flags',
releases: [Object],
type: 'xr',
upstream: 'chrome_android'
},
opera: {
accepts_flags: true,
accepts_webextensions: true,
name: 'Opera',
pref_url: 'opera://flags',
releases: [Object],
type: 'desktop',
upstream: 'chrome'
},
opera_android: {
accepts_flags: false,
accepts_webextensions: false,
name: 'Opera Android',
releases: [Object],
type: 'mobile',
upstream: 'chrome_android'
},
safari: {
accepts_flags: true,
accepts_webextensions: true,
name: 'Safari',
preview_name: 'TP',
releases: [Object],
type: 'desktop'
},
safari_ios: {
accepts_flags: true,
accepts_webextensions: true,
name: 'Safari on iOS',
releases: [Object],
type: 'mobile',
upstream: 'safari'
},
samsunginternet_android: {
accepts_flags: false,
accepts_webextensions: false,
name: 'Samsung Internet',
releases: [Object],
type: 'mobile',
upstream: 'chrome_android'
},
webview_android: {
accepts_flags: false,
accepts_webextensions: false,
name: 'WebView Android',
releases: [Object],
type: 'mobile',
upstream: 'chrome_android'
}
},
url: 'https://developer.mozilla.org/fr/docs/Web/HTML/Element/h1/'
}
Last updated