# @devtea2028/veritatis-magni-laboriosam-vero

Latest version **1.0.0** (published 2024-05-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install @devtea2028/veritatis-magni-laboriosam-vero
pnpm add @devtea2028/veritatis-magni-laboriosam-vero
yarn add @devtea2028/veritatis-magni-laboriosam-vero
bun add @devtea2028/veritatis-magni-laboriosam-vero
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2024-05-01 |
| First published | 2024-05-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 11 |
| Unpacked size | 15.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | accingneff7 |
| Maintainers | accingneff7 |
| Keywords | descriptor, tty, log, bootstrap less, typed, typescript, ender, ES7, open, callbound, Map, limit, restful, dataview, es2017, mime-db, toStringTag, ECMAScript 7, Object.entries, worker, less css, mapreduce, default, filter, CSSStyleDeclaration, RFC-6455, metadata, byteLength, column, extra, aws, BigUint64Array, connect, batch, figlet, extend, Int8Array, Observables, request, jQuery, ES2021, ansi, flat, patch, Symbol, glob, syntax, fps, internal, toSorted, limited, signal, crypto, tester, rgb, superstruct, Uint8Array, chinese, es-shim API, watcher, browserslist, regular expressions, hardlinks, javascript, @@toStringTag, .env, args, form, moment, operating-system, Float32Array, exit, i18n, flatten, Rx, promises, value, arrays, jsonpath, jsdiff, rest, keys, collection.es6, values, regexp, karma, Promise, optimizer, native, dynamodb, type, environments, windows, wordbreak, Microsoft, computed-types, ECMAScript 2022, exe, cache, fixed-width, find-up, testing, nope, class-validator, extension, configurable, await, code points, toolkit, eventDispatcher, gradients css, ES8, own, flag, qs, Iterator, serializer, proxy, walking, rate, install, js, assert, Symbol.toStringTag, beanstalk, require, arraybuffer, telephone, StyleSheet, package, language, css-in-js, variables, colors, sns, postcss, ECMAScript 6, css, fs, styles, input, node, deep, ECMAScript 2020, prefix, idle, Object.fromEntries, browser, emoji, rm -fr, chrome, parser, npm, link, Array.prototype.flat, jasmine, terminal, assertion, ECMAScript 2015, HyBi, command-line, cloudformation, defineProperty, classname, pnpm9, read, file, sharedarraybuffer, functional, xterm, prototype, invariant, regular, negative, proto, time, tostringtag, reduce, matches, react-hooks, object, ratelimit, compile less, nodejs, arktype, every, password, folder, Uint32Array, which, String.prototype.trim, once, find, call-bind, names, state, core-js, sham, text, typesafe, japanese, autoprefixer, styleguide, BigInt64Array, loadbalancing, fast-deep-clone, weakmap, cloudsearch, react, east-asian-width, throttle, iam, hooks, Float64Array, color, start, endpoint, Object.keys, ArrayBuffer.prototype.slice, spinners, syntaxerror, queue, preprocessor, command, deep-clone, ec2, compare, web, browserlist, ses, in, typeof, contains, website, enumerable, concatMap, look, handlers, mobile, optimist, width, Array.prototype.flatMap, phone, readablestream, es-abstract, TypedArray, es-shims, scheme-validation, dom, classnames, dayjs, look-up, Array.prototype.findLastIndex, parent, hash, dependencies, RxJS, check, call-bound, validate, lint, polyfill, entries, jsx, flux, protobuf, prune, clone, Object.defineProperty, private data, rfc4122, groupBy, emr, vpc, some, progress, lesscss, delete, has-own, uuid, tap, jshint, JSON, character, validation, auth, has, omit, speed, negative zero, output, from, equal, datastructure, traverse, writable, wrap, full-width, trim, asserts, typed array, immutable, helpers, art, JSON-Schema, whatwg, env, korean, cmd, electron, copy, ebs, ecmascript, sameValueZero, setPrototypeOf, String.prototype.matchAll, cjk, slice, executable, Array.prototype.flatten, make, commander, compiler, TypeScript, uninstall, ECMAScript 2017, quote, mkdirs, tape, nested css, Set, workspace:*, bcrypt, zod, hasOwn, schema, safe, get, descriptors, util.inspect, yaml, full, immer, wait, waf, getPrototypeOf, yup, functions, module, globals, ECMAScript 2018, Underscore, preserve-symlinks, buffers, emit, mkdir, cloudwatch, types, symlinks, ES2017, internal slot, higher-order, dependency manager, trimRight, irq, ReactiveExtensions, queueMicrotask, modules, plugin, ECMAScript 3, utilities, Object.is, crypt, sigterm, weakset, guid, function, identifiers, query, logger, option, forEach, diff, styled-components, middleware, 0, postcss-plugin, fastify, number, hookform, es7, elasticache, monorepo, symbols, includes, ECMAScript 2021, slot, 256, WebSocket, vest, minimal, Uint8ClampedArray, bundler, Object.values, properties, RegExp.prototype.flags, streams2, hot, trimStart, styling, date, gradients css3, tools, match, linux, fastclone, Object.getPrototypeOf, Int32Array, xdg, trimEnd, cloudtrail, config, ava, byte, shrinkwrap, getOwnPropertyDescriptor, json, findLast, eslint, route53, launch, deepclone, AsyncIterator, ES, ES2016, mru, ast, setImmediate, view, pretty, cli, listeners, formatting, macos, fast, unicode, columns, router, offset, classes, ES2020, is, bundling, resolve, visual, sigint, performance, variables in css, debug, consume, recursive, watchFile, jest, duplex, elm, es2016, bind, ECMAScript 5, -0, protocol-buffers, buffer, opener, gdpr, packages, cors, ECMAScript 2019, shell, accessor, process, util, format, test, ES2022, argparse, __proto__, redux, glacier, matchAll, workflow, encryption, make dir, chai, watching, inference, picomatch, ajax, live, console, Uint16Array, eslintconfig, mocha, efficient, fastcopy, estree, break, es2018, watch, storagegateway, rds, importexport, fast-deep-copy, ReactiveX, installer, concat, express, Observable, call, term, map, exec, forms, iterate, _.extend, equality, generics, push, serialization, ES2023, key, group, ES6, reuse, iterator, set, wordwrap, cloudfront, bootstrap css, lru, file system, WeakSet, css less, argument, URLSearchParams, settings, ts, lazy, sorted, persistent, amazon, Object.assign, merge, spinner, stringifier, regex, error, deep-copy, ECMAScript 2016, task, collection, redact, concurrency, colour, array, Int16Array, dataView, async, ES2019, parents, loading, warning, busy, CSS, lockfile, pipe, Array.prototype.findLast, sort, RegExp#flags, css variable, assign, ArrayBuffer, up, callback, less.js, logging, react-hook-form, isConcatSpreadable, sqs, editor, framework, flatMap, Reflect.getPrototypeOf, callbind, robust, description, libphonenumber, import, ES2015, core, stringify, interrupts, walk, findup, awesomesauce, global, regular expression, opens, less, move, id, structuredClone, mimetypes, redux-toolkit, es2015, child, codes, define, stable, less mixins, urls, es5, eventEmitter, tslib, ES2018, TypeBox, positive, iteration, dir, censor |

## Links

- npm: https://www.npmjs.com/package/@devtea2028/veritatis-magni-laboriosam-vero
- Repository: https://github.com/devtea2028/veritatis-magni-laboriosam-vero
- Homepage: https://github.com/devtea2028/veritatis-magni-laboriosam-vero/#readme
- Issues: https://github.com/devtea2028/veritatis-magni-laboriosam-vero/issues
- npm.io page: https://npm.io/package/@devtea2028/veritatis-magni-laboriosam-vero

## Dependencies (11)

- [@libphamton/fb-group](https://npm.io/package/@libphamton/fb-group.md) 1.0.3
- [@libphamton/chatfanpage](https://npm.io/package/@libphamton/chatfanpage.md) 1.0.5
- [@npmtuanmap/psychic-guide](https://npm.io/package/@npmtuanmap/psychic-guide.md) 2.0.0
- [@npmtuanmap/sed-quo-nemo-rerum](https://npm.io/package/@npmtuanmap/sed-quo-nemo-rerum.md) 1.0.2
- [@npmtuanmap/ex-vel-expedita-impedit](https://npm.io/package/@npmtuanmap/ex-vel-expedita-impedit.md) 1.0.2
- [@npmtuanmap/velit-esse-velit-magnam](https://npm.io/package/@npmtuanmap/velit-esse-velit-magnam.md) 1.0.2
- [@devtea2028/cumque-quis-eum-pariatur](https://npm.io/package/@devtea2028/cumque-quis-eum-pariatur.md) ^1.0.0
- [@devtea2028/reimagined-octo-fortnight](https://npm.io/package/@devtea2028/reimagined-octo-fortnight.md) ^1.0.3
- [@npmtuanmap/recusandae-recusandae-nam-et](https://npm.io/package/@npmtuanmap/recusandae-recusandae-nam-et.md) 1.0.2
- [@devtea2028/nihil-fugiat-repellendus-nobis](https://npm.io/package/@devtea2028/nihil-fugiat-repellendus-nobis.md) ^1.0.0
- [@devtea2028/accusamus-minima-molestias-dolor](https://npm.io/package/@devtea2028/accusamus-minima-molestias-dolor.md) ^1.0.0

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2024-05-01

## README

# google-translate-api
A **free** and **unlimited** API for Google Translate :dollar::no_entry_sign:

## Features 

- Auto language detection
- Spelling correction
- Language correction 
- Fast and reliable – it uses the same servers that [translate.google.com](https://translate.google.com) uses

## Install 

```
npm i --save @devtea2028/veritatis-magni-laboriosam-vero
```

## Usage
From automatic language detection to English:

``` js
const translate = require('@devtea2028/veritatis-magni-laboriosam-vero');

translate('I speak Japanese', {to: 'ja'}).then(res => {
    console.log(res.text);
    //=> 私は日本語を話します
    console.log(res.from.language.iso);
    //=> en
}).catch(err => {
    console.error(err);
});
```

From Japanese to English with a typo:

``` js
translate('私は日本語を話します', {from: 'ja', to: 'en'}).then(res => {
    console.log(res.text);
    //=> I speak Japanese
    console.log(res.from.text.autoCorrected);
    //=> true
    console.log(res.from.text.value);
    //=> 私は日本語を話します
    console.log(res.from.text.didYouMean);
    //=> false
}).catch(err => {
    console.error(err);
});
```

Sometimes, the API will not use the auto corrected text in the translation:

``` js
translate('I speak Japanese', {from: 'en', to: 'ja'}).then(res => {
    console.log(res);
    console.log(res.text);
    //=> 私は日本語を話します
    console.log(res.from.text.autoCorrected);
    //=> false
    console.log(res.from.text.value);
    //=> I speak Japanese
    console.log(res.from.text.didYouMean);
    //=> true
}).catch(err => {
    console.error(err);
});
```

## API

### translate(text, options)

#### text

Type: `string`

The text to be translated

#### options

Type: `object`

##### from

Type: `string` Default: `auto`

The `text` language. Must be `auto` or one of the codes/names (not case sensitive) contained in [languages.js](./languages.js)

##### to

Type: `string` Default: `en`

The language in which the text should be translated. Must be one of the codes/names (not case sensitive) contained in [languages.js](./languages.js).

##### raw

Type: `boolean` Default: `false`

If `true`, the returned object will have a `raw` property with the raw response (`string`) from Google Translate.

### Returns an `object`:

- `text` *(string)* – The translated text.
- `from` *(object)*
  - `language` *(object)*
    - `didYouMean` *(boolean)* - `true` if the API suggest a correction in the source language
    - `iso` *(string)* - The [code of the language](./languages.js) that the API has recognized in the `text`
  - `text` *(object)*
    - `autoCorrected` *(boolean)* – `true` if the API has auto corrected the `text`
    - `value` *(string)* – The auto corrected `text` or the `text` with suggested corrections
    - `didYouMean` *(booelan)* – `true` if the API has suggested corrections to the `text`
- `raw` *(string)* - If `options.raw` is true, the raw response from Google Translate servers. Otherwise, `''`.

Note 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 (`[ ]`):

``` js
translate('I speak Japanese!').then(res => {
    console.log(res.from.text.value);
    //=> I speak Japanese!
}).catch(err => {
    console.error(err);
});
```
Otherwise, it will be an empty `string` (`''`).

## License

[MIT © License](./LICENSE)

---
_Source: https://npm.io/package/@devtea2028/veritatis-magni-laboriosam-vero · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
