Socket
Socket
Sign inDemoInstall

@smartsoft001/utils

Package Overview
Dependencies
8
Maintainers
1
Versions
722
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @smartsoft001/utils

## Usage


Version published
Maintainers
1
Install size
1.53 MB
Created

Readme

Source

@smartsoft001/utils

Usage

npm i @smartsoft001/utis

ArrayService

Methods:

addItemcreating new array with pushed item
removeItemcreating new array without item
sortreturn sorted array

GuidService

Methods:

createcreating guid string

NipService

Methods:

isValid(nip: string)check valid nip format
isInvalid(nip: string)check invalid nip format

ObjectService

Methods:

createByType(data: any, type: any): Tcreate object with data
removeTypes(obj: any): anyremove object type from data

PasswordService

Methods:

hash(p: string): Promisehash password text
compare(p: string, h: string): Promisecompare password text with hashed text

PeselService

Methods:

isValid(pesel: string)check pesel format
isInvalid(pesel: string)check invalid pesel format

SpecificationService

Methods:

valid(value: T, spec: { criteria: any }, custom: ISpecificationCustom = null): booleanchecking if the value meets the specifications
invalid(value: T, spec: { criteria: any }, custom: ISpecificationCustom = null): booleanchecking if the object does not meet the specifications
getSqlCriteria(spec: { criteria: any }): stringconvert specification to sql

ZipCodeService

Methods:

isValid(code: string)check zip code format
isInvalid(code: string)check invalid zip code format

FAQs

Last updated on 19 Jan 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