# local-uri

> Generates a local URI from a String or Typed Array, with fallbacks for older browsers

Latest version **1.0.0** (published 2015-05-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install local-uri
pnpm add local-uri
yarn add local-uri
bun add local-uri
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2015-05-17 |
| First published | 2015-05-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Hugh Kennedy |
| Maintainers | hughsk |
| Keywords | local, uri, blob, url, createURL, data, generate, browser, browserify |

## Links

- npm: https://www.npmjs.com/package/local-uri
- Repository: https://github.com/hughsk/local-uri
- Issues: https://github.com/hughsk/local-uri/issues
- npm.io page: https://npm.io/package/local-uri

## Dependencies (1)

- [is-typedarray](https://npm.io/package/is-typedarray.md) ^1.0.0

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2015-05-17

## README

# local-uri
![](http://img.shields.io/badge/stability-stable-orange.svg?style=flat)
![](http://img.shields.io/npm/v/local-uri.svg?style=flat)
![](http://img.shields.io/npm/dm/local-uri.svg?style=flat)
![](http://img.shields.io/npm/l/local-uri.svg?style=flat)

Generates a local URI from a String or Typed Array, with fallbacks for older
browsers.

## Usage

[![NPM](https://nodei.co/npm/local-uri.png)](https://nodei.co/npm/local-uri/)

### `uri = createURI(data, type)`

`data` is a String or Typed Array (e.g. `Float32Array`), and will be the content
recieved when the `uri` is requested.

`type` is the mime type to use for the URI. Defaults to
`text/plain;charset=US-ASCII`.

``` javascript
var createURI = require('local-uri')
var xhr       = require('xhr')

var uri = createURI('hello world!')

xhr({ uri: uri }, function(err, res, body) {
  console.log(body) // "hello world!"
})
```

## License

MIT. See [LICENSE.md](http://github.com/hughsk/local-uri/blob/master/LICENSE.md) for details.

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