favicon-component
Advanced tools
+21
-3
@@ -1,2 +0,1 @@ | ||
| /** | ||
@@ -62,6 +61,10 @@ * Require the given path. | ||
| , reg = path + '.js' | ||
| , index = path + '/index.js'; | ||
| , regJSON = path + '.json' | ||
| , index = path + '/index.js' | ||
| , indexJSON = path + '/index.json'; | ||
| return require.modules[reg] && reg | ||
| || require.modules[regJSON] && regJSON | ||
| || require.modules[index] && index | ||
| || require.modules[indexJSON] && indexJSON | ||
| || require.modules[orig] && orig | ||
@@ -154,3 +157,12 @@ || null; | ||
| fn.resolve = function(path){ | ||
| if ('.' != path[0]) path = './deps/' + path; | ||
| // resolve deps by returning | ||
| // the dep in the nearest "deps" | ||
| // directory | ||
| if ('.' != path[0]) { | ||
| var segs = parent.split('/'); | ||
| var i = segs.lastIndexOf('deps') + 1; | ||
| if (!i) i = 0; | ||
| path = segs.slice(0, i + 1).join('/') + '/deps/' + path; | ||
| return path; | ||
| } | ||
| return require.normalize(p, path); | ||
@@ -189,2 +201,8 @@ }; | ||
| /** | ||
| * Expose `current()`. | ||
| */ | ||
| exports.current = current; | ||
| /** | ||
| * Set the favicon to the given data uri `str`. | ||
@@ -191,0 +209,0 @@ * |
+1
-1
| { | ||
| "name": "favicon", | ||
| "description": "Dynamic favicon replacement component", | ||
| "version": "0.0.4", | ||
| "version": "0.0.5", | ||
| "keywords": ["favicon", "image", "ui", "canvas"], | ||
@@ -6,0 +6,0 @@ "dependencies": {}, |
+6
-0
@@ -21,2 +21,8 @@ | ||
| /** | ||
| * Expose `current()`. | ||
| */ | ||
| exports.current = current; | ||
| /** | ||
| * Set the favicon to the given data uri `str`. | ||
@@ -23,0 +29,0 @@ * |
+1
-1
| { | ||
| "name": "favicon-component", | ||
| "description": "Dynamic favicon replacement component", | ||
| "version": "0.0.4", | ||
| "version": "0.0.5", | ||
| "keywords": ["favicon", "image", "ui", "canvas"], | ||
@@ -6,0 +6,0 @@ "dependencies": {}, |
+4
-0
@@ -45,4 +45,8 @@ | ||
| ### icon.current() | ||
| Return the current favicon link when present. | ||
| ## License | ||
| MIT |
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
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
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
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
263300
0.25%8202
0.26%51
8.51%