Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 501ba83

Browse files
Merge pull request #62 from variadicjs/feature-initial-documentation
initial documentation setup
2 parents c3e8b59 + 8281c2a commit 501ba83

27 files changed

+456
-3
lines changed

‎DOCUMENTATION.md

Lines changed: 308 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,308 @@
1+
# Variadic.js
2+
3+
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
4+
5+
### Table of Contents
6+
7+
- [variadic](#variadic)
8+
- [average](#average)
9+
- [factorial](#factorial)
10+
- [isAscending](#isascending)
11+
- [isDecimal](#isdecimal)
12+
- [isDescending](#isdescending)
13+
- [isEmpty](#isempty)
14+
- [isEqual](#isequal)
15+
- [isEven](#iseven)
16+
- [isNegativeInteger](#isnegativeinteger)
17+
- [isNegativeNumber](#isnegativenumber)
18+
- [isOdd](#isodd)
19+
- [isPositiveInteger](#ispositiveinteger)
20+
- [isPositiveNumber](#ispositivenumber)
21+
- [isPrime](#isprime)
22+
- [maximum](#maximum)
23+
- [median](#median)
24+
- [minimum](#minimum)
25+
- [mode](#mode)
26+
- [populationStandardDeviation](#populationstandarddeviation)
27+
- [populationVariance](#populationvariance)
28+
- [sampleStandardDeviation](#samplestandarddeviation)
29+
- [sampleVariance](#samplevariance)
30+
- [sum](#sum)
31+
32+
## variadic
33+
34+
### average
35+
36+
This function caculates the average of the numerical parameters
37+
38+
**Parameters**
39+
40+
- `params` **...any** One or more parameters.
41+
42+
**Meta**
43+
44+
- **author**: jmbothe
45+
46+
### factorial
47+
48+
This function caculates the factorial of each numerical parameter
49+
50+
**Parameters**
51+
52+
- `params` **...any** One or more parameters.
53+
54+
**Meta**
55+
56+
- **author**: devNoiseConsulting
57+
58+
### isAscending
59+
60+
This function evaluates whether the parameters are in ascending order
61+
62+
**Parameters**
63+
64+
- `params` **...any** One or more parameters.
65+
66+
**Meta**
67+
68+
- **author**: scottwestover
69+
70+
### isDecimal
71+
72+
This function evaluates whether all the parameters are decimal values
73+
74+
**Parameters**
75+
76+
- `params` **...any** One or more parameters.
77+
78+
**Meta**
79+
80+
- **author**: D1esel-Dev
81+
82+
### isDescending
83+
84+
This function evaluates whether the parameters are in ascending order
85+
86+
**Parameters**
87+
88+
- `params` **...any** One or more parameters.
89+
90+
**Meta**
91+
92+
- **author**: jhowardjr
93+
94+
### isEmpty
95+
96+
This function evaluates if all the parameters are empty
97+
98+
**Parameters**
99+
100+
- `params` **...any** One or more parameters.
101+
102+
**Meta**
103+
104+
- **author**: jhowardjr
105+
106+
### isEqual
107+
108+
This function evaluates whether all parameters are equal
109+
110+
**Parameters**
111+
112+
- `params` **...any** One or more parameters.
113+
114+
**Meta**
115+
116+
- **author**: jhowardjr
117+
118+
### isEven
119+
120+
This function evaluates whether all parameters are even
121+
122+
**Parameters**
123+
124+
- `params` **...any** One or more parameters.
125+
126+
**Meta**
127+
128+
- **author**: scottwestover
129+
130+
### isNegativeInteger
131+
132+
This function evaluates whether all integer parameters are negative
133+
134+
**Parameters**
135+
136+
- `params` **...any** One or more parameters.
137+
138+
**Meta**
139+
140+
- **author**: khusbuchandra
141+
142+
### isNegativeNumber
143+
144+
This function evaluates whether all numerical parameters are negative
145+
146+
**Parameters**
147+
148+
- `params` **...any** One or more parameters.
149+
150+
**Meta**
151+
152+
- **author**: khusbuchandra
153+
154+
### isOdd
155+
156+
This function evaluates whether all numerical parameters are odd
157+
158+
**Parameters**
159+
160+
- `params` **...any** One or more parameters.
161+
162+
**Meta**
163+
164+
- **author**: khusbuchandra
165+
166+
### isPositiveInteger
167+
168+
This function evaluates whether all integer parameters are positive
169+
170+
**Parameters**
171+
172+
- `params` **...any** One or more parameters.
173+
174+
**Meta**
175+
176+
- **author**: scottwestover
177+
178+
### isPositiveNumber
179+
180+
This function evaluates whether all numerical parameters are positive
181+
182+
**Parameters**
183+
184+
- `params` **...any** One or more parameters.
185+
186+
**Meta**
187+
188+
- **author**: khusbuchandra
189+
190+
### isPrime
191+
192+
This function evaluates whether all numerical parameters are prime
193+
194+
**Parameters**
195+
196+
- `params` **...any** One or more parameters.
197+
198+
**Meta**
199+
200+
- **author**: jmbothe
201+
202+
### maximum
203+
204+
This function finds the maximum parameter value
205+
206+
**Parameters**
207+
208+
- `params` **...any** One or more parameters.
209+
210+
**Meta**
211+
212+
- **author**: jensenmeh
213+
214+
### median
215+
216+
This function finds the median parameter value
217+
218+
**Parameters**
219+
220+
- `params` **...any** One or more parameters.
221+
222+
**Meta**
223+
224+
- **author**: jmbothe
225+
226+
### minimum
227+
228+
This function finds the minimum parameter value
229+
230+
**Parameters**
231+
232+
- `params` **...any** One or more parameters.
233+
234+
**Meta**
235+
236+
- **author**: jensenmeh
237+
238+
### mode
239+
240+
This function finds the mode of the parameter values
241+
242+
**Parameters**
243+
244+
- `params` **...any** One or more parameters.
245+
246+
**Meta**
247+
248+
- **author**: jmbothe
249+
250+
### populationStandardDeviation
251+
252+
This function calculates the population standard deviation
253+
254+
**Parameters**
255+
256+
- `params` **...any** One or more parameters.
257+
258+
**Meta**
259+
260+
- **author**: devNoiseConsulting
261+
262+
### populationVariance
263+
264+
This function calculates the variance
265+
266+
**Parameters**
267+
268+
- `params` **...any** One or more parameters.
269+
270+
**Meta**
271+
272+
- **author**: devNoiseConsulting
273+
274+
### sampleStandardDeviation
275+
276+
This function calculates the sample standard deviation
277+
278+
**Parameters**
279+
280+
- `params` **...any** One or more parameters.
281+
282+
**Meta**
283+
284+
- **author**: devNoiseConsulting
285+
286+
### sampleVariance
287+
288+
This function calculates the sample variance
289+
290+
**Parameters**
291+
292+
- `params` **...any** One or more parameters.
293+
294+
**Meta**
295+
296+
- **author**: devNoiseConsulting
297+
298+
### sum
299+
300+
This function calculates the sum of the parameters
301+
302+
**Parameters**
303+
304+
- `params` **...any** One or more parameters.
305+
306+
**Meta**
307+
308+
- **author**: jmbothe

‎README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ variadic.isEmpty([0, 2, 3], {}, 0); // false
4040
variadic.isEven(2, 4, 6); // error
4141
```
4242

43+
## Documenation
44+
45+
See [DOCUMENTATION.md](DOCUMENTATION.md)
46+
4347
## Running the tests
4448

4549
```

‎index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
'use strict';
22

3-
// REGISTER ALL MODULES
3+
/**
4+
* @module variadic
5+
*/
46
module.exports = Object.assign(
57
{},
68
require('./lib/isEmpty.js'),

‎lib/average.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ const handleErrors = (params) => {
1313
}
1414
};
1515

16+
/**
17+
* This function caculates the average of the numerical parameters
18+
* @memberof variadic
19+
* @author jmbothe
20+
* @param {...*} params - One or more parameters.
21+
*/
1622
exports.average = (...params) => {
1723
handleErrors(params);
1824

‎lib/factorial.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ const caclulateFactorial = (num) => {
3232
return factorialCache[num];
3333
};
3434

35+
/**
36+
* This function caculates the factorial of each numerical parameter
37+
* @memberof variadic
38+
* @author devNoiseConsulting
39+
* @param {...*} params - One or more parameters.
40+
*/
3541
exports.factorial = (...params) => {
3642
handleErrors(params);
3743

‎lib/isAscending.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
'use strict';
22

3+
/**
4+
* This function evaluates whether the parameters are in ascending order
5+
* @memberof variadic
6+
* @author scottwestover
7+
* @param {...*} params - One or more parameters.
8+
*/
39
exports.isAscending = (...params) => {
410
if (params.length < 2) throw new Error('Must provide two or more paramters');
511
let value = params.shift();

‎lib/isDecimal.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11

2+
/**
3+
* This function evaluates whether all the parameters are decimal values
4+
* @memberof variadic
5+
* @author D1esel-Dev
6+
* @param {...*} params - One or more parameters.
7+
*/
28
exports.isDecimal = (...params) => {
39
for (const param of params) {
410
// Only accept floating point numbers, infinite numbers can be allowed ie. repeating decimal

‎lib/isDescending.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
'use strict';
22

3+
/**
4+
* This function evaluates whether the parameters are in ascending order
5+
* @memberof variadic
6+
* @author jhowardjr
7+
* @param {...*} params - One or more parameters.
8+
*/
39
exports.isDescending = (...params) => {
410
if (params.length < 2) throw new Error('Must provide two or more paramters');
511

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /