Socket
Socket
Sign inDemoInstall

00ricardo-utils

Package Overview
Dependencies
128
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    00ricardo-utils

Ricardo Briceño personal JavaScript Util Functions.


Version published
Weekly downloads
10
decreased by-61.54%
Maintainers
1
Install size
27.0 MB
Created
Weekly downloads
 

Readme

Source

00ricardo-utils

Javascript Package for utilities

JavaScript

This is a lightweight low dependency package for development and optimization purposes. It has several utility fuctions for:

  • Array Management
  • Object Management
  • Variable and values validation without TypeScript

Installation

npm i 00ricardo-utils

Array Management Functions

FunctionsDescriptionParametersReturn
removeElementFunction that receives an array and removes an specific element by its index and return a new array.Array, IndexArray
removeEmptyElementsFunction that cleans an array. It removes all NULL, undefined and empty strings from the array.ArrayArray
getUniqueValuesFunction that returns unique values from arrayArrayArray
searchFilteringFunction that returns all instances from an Array based on filtering properties.Array, String, ArrayArray

Object Management Functions

FunctionsDescriptionParametersReturn
removePropertyFunction that receives an object and removes an specific property by its name and return a new Object.Object, Property (String)Object
joinMappingFunction that join 2 arrays through property mapping. It receives 2 arrays and 3 property referencesArray, String, Array,String, StringArray
renamePropertyFunction that renames a Object PropertyArray, String, StringObject
groupByFunction that groups an array of objects by a propertyArray, StringObject
aggregateDataFunction that aggregates an array of objects by a propertyArray, String, StringObject

Validation Functions

FunctionsDescriptionParametersReturn
hasValueFunction that receives a value and checks its type, and returns a boolean indicating whether it has a value.Variable (Object, Array, String, Number, etc)Boolean
hasPropertyFunction that checks if an object has a specific property.Object, Property (String)Boolean
validateEmailFunction that validates an emailStringString

React Custom Hooks

FunctionsDescriptionParametersReturn
useDebounce---
useLocalStorage---

Other Functions

FunctionsDescriptionParametersReturn
readFileInfoFunction that reads a file and give useful information like the name, type, size and Base64 Encode.FileObject
getWordsFunction that returns all words from a String.StringArray
convertTimezoneFunction that converts datetime from a TZ to another. It supports custom datetimesString, String, StringObject

Development

Looking forward to optimize solutions and add new utility functions.

License

MIT

© Ricardo Briceño - Portugal

Keywords

FAQs

Last updated on 18 Mar 2024

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc