New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

fetch-inject

Package Overview
Dependencies
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fetch-inject - npm Package Compare versions

Comparing version 1.5.5 to 1.5.6

2

dist/fetch-inject.es.js
/**
* Fetch Inject v1.5.5
* Fetch Inject v1.5.6
* Copyright (c) 2017 Josh Habdas

@@ -4,0 +4,0 @@ * @licence MIT

/**
* Fetch Inject v1.5.5
* Fetch Inject v1.5.6
* Copyright (c) 2017 Josh Habdas

@@ -4,0 +4,0 @@ * @licence MIT

/**
* Fetch Inject v1.5.5
* Fetch Inject v1.5.6
* Copyright (c) 2017 Josh Habdas

@@ -4,0 +4,0 @@ * @licence MIT

/**
* Fetch Inject v1.5.5
* Fetch Inject v1.5.6
* Copyright (c) 2017 Josh Habdas

@@ -4,0 +4,0 @@ * @licence MIT

/**
* Fetch Inject v1.5.5
* Fetch Inject v1.5.6
* Copyright (c) 2017 Josh Habdas

@@ -4,0 +4,0 @@ * @licence MIT

/**
* Fetch Inject v1.5.5
* Fetch Inject v1.5.6
* Copyright (c) 2017 Josh Habdas

@@ -4,0 +4,0 @@ * @licence MIT

{
"name": "fetch-inject",
"version": "1.5.5",
"version": "1.5.6",
"description": "Dynamically inline assets into the DOM using Fetch Injection.",

@@ -5,0 +5,0 @@ "module": "dist/fetch-inject.esm.js",

@@ -1,22 +0,43 @@

# Fetch Inject
<h1 align="center">Fetch Inject</h1>
[![Build Status](https://travis-ci.org/jhabdas/fetch-inject.svg?branch=master)](https://travis-ci.org/jhabdas/fetch-inject)
[![Standard - JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](http://standardjs.com/)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
[![Join the chat at https://gitter.im/fetch-inject/Lobby](https://badges.gitter.im/fetch-inject/Lobby.svg)](https://gitter.im/fetch-inject/Lobby)
[![NPM Downloads per Month](https://img.shields.io/npm/dm/fetch-inject.svg)](https://www.npmjs.com/package/fetch-inject)
[![NPM Version](https://img.shields.io/npm/v/fetch-inject.svg)](https://www.npmjs.com/package/fetch-inject)
<p align="center">
<strong>A library used to dynamically inline assets into the DOM using Fetch Injection.</strong>
</p>
Dynamically inline assets into the DOM using Fetch Injection.
<p align="center">
<a href="https://travis-ci.org/jhabdas/fetch-inject">
<img src="https://travis-ci.org/jhabdas/fetch-inject.svg?branch=master" alt="Build Status">
</a>
<a href="https://cdn.jsdelivr.net/fetch-inject/latest/fetch-inject.min.js">
<img src="http://img.badgesize.io/https://cdn.jsdelivr.net/fetch-inject/latest/fetch-inject.min.js?compression=gzip" alt="Compressed Release Size">
</a>
<a href="https://www.npmjs.com/package/fetch-inject">
<img src="https://img.shields.io/npm/dm/fetch-inject.svg" alt="NPM downloads per month">
</a>
<a href="https://www.npmjs.com/package/fetch-inject">
<img src="https://img.shields.io/npm/v/fetch-inject.svg" alt="Latest NPM version">
</a>
</p>
## Wut? Fetch Injection?
Fetch Injection is a website performance optimization technique for loading resources into the DOM asynchronously. Use it to inject CSS or JavaScript to your page (even across the network), on-demand.
## Pfft. I use a bundler. It does everything.
And **how big** are your bundles currently? Does your bundler _really_ support Tree Shaking? [Or have you been mislead](https://medium.com/@jhabdas/sean-thanks-for-your-continued-work-on-webpack-465572df6208)? Bruh, do you even [Isomorphic](https://habd.as/talks/isomorphic-rendering-react/)?
_Whatever. I'll just use `async` scripts._
Oh, really? And how will you [manage asynchronous JavaScript dependencies](https://hackcabin.com/post/managing-async-dependencies-javascript/)? How many loaders and plug-in dependencies will you need to add a single library requiring a combination of JavaScript, CSS and Font Icons? Dude, are you even building a website anymore?
_Fine. Tell me more..._
## Purpose
Improve website performance and UX by fetching external assets and inlining them into the DOM programmatically. Get a Promise in return.
Improve website performance and UX by fetching resources and inlining them into the DOM programmatically. Get a Promise in return.
- Wraps [Fetch API](http://devdocs.io/dom/fetch_api)
- No hard dependencies
## Background
Learn about _Fetch Injection_ and [why I created this library](https://hackcabin.com/post/managing-asynchronous-dependencies-javascript/) on **Hack Cabin**.
Learn about _Fetch Injection_ and [why I created this library](https://hackcabin.com/post/managing-async-dependencies-javascript/) on **Hack Cabin**.

@@ -23,0 +44,0 @@ Don't like to read? Here's a playground:<br>

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