1.0.2 • Published 4 years ago

import-client v1.0.2

Weekly downloads
1
License
ISC
Repository
github
Last release
4 years ago

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:

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 "_"

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago