1.0.3 • Published 5 years ago

@crud/jquery v1.0.3

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

#CRUD Operations in Javascript

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.
1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago