2.3.18 β€’ Published 4 years ago

js-packtools v2.3.18

Weekly downloads
45
License
MIT
Repository
github
Last release
4 years ago


πŸ€·β€ What is JS-PackTools?

πŸ‘¨β€πŸ« This is a repository of utilities. What started out as a couple of ideas quickly turned into a class that grouped together various types of functionality. The intention of this package is to group a set of helpers and / or utilities, to facilitate routine work, especially related to Backend in node and webScraping.

πŸ’¬ Welcome to the JS PackTools documentation. It will help you get started fast. If you're having trouble, you can find help and answers on our Gitter channel. We have also incorporated a WhatsApp group, with the entire development team if you want to be part of it.

Requirement

Installation

can you use by default npm

npm i js-packtools -S

or your can use yarn

yarn add js-packtools

how is it used

Only instances the library and ready! Parentheses at the end allow you to pass values to the constructor.

const jsPackTools = require("js-packtools")();
//ready to be used... easy, right?

You can also order only the features you need. using By using the destructuring assignment method, we can simplify things even more.

const { capitalLetter, modStart } = require("js-packtools")();

- List available functions

You can use the jsPackTools.info().names function to display a list of available functions

 jsPackTools.info().names; 

//"allEqual"
//"capitalLetter"
//"clearFolders"
//"createFolders"
//"csvToJson"
//"customDate"
//"dayOfYear"
//"deleteFile"
//"differenceDay"
//"everyOrNone"
//"formatSeconds"
// ... 

Try it yourself in https://runkit.com/embed/47xmru66fj0s

- See a details of the functions

Can use the name of function in info E.g. jsPackTools.info().customDateThis generates in response an object like this

{
    category    : "Time/Date"
    description : "It's a date control. Without parameters give the current date, use the parameters to customize its functionality."
    name        : "customDate"
    test        : null
    version     : "1.0.0"
}

Try it yourself in https://runkit.com/embed/aqbxbxzkrkdw

- Using one of these functions

In Js-PackTools each function fulfills a specific objective, but it can solve hundreds of different problems. Each function has its section in the documentation that will allow you to know in detail what the possibilities of said function are.

For example, the validateYear() function can have many implications. (see image) carbon (4)

Content list

The functions of this package are divided into categories. to make it easier to find a function that is out of line with your needs.


🧾 Arrays/Object

Functions NameversionCategoryDescription
🌱 allEqual2.0.0Arrays/ObjectThis snippet checks whether all elements of the array are equal.
🌱 everyOrNone1.0.0Arrays/ObjectThis snippet returns true if the predicate function returns true for a...
🌱 groupBy1.0.0Arrays/ObjectSort the object by placing the value of the assigned property as key
🌱 objectFilter1.1.2Arrays/ObjectThis fragment allows you to filter an object and return the key and it...

✍ String

Functions NameversionCategoryDescription
🌱 capitalLetter2.0.0Stringcapitalize the first letter of a sentence or all letters if second par...
🌱 modEnd1.0.1StringUsing a string to create a new string with new size inverse to modStar...
🌱 modStart1.0.1StringUsing a string to create a new string with new size.

πŸ“ Path/Files

