+4
-13
@@ -7,3 +7,4 @@ | ||
| var express = require('express') | ||
| , routes = require('./routes'); | ||
| , routes = require('./routes') | ||
| , fizzbuzz = require ('./lib/fizzbuzz').fizzbuzz; | ||
@@ -37,15 +38,5 @@ var app = module.exports = express.createServer(); | ||
| app.get('/:var', function(req, res){ | ||
| var num; | ||
| num = req.params.var; | ||
| var num = req.params.var; | ||
| res.send(num+' -> '+fizzbuzz(num)); | ||
| if( num % 3 !== 0 && num % 5 !== 0 ){ | ||
| res.send(num+" -> "+req.params.var) | ||
| }else if( num % 3 === 0 && num % 5 !== 0 ){ | ||
| res.send(num+" -> "+"fizz") | ||
| } else if(num % 3 !== 0 && num % 5 === 0 ){ | ||
| res.send(num+" -> "+"buzz") | ||
| } else{ //num % 3 === 0 && num % 5 === 0 | ||
| res.send(num+" -> "+"fizzbuzz") | ||
| } | ||
| }); | ||
@@ -52,0 +43,0 @@ |
+1
-1
@@ -5,3 +5,3 @@ { | ||
| "name": "fizzbuzz", | ||
| "version": "0.0.1-7", | ||
| "version": "0.0.1-8", | ||
| "homepage": "https://github.com/blakmatrix/fizzbuzz", | ||
@@ -8,0 +8,0 @@ "main": "./lib/main", |
+5
-1
@@ -20,5 +20,9 @@ FizzBuzz: the Programmer's Stairway to Heaven | ||
| Demo: [fizzbuzz.jit.su](http://fizzbuzz.jit.su/) | ||
| Run **server**: `node app.js` | ||
| Run your own **server**: | ||
| git clone git@github.com:blakmatrix/fizzbuzz.git && cd fizzbuzz | ||
| node app.js | ||
| Use it in your own app with **require**: | ||
@@ -25,0 +29,0 @@ |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
43
10.26%305653
-0.04%6806
-0.12%