Socket
Book a DemoInstallSign in
Socket

@crud/core

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@crud/core

Great library for CRUD operations in Javascript

2.1.4
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

#CRUD Operations in Javascript

This is a great library which provides an eloquent interface for CRUD operations in javascript. Also, it has built in support for Webpack and Typescript.

The ability to be fully customized is what make this library suitable for any javascript framework, such as Angular, ReactJS or Vue.js.

The CrudRequest class can be fully customized via callbacks for every action.

Installation

npm install @crud/core

or

yarn add @crud/core

Usage

import {CrudRequest} from "@crud/core";

const crud = new CrudRequest();

Config

import {ReQuestOptions} from "@crud/core";

crud.config((config:RequestOptions)=>{
    
    config.callbacks.redirect = (to:string)=>{
        window.location.href = to;
    }
    
    config.callbacks.reload = ()=>{
        window.location.reload();
    }
    
    return config;
})

Methods in CrudRequest

SignatureDescription
send(options: RequestOptions)=>Promise<any>Used to send the request to send data to server and get the response
create(url:string, options: RequestOptions)=>Promise<any>Used to send a create request to server using the send method, but overrides some options to modify the request.
retrieve(url: string, options: RequestOptions)=>Promise<any>Used to send a retrieve request to server using the send method, but overrides some options to modify the request.
update(url:string, options: RequeestOptions)=>Promise<any>Used to send an update request to server using the send method, but overrides some options to modify the request.
delete(url:string, options: RequeestOptions)=>Promise<any>Used to send a delete request to server using the send method, but overrides some options to modify the request.

FAQs

Package last updated on 28 Mar 2019

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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.