Skip to content

anianj/sketch-polyfill-fetch

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sketch-polyfill-fetch

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

Installation

⚠️ There is no need to install it if you are using skpm!

npm i -S sketch-polyfill-fetch

Usage

Using skpm:

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

Without skpm:

const fetch = require("sketch-polyfill-fetch");

var onRun = function() {
  fetch("https://google.com")
    .then(response => response.text())
    .then(text => console.log(text))
    .catch(e => console.error(e));
};

⚠️ only https URLs are supported due a MacOS limitation

About

A fetch polyfill for sketch

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%