Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jasp402/js-packtools
π A small collection of tools for the development of javascript.
https://github.com/jasp402/js-packtools
helper-functions helper-tool helpers helpers-library jasp402 javascript javascript-library js-packtools nodejs tools utilidades utilities utils utils-lib utils-library
Last synced: about 2 months ago
JSON representation
π A small collection of tools for the development of javascript.
- Host: GitHub
- URL: https://github.com/jasp402/js-packtools
- Owner: jasp402
- License: mit
- Created: 2019-05-05T18:06:40.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-09-07T20:03:17.000Z (over 4 years ago)
- Last Synced: 2024-08-31T10:16:42.919Z (4 months ago)
- Topics: helper-functions, helper-tool, helpers, helpers-library, jasp402, javascript, javascript-library, js-packtools, nodejs, tools, utilidades, utilities, utils, utils-lib, utils-library
- Language: JavaScript
- Homepage: https://jasp402.github.io/js-packtools/#/en/
- Size: 406 KB
- Stars: 6
- Watchers: 4
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
π A small collection of tools for the development of javascript & NodeJS.
***
Getting Started |
API Docs |
help & Support |
Contribute***
## π€·β 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](https://gitter.im/js-packtools/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge).
We have also incorporated a [WhatsApp](https://chat.whatsapp.com/BXDLjGNJaqN0NmzPQ3cjvH) group, with the entire development team if you want to be part of it.## Requirement
- [nodejs](https://nodejs.org/)
- [npm](https://www.npmjs.com/) or [yarn](https://yarnpkg.com/)## Installation
can you use by default `npm`
```npm
npm i js-packtools -S
```or your can use `yarn`
```npm
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.
```js
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](https://javascript.info/destructuring-assignment) method, we can simplify things even more.
```js
const { capitalLetter, modStart } = require("js-packtools")();
```#### - List available functions
You can use the `jsPackTools.info().names` function to display a list of available functions
```js
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().customDate`This 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()](https://jasp402.github.io/js-packtools/#/en/api/v1/validateYear) function can have many implications. (see image)
![carbon (4)](https://user-images.githubusercontent.com/8978470/88460379-72b78200-ce61-11ea-9ecf-6b77b517d770.png)## 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 Name | version | Category | Description |
|---|---|---|---|
|π± [**allEqual**](https://jasp402.github.io/js-packtools/#/en/api/v1/allEqual) | 2.0.0 | Arrays/Object | This snippet checks whether all elements of the array are equal. |
|π± [**everyOrNone**](https://jasp402.github.io/js-packtools/#/en/api/v1/everyOrNone) | 1.0.0 | Arrays/Object | This snippet returns true if the predicate function returns true for a... |
|π± [**groupBy**](https://jasp402.github.io/js-packtools/#/en/api/v1/groupBy) | 1.0.0 | Arrays/Object | Sort the object by placing the value of the assigned property as key |
|π± [**objectFilter**](https://jasp402.github.io/js-packtools/#/en/api/v1/objectFilter) | 1.1.2 | Arrays/Object | This fragment allows you to filter an object and return the key and it... |
>## β String| Functions Name | version | Category | Description |
|---|---|---|---|
|π± [**capitalLetter**](https://jasp402.github.io/js-packtools/#/en/api/v1/capitalLetter) | 2.0.0 | String | capitalize the first letter of a sentence or all letters if second par... |
|π± [**modEnd**](https://jasp402.github.io/js-packtools/#/en/api/v1/modEnd) | 1.0.1 | String | Using a string to create a new string with new size inverse to modStar... |
|π± [**modStart**](https://jasp402.github.io/js-packtools/#/en/api/v1/modStart) | 1.0.1 | String | Using a string to create a new string with new size. |
>## π Path/Files| Functions Name | version | Category | Description |
|---|---|---|---|
|π± [**clearFolders**](https://jasp402.github.io/js-packtools/#/en/api/v1/clearFolders) | 1.0.0 | Path/Files | This simply clear the content a folder. |
|π± [**createFolders**](https://jasp402.github.io/js-packtools/#/en/api/v1/createFolders) | 1.0.0 | Path/Files | This create a folder whit sub-folder of date by default if param `with... |
|π± [**deleteFile**](https://jasp402.github.io/js-packtools/#/en/api/v1/deleteFile) | 1.0.0 | Path/Files | Check if the file exists before deleting |
|π± [**getFinalPath**](https://jasp402.github.io/js-packtools/#/en/api/v1/getFinalPath) | 1.0.0 | Path/Files | Create structure of folders with parameters in constructor. |
|π± [**renameFiles**](https://jasp402.github.io/js-packtools/#/en/api/v1/renameFiles) | 1.0.0 | Path/Files | This function rename a batch of files with current date or token uniqu... |
|π± [**validateDir**](https://jasp402.github.io/js-packtools/#/en/api/v1/validateDir) | 1.0.0 | Path/Files | Validate if there is a route. if not, create this route. |
>## β convert| Functions Name | version | Category | Description |
|---|---|---|---|
|π± [**csvToJson**](https://jasp402.github.io/js-packtools/#/en/api/v1/csvToJson) | 1.0.0 | convert | This read a document CSV and convert in a Object Javascript (JSON). |
|π± [**jsonToCsv**](https://jasp402.github.io/js-packtools/#/en/api/v1/jsonToCsv) | 1.0.1 | convert | Function for convert JSON to CSV |
>## β° Time/Date| Functions Name | version | Category | Description |
|---|---|---|---|
|π± [**customDate**](https://jasp402.github.io/js-packtools/#/en/api/v1/customDate) | 1.0.0 | Time/Date | It's a date control. Without parameters give the current date, use the... |
|π± [**dayOfYear**](https://jasp402.github.io/js-packtools/#/en/api/v1/dayOfYear) | 1.0.0 | Time/Date | This snippet gets the day of the year from a Date object. |
|π± [**differenceDay**](https://jasp402.github.io/js-packtools/#/en/api/v1/differenceDay) | 1.0.0 | Time/Date | This simply clear the content a folder. |
|π± [**formatSeconds**](https://jasp402.github.io/js-packtools/#/en/api/v1/formatSeconds) | 1.0.1 | Time/Date | This only format a value float |
|π± [**generateRageDate**](https://jasp402.github.io/js-packtools/#/en/api/v1/generateRageDate) | 1.0.0 | Time/Date | This function allows you to separate a given date in the number of day... |
|π± [**increaseDays**](https://jasp402.github.io/js-packtools/#/en/api/v1/increaseDays) | 1.0.0 | Time/Date | Add days to date, can defined a maxDate. |
|π± [**objectToDate**](https://jasp402.github.io/js-packtools/#/en/api/v1/objectToDate) | 1.0.0 | Time/Date | Generate a object with date details. |
|π± [**parseDate**](https://jasp402.github.io/js-packtools/#/en/api/v1/parseDate) | 1.0.1 | Time/Date | Using a string and a format transform the string in date. |
|π± [**timeToDate**](https://jasp402.github.io/js-packtools/#/en/api/v1/timeToDate) | 1.0.1 | Time/Date | return the time between two dates, or a date and now |
|π± [**validateYear**](https://jasp402.github.io/js-packtools/#/en/api/v1/validateYear) | 1.0.0 | Time/Date | Can be current year or spend the year to validate |
>## β validate| Functions Name | version | Category | Description |
|---|---|---|---|
|π± [**is**](https://jasp402.github.io/js-packtools/#/en/api/v1/is) | 1.0.1 | validate | Is a function for evaluate to type of element |
>## π global| Functions Name | version | Category | Description |
|---|---|---|---|
|π± [**writeLog**](https://jasp402.github.io/js-packtools/#/en/api/v1/writeLog) | 1.0.0 | global | write file .log in folder default of class. |
|π± [**writeLogError**](https://jasp402.github.io/js-packtools/#/en/api/v1/writeLogError) | 1.0.0 | global | write file .log in folder default of class. |
|π± [**log**](https://jasp402.github.io/js-packtools/#/en/api/v1/log) | 1.0.0 | global | It 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](https://jasp402.github.io/js-packtools/#/en/api).
## contributor
Take a look at our document [CONTRIBUTING.md](https://jasp402.github.io/js-packtools/#/es/contribute) to start configuring the repository.
If you are looking for something to contribute. You can review our project in [Trello](https://trello.com/b/FMUpri2i/js-packtools)
You can also contact our channel [Gitter](https://gitter.im/js-packtools/community) 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Γ©s](https://github.com/dandresfg)|
[Gustavo Cacharuco](https://github.com/Gztabo21) |
[JesΓΊs PΓ©rez](https://github.com/jasp402) |## License
this repository is under a license [MIT](https://raw.githubusercontent.com/jasp402/js-packtools/master/LICENSE)
**Copyright 2019** | All rights reserved to [**Jasp402**](http://jasp402.com/)