# nofactor

> ```javascript var nofactor = require("nofactor"), nostr = nofactor.string;

Latest version **4.0.2** (published 2015-09-01) · BSD license · 0 weekly downloads

## Install

```sh
npm install nofactor
pnpm add nofactor
yarn add nofactor
bun add nofactor
```

## 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 | 4.0.2 |
| Published | 2015-09-01 |
| First published | 2013-07-22 |
| Weekly downloads | 0 |
| License | BSD |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | architectd |

## Links

- npm: https://www.npmjs.com/package/nofactor
- Repository: https://github.com/classdojo/nofactor.js
- Homepage: https://github.com/classdojo/nofactor.js#readme
- Issues: https://github.com/classdojo/nofactor.js/issues
- npm.io page: https://npm.io/package/nofactor

## Dependencies (3)

- [he](https://npm.io/package/he.md) ^0.4.1
- [factories](https://npm.io/package/factories.md) 0.0.x
- [protoclass](https://npm.io/package/protoclass.md) 0.0.x

## Recent versions

- 4.0.2 (latest) — 2015-09-01
- 4.0.1 — 2015-09-01
- 4.0.0 — 2015-09-01
- 3.0.0 — 2015-05-22
- 2.0.0 — 2015-04-22
- 1.0.1 — 2015-04-21
- 1.0.0 — 2015-02-06
- 0.0.57 — 2014-09-02
- 0.0.56 — 2014-09-02
- 0.0.55 — 2014-08-27
- 0.0.54 — 2014-08-27
- 0.0.52 — 2014-08-27
- 0.0.51 — 2014-08-27
- 0.0.50 — 2014-08-27
- 0.0.49 — 2014-08-27
- … 42 more at https://npm.io/package/nofactor/versions

## README

Nofactor is a light DOM API wrapper that's supported in node.js, and in the browser (IE 6+, Chrome, Firefox, Opera, Safari). It's used for DOM creation / manipulation in [paperclip.js](https://github.com/mojo-js/paperclip.js). [![Alt ci](https://travis-ci.org/mojo-js/nofactor.js.png)](https://travis-ci.org/mojo-js/nofactor.js)
[![Coverage Status](https://coveralls.io/repos/classdojo/nofactor.js/badge.png)](https://coveralls.io/r/classdojo/nofactor.js)


Example:

```javascript
var nofactor = require("nofactor"),

// pick the default DOM adapter - node, or browser (thin).
nostr = nofactor.string; 

var element = nostr.createElement("div"),
element.setAttribute("id", "test");


console.log(element.toString()); //<div id="test"></div>
```

Custom Elements:

```javascript
var nofactor = require("nofactor");
nostr = nofactor.custom(nofactor.string);

// fix toString for BR tags
nostr.registerElement("br", nofactor.string.Element.extend({
	toString: function () {
		return "<br />"
	}
}));

var element = nostr.createElement("div");
element.appendChild(nostr.createElement("br"));
console.log(element.toString()); // <div><br /></div>
```

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