UNPKG
math_example_sagenet
Version:
latest (0.0.0)
0.0.0
An example of creating a package
math_example_sagenet
/
lib
/
simple_math.js
14 lines
(13 loc)
•
253 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
var
call_counter =
require
(
'./call_counter'
);
function
add
(
x, y
){
call_counter
();
return
x + y; }
function
subtract
(
x, y
){
call_counter
();
return
x - y; }
module
.
exports
= {
addition
: add,
subtraction
: subtract }