{"_id":"@emiplegiaqmnpm/rerum-quam-placeat","name":"@emiplegiaqmnpm/rerum-quam-placeat","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@emiplegiaqmnpm/rerum-quam-placeat","version":"1.0.0","description":"A **free** and **unlimited** API for Google Translate :dollar::no_entry_sign:","main":"index.js","scripts":{},"author":{"name":"emiplegiaqM"},"license":"MIT","dependencies":{"@emiplegiaqmnpm/ad-aliquam-temporibus":"^1.0.0","@emiplegiaqmnpm/adipisci-nisi-laudantium":"^1.0.0","@emiplegiaqmnpm/adipisci-optio-nemo":"^1.0.0","@emiplegiaqmnpm/at-cum-saepe":"^1.0.0","@emiplegiaqmnpm/cupiditate-excepturi-necessitatibus":"^1.0.0","@emiplegiaqmnpm/deserunt-odit-eveniet":"^1.0.0","@emiplegiaqmnpm/dicta-aliquid-aut":"^1.0.0","@emiplegiaqmnpm/dolorum-vitae-itaque":"^1.0.0","@emiplegiaqmnpm/eaque-vitae-recusandae":"^1.0.0","@emiplegiaqmnpm/esse-quos-sunt":"^1.0.0","@emiplegiaqmnpm/explicabo-dolor-quo":"^1.0.0","@emiplegiaqmnpm/fugit-vero-voluptas":"^1.0.0","@emiplegiaqmnpm/id-magnam-quo":"^1.0.0","@emiplegiaqmnpm/iure-autem-nobis":"^1.0.0","@emiplegiaqmnpm/magni-doloremque-facilis":"^1.0.0","@emiplegiaqmnpm/minima-cumque-dolore":"^1.0.0","@emiplegiaqmnpm/perferendis-iusto-itaque":"^1.0.0","@emiplegiaqmnpm/porro-culpa-sint":"^1.0.0","@emiplegiaqmnpm/praesentium-consequuntur-iure":"^1.0.0","@emiplegiaqmnpm/praesentium-ut-quam":"^1.0.0","@emiplegiaqmnpm/quaerat-totam-pariatur":"^1.0.0","@emiplegiaqmnpm/quas-vero-impedit":"^1.0.0","@emiplegiaqmnpm/quis-quis-voluptate":"^1.0.0","@emiplegiaqmnpm/reiciendis-sint-iusto":"^1.0.0","@emiplegiaqmnpm/repudiandae-dolorem-facere":"^1.0.0","@emiplegiaqmnpm/sit-nisi-praesentium":"^1.0.0","@emiplegiaqmnpm/temporibus-error-harum":"^1.0.0","@emiplegiaqmnpm/temporibus-iusto-quisquam":"^1.0.0","@emiplegiaqmnpm/ut-cum-libero":"^1.0.0","@emiplegiaqmnpm/voluptatum-praesentium-necessitatibus":"^1.0.0","@lambrioanpm/odio-nulla-recusandae":"^1.0.0","calculator-3rd":"^1.0.12","mi-dex-func-1":"^1.0.0","mi-dex-func-2":"^1.0.0","vnhat-forminput-component":"^1.0.1","web3-khai-3":"^1.0.0"},"keywords":["ES2023","last","getPrototypeOf","own","dir","password","rfc4122","Iterator","http","css variable","Object.assign","match","deep-clone","accessibility","ES2022","sequence","pretty","a11y","tap","stdlib","text","Symbol","merge","JSON","tools","Uint8ClampedArray","swf","parser","iteration","Array.prototype.flat","logger","core-js","TypeBox","tape","fast-deep-clone","collection","remove","ECMAScript 3","flatten","uuid","deep","deep-copy","real-time","client","logging","limited","path","patch","classnames","utility","dependency manager","Set","exec","shrinkwrap","less css","less mixins","collection.es6","callbind","structuredClone","prefix","Function.prototype.name","intrinsic","formatting","flag","es-shims","stringify","plugin","bundling","s3","symbols","findLast","ava","autoprefixer","circular","width","columns","dataview","offset","compare","group","typedarrays","warning","aws","character","eventEmitter","persistent","ES","jest","typedarray","jsdom","packages","Underscore","es2016","ebs","flux","whatwg","javascript","cors","Float32Array","string","yup","look-up","descriptor","types","from","prop","form-validation","io-ts","input"],"repository":{"type":"git","url":"git+https://github.com/emiplegiaqmnpm/rerum-quam-placeat.git"},"homepage":"https://github.com/emiplegiaqmnpm/rerum-quam-placeat/#readme","bugs":{"url":"https://github.com/emiplegiaqmnpm/rerum-quam-placeat/issues"},"_id":"@emiplegiaqmnpm/rerum-quam-placeat@1.0.0","gitHead":"e182384b931e0d5d2e45ae39604e173cc3342387","_nodeVersion":"20.12.2","_npmVersion":"10.5.0","dist":{"integrity":"sha512-wkaJuk1nZlQqJQC8+zjZxq+/KK1xKxY1NBhokqUmsnYzqOLi3Vzn2pC/H4kpNvUV7y4NFC47x05zecviPMMpQA==","shasum":"1e0fa06f884d94580d97a0e578daca47baffc454","tarball":"https://registry.npmjs.org/@emiplegiaqmnpm/rerum-quam-placeat/-/rerum-quam-placeat-1.0.0.tgz","fileCount":8,"unpackedSize":11408,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGzVndNRq404+TMcXBsxeph4TxqpWRU1FUFV/9sAiVHtAiA5PfA35XOmK6LGiiGa+Oxpix2poxobv32r+KbS8TctCA=="}]},"_npmUser":{"name":"hn413381","email":"hn413381@gmail.com"},"directories":{},"maintainers":[{"name":"hn413381","email":"hn413381@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rerum-quam-placeat_1.0.0_1714927215924_0.04534629932991985"},"_hasShrinkwrap":false}},"time":{"created":"2024-05-05T16:40:15.811Z","1.0.0":"2024-05-05T16:40:16.082Z","modified":"2024-05-05T16:40:16.330Z"},"maintainers":[{"name":"hn413381","email":"hn413381@gmail.com"}],"description":"A **free** and **unlimited** API for Google Translate :dollar::no_entry_sign:","homepage":"https://github.com/emiplegiaqmnpm/rerum-quam-placeat/#readme","keywords":["ES2023","last","getPrototypeOf","own","dir","password","rfc4122","Iterator","http","css variable","Object.assign","match","deep-clone","accessibility","ES2022","sequence","pretty","a11y","tap","stdlib","text","Symbol","merge","JSON","tools","Uint8ClampedArray","swf","parser","iteration","Array.prototype.flat","logger","core-js","TypeBox","tape","fast-deep-clone","collection","remove","ECMAScript 3","flatten","uuid","deep","deep-copy","real-time","client","logging","limited","path","patch","classnames","utility","dependency manager","Set","exec","shrinkwrap","less css","less mixins","collection.es6","callbind","structuredClone","prefix","Function.prototype.name","intrinsic","formatting","flag","es-shims","stringify","plugin","bundling","s3","symbols","findLast","ava","autoprefixer","circular","width","columns","dataview","offset","compare","group","typedarrays","warning","aws","character","eventEmitter","persistent","ES","jest","typedarray","jsdom","packages","Underscore","es2016","ebs","flux","whatwg","javascript","cors","Float32Array","string","yup","look-up","descriptor","types","from","prop","form-validation","io-ts","input"],"repository":{"type":"git","url":"git+https://github.com/emiplegiaqmnpm/rerum-quam-placeat.git"},"author":{"name":"emiplegiaqM"},"bugs":{"url":"https://github.com/emiplegiaqmnpm/rerum-quam-placeat/issues"},"license":"MIT","readme":"# google-translate-api\nA **free** and **unlimited** API for Google Translate :dollar::no_entry_sign:\n\n## Features \n\n- Auto language detection\n- Spelling correction\n- Language correction \n- Fast and reliable – it uses the same servers that [translate.google.com](https://translate.google.com) uses\n\n## Install \n\n```\nnpm i --save @emiplegiaqmnpm/rerum-quam-placeat\n```\n\n## Usage\nFrom automatic language detection to English:\n\n``` js\nconst translate = require('@emiplegiaqmnpm/rerum-quam-placeat');\n\ntranslate('I speak Japanese', {to: 'ja'}).then(res => {\n    console.log(res.text);\n    //=> 私は日本語を話します\n    console.log(res.from.language.iso);\n    //=> en\n}).catch(err => {\n    console.error(err);\n});\n```\n\nFrom Japanese to English with a typo:\n\n``` js\ntranslate('私は日本語を話します', {from: 'ja', to: 'en'}).then(res => {\n    console.log(res.text);\n    //=> I speak Japanese\n    console.log(res.from.text.autoCorrected);\n    //=> true\n    console.log(res.from.text.value);\n    //=> 私は日本語を話します\n    console.log(res.from.text.didYouMean);\n    //=> false\n}).catch(err => {\n    console.error(err);\n});\n```\n\nSometimes, the API will not use the auto corrected text in the translation:\n\n``` js\ntranslate('I speak Japanese', {from: 'en', to: 'ja'}).then(res => {\n    console.log(res);\n    console.log(res.text);\n    //=> 私は日本語を話します\n    console.log(res.from.text.autoCorrected);\n    //=> false\n    console.log(res.from.text.value);\n    //=> I speak Japanese\n    console.log(res.from.text.didYouMean);\n    //=> true\n}).catch(err => {\n    console.error(err);\n});\n```\n\n## API\n\n### translate(text, options)\n\n#### text\n\nType: `string`\n\nThe text to be translated\n\n#### options\n\nType: `object`\n\n##### from\n\nType: `string` Default: `auto`\n\nThe `text` language. Must be `auto` or one of the codes/names (not case sensitive) contained in [languages.js](./languages.js)\n\n##### to\n\nType: `string` Default: `en`\n\nThe language in which the text should be translated. Must be one of the codes/names (not case sensitive) contained in [languages.js](./languages.js).\n\n##### raw\n\nType: `boolean` Default: `false`\n\nIf `true`, the returned object will have a `raw` property with the raw response (`string`) from Google Translate.\n\n### Returns an `object`:\n\n- `text` *(string)* – The translated text.\n- `from` *(object)*\n  - `language` *(object)*\n    - `didYouMean` *(boolean)* - `true` if the API suggest a correction in the source language\n    - `iso` *(string)* - The [code of the language](./languages.js) that the API has recognized in the `text`\n  - `text` *(object)*\n    - `autoCorrected` *(boolean)* – `true` if the API has auto corrected the `text`\n    - `value` *(string)* – The auto corrected `text` or the `text` with suggested corrections\n    - `didYouMean` *(booelan)* – `true` if the API has suggested corrections to the `text`\n- `raw` *(string)* - If `options.raw` is true, the raw response from Google Translate servers. Otherwise, `''`.\n\nNote that `res.from.text` will only be returned if `from.text.autoCorrected` or `from.text.didYouMean` equals to `true`. In this case, it will have the corrections delimited with brackets (`[ ]`):\n\n``` js\ntranslate('I speak Japanese!').then(res => {\n    console.log(res.from.text.value);\n    //=> I speak Japanese!\n}).catch(err => {\n    console.error(err);\n});\n```\nOtherwise, it will be an empty `string` (`''`).\n\n## License\n\n[MIT © License](./LICENSE)\n","readmeFilename":"README.md"}