New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

conversikit

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

conversikit

convert anything

  • 1.7.6
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
13
decreased by-62.86%
Maintainers
1
Weekly downloads
 
Created
Source

conversikit

convert anything

toConvertUpperCase(string) :- its used for update all letter to upper case

toConvertLowerCase(string) :- its used for update all letter to lower case

toConvertCapitalizeCase(string) :- Convert into capitalize word.

toConvertArrayJson(array) :- Convert a array to json format.

toConvertJsonArray(array) :- Convert a Json to array format.

toConvertCamelCase(string) :- Convert a string in to camel case.

toConvertCSVFile(data,fileName) :- Convert a array of json data into csv file.

Example

const conversikit = require('conversikit');

const d = async() =>{

let data = await conversikit.toConvertUpperCase("thank you my man"); //THANK YOU MY MAN

let data1 = await conversikit.toConvertLowerCase("thank you my Man"); //thank you my man

let data2 = await conversikit.toConvertCapitalizeCase("thank you my Man"); //Thank You My Man

}

d();

Convert Array to JSON

const conversikit = require('conversikit');

let data = [ "name", "Ankit", "roll", "10", "age", "17", "gender", "Male", "address", "123 Main Street", "city", "Exampleville", "state", "ABC", "zipcode", "12345", "email", "ankit@example.com", "phone", "555-555-5555", "parent_name", "Parent Name", "parent_phone", "555-555-5556", "parent_email", "parent@example.com", "guardian_name", "Guardian Name", "guardian_phone", "555-555-5557", "guardian_email", "guardian@example.com", "emergency_contact", "Emergency Contact", "emergency_phone", "555-555-5558", "emergency_relationship", "Relative", "class", "10th Grade", "section", "A", "school", "Random High School" ];

let data = await conversikit.toConvertArrayJson(data); console.log("Result = ",data);

Output --->
Result =
{
  name: 'Ankit',
  roll: '10',
  age: '17',
  gender: 'Male',
  address: '123 Main Street',
  city: 'Exampleville',
  state: 'ABC',
  zipcode: '12345',
  email: 'ankit@example.com',
  phone: '555-555-5555',
  parent_name: 'Parent Name',
  parent_phone: '555-555-5556',
  parent_email: 'parent@example.com',
  guardian_name: 'Guardian Name',
  guardian_phone: '555-555-5557',
  guardian_email: 'guardian@example.com',
  emergency_contact: 'Emergency Contact',
  emergency_phone: '555-555-5558',
  emergency_relationship: 'Relative',
  class: '10th Grade',
  section: 'A',
  school: 'Random High School'

}

If duplicate key is present in array ->

let data = ["hi", "hello", "thank man", "you","good","hi", "hello", "thank man", "you","good","hi", "hello", "thank man", "you","good"];

let data1 = await conversikit.toConvertArrayJson(data);

Result:- { hi: 'hello', 'thank man': 'you', good: 'hi', hello: 'thank man', you: 'good', d_hi: 'hello', 'd_thank man': 'you', d_good: '' }

Convert JSON to Array

const conversikit = require('conversikit');

let data = { "name": "arun", "email": "iit1.pradhan3517@gmail.com" }

let data = await conversikit.toConvertJsonArray(data); console.log("Result = ",data);

Output --->
Result =  [ 'name', 'arun', 'email', 'iit1.pradhan3517@gmail.com' ]

Convert string into camel case

const conversikit = require('conversikit');

let data = "thank you" let data1 = ""; let data2 = "thank"; let data3 = "we are programmer";

let result = await conversikit.toConvertCamelCase(data); // thankYou

let result1 = await conversikit.toConvertCamelCase(data1); // ""

let result2 = await conversikit.toConvertCamelCase(data2); // thank

let result3 = await conversikit.toConvertCamelCase(data3); //weAreProgrammer

Convert a array json data into csv file

let data = [{name:"test1",age:10},{name:"test2",age:30}] //etc let filename ="example.csv"; let result = await conversikit.convertToCSVFile(data, filename);

Thank You

Keywords

FAQs

Package last updated on 22 Oct 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc