Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

spur.js

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

spur.js

HTTP Get Request Helper

  • 1.1.2
  • unpublished
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Spur.js

Spur.js on NPM Travis

A lightweight HTTP Get Request Helper

Usage

Follow these steps to get started:

Install

Using NPM, install Spur.js, then add it to your package.json dependencies.

$ npm install spur.js --save

Import

Import Spur from node_modules, using any namespace desired.

import spur from 'spur.js'

Call

Spur uses Promises under the hood. Meaning a GET request uses the standard Promise syntax:

spur('url')
  .then(response => {
    // the request is done, and the status === 200
    // ...
  })
  .catch(status => {
    // the request is done, but the status !== 200
    // ...
  })

Because then returns a Promise, you can chain it.

Browser Support

Note: IE does not natively support Promises, but Edge does.

License

MIT. © 2017 Eli Smith

Keywords

FAQs

Package last updated on 19 Jun 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc