# insert-stylesheet

> Insert a stylesheet into the .

Latest version **0.1.0** (published 2014-09-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install insert-stylesheet
pnpm add insert-stylesheet
yarn add insert-stylesheet
bun add insert-stylesheet
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2014-09-28 |
| First published | 2014-05-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Michael Rhodes |
| Maintainers | michaelrhodes |
| Keywords | stylesheet, insert, dom, browser, browserify |

## Links

- npm: https://www.npmjs.com/package/insert-stylesheet
- Repository: https://github.com/michaelrhodes/insert-stylesheet
- Issues: https://github.com/michaelrhodes/insert-stylesheet/issues
- npm.io page: https://npm.io/package/insert-stylesheet

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 0.1.0 (latest) — 2014-09-28
- 0.0.0 — 2014-05-22

## README

# insert-stylesheet
insert-stylesheet is a companion to substack’s [insert-css](https://github.com/substack/insert-css) module that inserts a stylesheet `<link>` into the `<head>`, instead of a css string.

[![Browser support](https://ci.testling.com/michaelrhodes/insert-stylesheet.png)](https://ci.testling.com/michaelrhodes/insert-stylesheet)

## Install
```sh
$ npm install insert-stylesheet
```

## API
```
  insert(stylesheet-url, [options, callback])
```

### Usage
```js
var insert = require('insert-stylesheet')

insert('/styles/mine.css')
insert('http://your-site.com/stylesheet.css')

// Returns the element
var link = insert('/styles/yours.css')

insert('/styles/well.css', function (err, link) {})

// Add stylesheet at the top of <head>
insert('/styles/widget.css', { prepend: true }) 
```

### License
[MIT](http://opensource.org/licenses/MIT)

---
_Source: https://npm.io/package/insert-stylesheet · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
