# pseudo-function

> Turn the function object to URL object.

Latest version **0.0.6** (published 2015-04-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install pseudo-function
pnpm add pseudo-function
yarn add pseudo-function
bun add pseudo-function
```

## 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.0.6 |
| Published | 2015-04-18 |
| First published | 2015-01-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | nulltask |
| Maintainers | nulltask |
| Keywords | browserify, worker, webworker |

## Links

- npm: https://www.npmjs.com/package/pseudo-function
- Repository: https://github.com/nulltask/pseudo-function
- Issues: https://github.com/nulltask/pseudo-function/issues
- npm.io page: https://npm.io/package/pseudo-function

## Dependencies (2)

- [blob](https://npm.io/package/blob.md) 0.0.4
- [function-body-regex](https://npm.io/package/function-body-regex.md) 0.0.3

## Recent versions

- 0.0.6 (latest) — 2015-04-18
- 0.0.5 — 2015-01-14
- 0.0.4 — 2015-01-10
- 0.0.3 — 2015-01-10
- 0.0.2 — 2015-01-10

## README

# pseudo-function

[![Build Status](https://travis-ci.org/nulltask/pseudo-function.svg)](https://travis-ci.org/nulltask/pseudo-function)

Turn the function object to URL object. This library is useful to create web workers from inline functions.

## Supported Browsers

- Internet Explorer 11+
- Firefox 12+
- Google Chrome 26+
- Safari 6+
- iOS 6.0+
- Android 4.4+

## Installation

npm:

    $ npm install pseudo-function

bower:

    $ bower install pseudo-function

## Example

```js
// var pfn = window.PseudoFunction; // bower
var pfn = require('pseudo-function'); // browserify

var fn = pfn(function() {
  setInterval(function() {
    self.postMessage(new Date());
  }, 1000);
});

var worker = new Worker(fn);

worker.onmessage = function(e) {
  console.log(e.data);
};

setTimeout(function() {
  worker.terminate();
  fn.revoke();  // clean up pseudo function
  console.log('terminated');
}, 5000);
```

## License

MIT

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