Skip to content

Commit ec019e0

Browse files
committed
Add Mocha to devDeps; use local Mocha on test pages; add NPM nodei.co to README.md.
1 parent b6351a2 commit ec019e0

File tree

4 files changed

+12
-9
lines changed

4 files changed

+12
-9
lines changed

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
# is-pure-function #
22

3-
[![NPM version][npm-image]][npm-url] ![dependencies][dependencies-image] [![License MIT][license-image]](LICENSE)
3+
[![NPM version][npm-image]][npm-url] ![dependencies][dependencies-image] [![License MIT][license-image]](LICENSE)
44

5-
Simple and fast ES3-check that function is pure.
5+
[![NPM](https://nodei.co/npm/is-pure-function.png)](https://nodei.co/npm/is-pure-function/)
6+
7+
Simple and fast ES3-check that function is pure.
68
```js
79
/**
810
* @param {function} fn
911
* @param {*} thisArg
1012
* @param {Array} args
1113
* @return {boolean}
1214
*/
13-
function isPureFunction(fn, thisArg, args) {};
15+
function isPureFunction(fn, thisArg, args) {/**...*/};
1416
```
1517
*fn* is pure, if not throw when called with *thisArg* as this and *args* as arguments in global scope.
1618

@@ -126,7 +128,7 @@ $ npm test
126128
```
127129

128130
## License ##
129-
[MIT](LICENSE)
131+
[MIT](LICENSE)
130132

131133
[license-image]: https://img.shields.io/badge/license-MIT-blue.svg "license-image"
132134
[dependencies-image]: https://img.shields.io/gemnasium/mathiasbynens/he.svg?maxAge=2592000 "dependencies-image"

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "is-pure-function",
3-
"version": "1.0.2",
3+
"version": "1.0.3",
44
"description": "Return true, if function is pure.",
55
"main": "src/is-pure-function.js",
66
"scripts": {
@@ -19,6 +19,7 @@
1919
"dependencies": {},
2020
"devDependencies": {
2121
"webpack": ">=1.0.0",
22+
"mocha": "^3.0.2",
2223
"opener": "*"
2324
},
2425
"author": "uid-11222",

test/es3.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!DOCTYPE html><meta charset="utf-8"><title>Mocha tests</title>
2-
<link href="https://cdnjs.cloudflare.com/ajax/libs/mocha/3.0.2/mocha.min.css" rel="stylesheet">
3-
<script src="https://cdnjs.cloudflare.com/ajax/libs/mocha/3.0.2/mocha.min.js"></script>
2+
<link href="../node_modules/mocha/mocha.css" rel="stylesheet">
3+
<script src="../node_modules/mocha/mocha.js"></script>
44
<div id="mocha"></div>
55
<script>mocha.setup('bdd');</script>
66

test/es6.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!DOCTYPE html><meta charset="utf-8"><title>Mocha tests</title>
2-
<link href="https://cdnjs.cloudflare.com/ajax/libs/mocha/3.0.2/mocha.min.css" rel="stylesheet">
3-
<script src="https://cdnjs.cloudflare.com/ajax/libs/mocha/3.0.2/mocha.min.js"></script>
2+
<link href="../node_modules/mocha/mocha.css" rel="stylesheet">
3+
<script src="../node_modules/mocha/mocha.js"></script>
44
<div id="mocha"></div>
55
<script>mocha.setup('bdd');</script>
66

0 commit comments

Comments
 (0)