Socket
Book a DemoInstallSign in
Socket

servidio

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

servidio

JavaScript Frontend Services Library

unpublished
latest
Source
npmnpm
Version
3.1.1
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Servidio

JavaScript Frontend Services

NPM Version GitHub Top Language Code Size

NPM Downloads Codacy Badge Maintainability

Summary

Overview
Package
CDN
Download
Content
Test

Overview

Servidio is a JavaScript Frontend Service Library.
You will find some Services with Checkers, Fetchers, Getters & Setters.
Servidio use only Axios as dependency.

NPM : npm i servidio
or
Yarn : yarn add servidio

Download

Latest Release
or
git clone https://github.com/philippebeck/servidio.git
or
Master ZIP

Content

Checkers part :

  • checkRange(value, message, min, max) : check range between min & max
  • checkRegex(value, message, regex) : check value with regex
  • checkRole(userRole, role) check role between admin, editor or user

Fetchers part :

  • setAxios(token, type) set axios params
  • postData(url, data, token, type) post data with axios
  • getData(url, token, type) get data with axios
  • putData(url, data, token, type) put data with axios
  • deleteData(url, token, type) delete data with axios

Getters part :

  • getCats(items) get categories from an array of objects
  • getItemName(id, items) get image name
  • getItemsByCat(items, sortBy) get items by category property

Setters part :

  • setError(error) : set error message
  • setGlobalMeta(lang, icon) set html lang & favicon
  • setMeta(title, description, url, image) set all meta for pages

Test

You can run unit tests with Jest :
npm test

Keywords

JavaScript

FAQs

Package last updated on 03 Jan 2024

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