Functions NameversionCategoryDescription
🌱 clearFolders1.0.0Path/FilesThis simply clear the content a folder.
🌱 createFolders1.0.0Path/FilesThis create a folder whit sub-folder of date by default if param `with...
🌱 deleteFile1.0.0Path/FilesCheck if the file exists before deleting
🌱 getFinalPath1.0.0Path/FilesCreate structure of folders with parameters in constructor.
🌱 renameFiles1.0.0Path/FilesThis function rename a batch of files with current date or token uniqu...
🌱 validateDir1.0.0Path/FilesValidate if there is a route. if not, create this route.

↔ convert

Functions NameversionCategoryDescription
🌱 csvToJson1.0.0convertThis read a document CSV and convert in a Object Javascript (JSON).
🌱 jsonToCsv1.0.1convertFunction for convert JSON to CSV

⏰ Time/Date

Functions NameversionCategoryDescription
🌱 customDate1.0.0Time/DateIt's a date control. Without parameters give the current date, use the...
🌱 dayOfYear1.0.0Time/DateThis snippet gets the day of the year from a Date object.
🌱 differenceDay1.0.0Time/DateThis simply clear the content a folder.
🌱 formatSeconds1.0.1Time/DateThis only format a value float
🌱 generateRageDate1.0.0Time/DateThis function allows you to separate a given date in the number of day...
🌱 increaseDays1.0.0Time/DateAdd days to date, can defined a maxDate.
🌱 objectToDate1.0.0Time/DateGenerate a object with date details.
🌱 parseDate1.0.1Time/DateUsing a string and a format transform the string in date.
🌱 timeToDate1.0.1Time/Datereturn the time between two dates, or a date and now
🌱 validateYear1.0.0Time/DateCan be current year or spend the year to validate

βœ” validate

Functions NameversionCategoryDescription
🌱 is1.0.1validateIs a function for evaluate to type of element

🌐 global

Functions NameversionCategoryDescription
🌱 writeLog1.0.0globalwrite file .log in folder default of class.
🌱 writeLogError1.0.0globalwrite file .log in folder default of class.
🌱 log1.0.0globalIt integrates the functions registry of errors and registry of executi...

:seedling: Completed :fire: In Development :speech_balloon: proposal β›” deprecated

You can review the details of each function bif you have any questions about where to start contributing.y clicking on their links. for more information enter DocumentaciΓ³n API.

contributor

Take a look at our document CONTRIBUTING.md to start configuring the repository. If you are looking for something to contribute. You can review our project in Trello You can also contact our channel Gitter if you have any questions about where to start contributing.

Thanks to these people who have helped and motivated to improve this tool more and more.

Diego AndrΓ©sGustavo CacharucoJesΓΊs PΓ©rez

License

this repository is under a license MIT Copyright 2019 | All rights reserved to Jasp402

2.3.17

4 years ago

2.3.18

4 years ago

2.3.15

4 years ago

2.3.14

4 years ago

2.3.13

4 years ago

2.3.12

4 years ago

2.3.11

4 years ago

2.3.9

4 years ago

2.3.10

4 years ago

2.3.8

4 years ago

2.3.7

4 years ago

2.3.6

4 years ago

2.3.2

4 years ago

2.3.4

4 years ago

2.3.3

4 years ago

2.3.5

4 years ago

2.3.1

4 years ago

2.2.5

4 years ago

2.2.4

4 years ago

2.2.3

4 years ago

2.2.2

4 years ago

2.2.1

4 years ago

2.2.0

4 years ago

2.1.2

4 years ago

2.0.0

4 years ago

2.1.1

4 years ago

1.9.5

4 years ago

1.9.4

4 years ago

1.9.3

4 years ago

1.9.2

4 years ago

1.9.1

4 years ago

1.9.0

4 years ago

1.7.1

4 years ago

1.7.0

4 years ago

1.6.2

4 years ago

1.6.1

5 years ago

1.6.0

5 years ago

1.5.0

5 years ago

1.4.1

5 years ago

1.4.0

5 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.1

5 years ago

0.10.10

5 years ago

0.10.9

5 years ago

0.10.8

5 years ago

0.10.7

5 years ago

0.10.6

5 years ago

0.10.5

5 years ago

0.10.4

5 years ago

0.10.3

5 years ago

0.10.2

5 years ago

0.10.1

5 years ago

0.10.0

5 years ago

0.9.0

5 years ago

0.8.1

5 years ago

0.8.0

5 years ago

0.7.4

5 years ago

0.7.3

5 years ago

0.7.2

5 years ago

0.7.1

5 years ago

0.7.0

5 years ago

0.6.1

5 years ago

0.6.0

5 years ago

0.5.0

5 years ago

0.4.1

5 years ago

0.4.0

5 years ago

0.3.5

5 years ago

0.3.4

5 years ago

0.3.3

5 years ago

0.3.2

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.21

5 years ago

0.1.20

5 years ago

0.1.19

5 years ago

0.1.18

5 years ago

0.1.17

5 years ago

0.1.16

5 years ago

0.1.15

5 years ago

0.1.14

5 years ago

0.1.13

5 years ago

0.1.12

5 years ago

0.1.11

5 years ago

0.1.10

5 years ago

0.1.9

5 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago