New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

getajax

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

getajax

Smallest possible lib to execute ajax GET call

latest
Source
npmnpm
Version
0.0.3
Version published
Weekly downloads
5
400%
Maintainers
1
Weekly downloads
 
Created
Source

Smallest possible lib for ajax call

A simple and easy way to fetch data from your server.

It is NOT supporting CORS.

It is NOT adding advanced error handling.

It is just supporting simplest possible GET call to the server. If you are building small website and used library size matters - then getajax is created for you!

Minified file size ~157 bytes!

Installation

Using npm

npm install --save getajax

Usage

ES6:

import getajax from "getajax";

CommonJS

require("getajax")

Using function in your code

To fetch something from the server simply execute:

getajax(path, successCallback, exceptionCallback)

Example:

getajax("myfile.json", result => {
  console.log(result);
},
xhr => {
  throw xhr;
})

FAQs

Package last updated on 16 Mar 2017

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