filevalidator
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -14,3 +14,11 @@ define([ | ||
// MP3 file with an ID3v2 container | ||
[0x49, 0x44, 0x33] | ||
[0x49, 0x44, 0x33], | ||
// Other MP3 files (FF Fx and FF Ex – they may cause false-positives) | ||
// Headers taken from https://www.garykessler.net/library/file_sigs.html | ||
[0xFF, 0xE0], [0xFF, 0xE1], [0xFF, 0xE2], [0xFF, 0xE3], [0xFF, 0xE4], | ||
[0xFF, 0xE5], [0xFF, 0xE6], [0xFF, 0xE7], [0xFF, 0xE8], [0xFF, 0xE9], | ||
[0xFF, 0xEA], [0xFF, 0xEB], [0xFF, 0xEC], [0xFF, 0xED], [0xFF, 0xEE], [0xFF, 0xEF], | ||
[0xFF, 0xF0], [0xFF, 0xF1], [0xFF, 0xF2], [0xFF, 0xF3], [0xFF, 0xF4], | ||
[0xFF, 0xF5], [0xFF, 0xF6], [0xFF, 0xF7], [0xFF, 0xF8], [0xFF, 0xF9], | ||
[0xFF, 0xFA], [0xFF, 0xFB], [0xFF, 0xFC], [0xFF, 0xFD], [0xFF, 0xFE], [0xFF, 0xFF] | ||
], | ||
@@ -17,0 +25,0 @@ 'wav': [ |
{ | ||
"name": "filevalidator", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "File signature validation in JavaScript", | ||
"main": "filevalidator.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"author": "Phil Freo <phil@philfreo.com> (http://philfreo.com/)", | ||
"license": "MIT" | ||
} |
@@ -21,3 +21,3 @@ # filevalidator.js | ||
var file = e.currentTarget.files[0]; | ||
FileDetector.verifyFileType(file, ['mp3', 'wav'], function(valid) { | ||
filevalidator.verifyFileType(file, ['mp3', 'wav'], function(valid) { | ||
alert('Valid mp3 or wave file: ' + !!valid); | ||
@@ -24,0 +24,0 @@ }); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
5796
89
1
1