-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
upload first version and modules of test for the library
- Loading branch information
Showing
3 changed files
with
83 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
module.exports = { | ||
|
||
/** | ||
* Suma de dos numeros | ||
* @example | ||
* n1 = 1, n2 = 2 , resultado = 3 | ||
* @param {*} n1 numero uno de la suma | ||
* @param {*} n2 numero dos de la suma | ||
* @returns suma de dos numeros | ||
*/ | ||
|
||
suma: function(n1,n2){ | ||
return n1+n2; | ||
}, | ||
|
||
/** | ||
* resta de dos numeros | ||
* @example | ||
* n1 = 1, n2 = 2 , resultado = -1 | ||
* @param {*} n1 numero uno de la resta | ||
* @param {*} n2 numero dos de la resta | ||
* @returns resta de dos numeros | ||
*/ | ||
|
||
resta: function(n1,n2){ | ||
return n1-n2; | ||
}, | ||
|
||
/** | ||
* multiplicacion de dos numeros | ||
* @example | ||
* n1 = 1, n2 = 2 , resultado = 2 | ||
* @param {*} n1 numero uno de la multiplicacion | ||
* @param {*} n2 numero dos de la multiplicacion | ||
* @returns multiplicacion de dos numeros | ||
*/ | ||
|
||
multiplicar: function(n1,n2){ | ||
return n1*n2; | ||
}, | ||
|
||
/** | ||
* division de dos numeros | ||
* @example | ||
* n1 = 1, n2 = 2 , resultado = 0.5 | ||
* @param {*} n1 numero uno de la division | ||
* @param {*} n2 numero dos de la division | ||
* @returns division de dos numeros | ||
*/ | ||
|
||
dividir: function(n1,n2){ | ||
return n1/n2; | ||
} | ||
|
||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"name": "lib-canvas", | ||
"version": "1.0.0", | ||
"description": "library to manipulate the canvas dom", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/afca007/lib-canvas.git" | ||
}, | ||
"keywords": [ | ||
"canvas", | ||
"dom" | ||
], | ||
"author": "Andres Felipe Caro Arango", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/afca007/lib-canvas/issues" | ||
}, | ||
"homepage": "https://github.com/afca007/lib-canvas#readme" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
const m = require('.'); | ||
|
||
console.log(m.suma(2,2)); |