@5pad/5pad-js
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

@5pad/js

An isomorphic JavaScript client for 5pad.cz

Usage

First of all, you need to install the library:

npm install @5pad/js

or

yarn add @5pad/js

Then you're able to import the library and create an API client:

import { createClient } from "@5pad/5pad-js";

const client = createClient("<API_KEY>");

Now, you can use API:

// name only
client.getDeclination({ name: "Petr" });
// { "name": "Petře" }

// name and last name
client.getDeclination({ name: "Petr", lastName: "Svoboda" });
// { "name": "Petře", "lastName": "Svobodo" }

// provide an optional 'sex' parameter for better accuracy
client.getDeclination({ name: "Petra", lastName: "Svobodová", sex: "f" });
// { "name": "Petro", "last_name": "Svobodová" }

Package Sidebar

Install

npm i @5pad/5pad-js

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

17 kB

Total Files

8

Last publish

Collaborators

  • mrfullset