0.1.6 • Published 7 years ago

sketch-polyfill-fetch-babel-safe v0.1.6

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

sketch-polyfill-fetch-babel-safe

This is a (hopefully temporary) fork of sketch-polyfill-fetch that uses cocoascript-class-babel-safe, to allow safe transpilation to ES5.

A fetch polyfill for sketch inspired by unfetch. It is automatically included (when needed) when using skpm.

Installation

npm i -S sketch-polyfill-fetch

Usage

import fetch from 'sketch-polyfill-fetch'

fetch("https://google.com")
  .then(response => response.text())
  .then(text => console.log(text))
  .catch(e => console.error(e))