# import-client

> an import client for the ecollect API

Latest version **1.0.2** (published 2020-07-09) · ISC license · 0 weekly downloads

## Install

```sh
npm install import-client
pnpm add import-client
yarn add import-client
bun add import-client
```

## 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.2 |
| Published | 2020-07-09 |
| First published | 2020-07-06 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 6.8 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Yoan Sredkov |
| Maintainers | joan41868 |

## Links

- npm: https://www.npmjs.com/package/import-client
- Repository: https://github.com/joan41868/import-client-js
- Homepage: https://github.com/joan41868/import-client-js#readme
- Issues: https://github.com/joan41868/import-client-js/issues
- npm.io page: https://npm.io/package/import-client

## Dependencies (2)

- [csv-parse](https://npm.io/package/csv-parse.md) ^4.10.1
- [json-format](https://npm.io/package/json-format.md) ^1.0.1

## Recent versions

- 1.0.2 (latest) — 2020-07-09
- 1.0.1 — 2020-07-06
- 1.0.0 — 2020-07-06

## README

# import-client-js

### import-client-js is a tool, made for lazy imports.
### It has the capability to read CSVs, write them into .json files, and later bombard RESTful APIs with the very same files.
### In order to import objects, you should use a CSV,  and specify a mapping callback for the DataConvertor class, something like:
```js
const formattedData =  convertor.convertDataArrayWithCallback(unformattedData, (element)=>{
    const {First_name, Last_Name} = element;
    
    const obj = {
        firstName: First_name,
        lastName: Last_Name,
    }
    return obj;
});
```
## By default, all columns containing spaces, "-" or parenthesis will have these characters replaced by "_"

---
_Source: https://npm.io/package/import-client · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
