
Product
Socket Now Protects the Chrome Extension Ecosystem
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.
face-detector-polyfill
Advanced tools
Polyfill for FaceDetector, part of shape detection api
Uses the BBF object detector from JsFeat.
Note that currently landmarks are not detected.
Install:
bower install face-detector-polyfill
Use:
<script>
(function () {
function loadScript(src, done) {
var $script = document.createElement('script');
$script.src = src;
$script.onload = function() {
done();
};
$script.onerror = function() {
done(new Error('Failed to load script ' + src));
};
document.head.appendChild($script);
}
if (FaceDetector in window) {
continueToStartTheApp();
} else {
loadScript(
"bower_components/face-detector-polyfill/FaceDetector.min.js",
continueToStartTheApp
);
}
})()
// ...
</script>
Install:
npm install --save face-detector-polyfill
Use:
if ('FaceDetector' in window) {
continueToStartTheApp();
} else {
require.ensure(['face-detector-polyfill'], function(require) {
const FaceDetector = require('face-detector-polyfill');
window.FaceDetector = FaceDetector;
continueToStartTheApp();
}, function(err) {
console.log('Failed to load FaceDetector', err);
});
}
See the examples folder, or live demo
Requires Promises (can also be polyfilled) and typed arrays which are supported in all modern browsers, down to IE11.
FAQs
Polyfill for FaceDetector API
The npm package face-detector-polyfill receives a total of 1 weekly downloads. As such, face-detector-polyfill popularity was classified as not popular.
We found that face-detector-polyfill demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.
Product
Add secure dependency scanning to Claude Desktop with Socket MCP, a one-click extension that keeps your coding conversations safe from malicious packages.
Product
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.