add-two-numbers2 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +7 -0
  2. package/index.js +3 -0
  3. package/package.json +16 -0
package/README.md ADDED
@@ -0,0 +1,7 @@
1
+ # add-two-numbers2
2
+ Adds two numbers, but coerces them into numbers first.
3
+ ```js
4
+ const add_two_numbers = require('add-two-numbers2')
5
+ console.log(add_two_numbers(1, 2)) // 3
6
+ console.log(add_two_numbers('20', '10')) // 30
7
+ ```
package/index.js ADDED
@@ -0,0 +1,3 @@
1
+ module.exports = function add_two_numbers(a, b) {
2
+ return Number(a) + Number(b)
3
+ }
package/package.json ADDED
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "add-two-numbers2",
3
+ "version": "1.0.0",
4
+ "description": "Adds two numbers",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "keywords": [
10
+ "numbers",
11
+ "two",
12
+ "jquery"
13
+ ],
14
+ "author": "me",
15
+ "license": "MIT"
16
+ }