{"version":3,"sources":["jsdelivr-header.js","/npm/english-word-dictionary@1.0.1/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACLA,MAAM,MAAQ,QAAQ,SAChB,IAAI,mDAEV,SAAS,OAAO,GACZ,IACI,OAAO,IAAI,SAAQ,CAAC,EAAS,KACzB,MAAM,IAAI,IAAI,GAAM,IACK,MAAlB,EAAK,YACJ,EAAQ,CAAC,QAAS,8BAEtB,IAAI,EAAO,GACX,EAAK,GAAG,QAAQ,IACZ,EAAK,KAAK,EAAM,IAEpB,EAAK,GAAG,OAAO,UACX,MAAM,EAAQ,KAAK,MAAM,OAAO,OAAO,GAAM,YAC7C,EAAQ,EAAM,GAChB,IACH,GAAG,SAAS,IACX,EAAO,EAAI,QAAQ,GACrB,GAGV,CAAE,MAAO,GACL,MAAM,CACV,CACJ,CAEA,OAAO,QAAU,CAAC","file":"/npm/english-word-dictionary@1.0.1/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.37.0.\n * Original file: /npm/english-word-dictionary@1.0.1/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","\r\nconst https = require('https');\r\nconst API=\"https://api.dictionaryapi.dev/api/v2/entries/en/\"\r\n\r\nfunction search(word){\r\n    try{\r\n        return new Promise((resolve, reject)=>{\r\n            https.get(API+word, resp => {\r\n                if(resp.statusCode===404) {\r\n                    resolve({message: \"not a valid english word.\"});\r\n                }\r\n                let data = [];\r\n                resp.on('data', chunk => {\r\n                    data.push(chunk);\r\n                })\r\n                resp.on('end', async () => {\r\n                    const dataa = JSON.parse(Buffer.concat(data).toString());\r\n                    resolve(dataa);\r\n                });\r\n            }).on('error', err => {\r\n                reject(err.message);\r\n            });\r\n        })\r\n        // return meaning;\r\n    } catch (e){\r\n        throw e;\r\n    }\r\n}\r\n\r\nmodule.exports = {search};"]}