
Product
Introducing Pull Request Stories to Help Security Teams Track Supply Chain Risks
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
safari-fix-map
Advanced tools
Simple commonjs module to replace Safari's bugginess with better polyfills.
This is a short javascript module that checks whether it is running on Safari,
and if so, deletes window.Map
and replaces it with a more competent polyfill.
Safari's Map implementation has bugs that causes it to sometimes return
completely wrong objects from its .get
method. It might have to do with using
Maps in browser extensions or MutationObserver callbacks. I suspect those
aren't well-tested in Safari. I have stared at error stacks and prodded
debuggers to check my sanity. I have looked into the abyss. I have seen this
code fail in Safari 8:
function checkMap(map) {
map.forEach(function(value, key) {
if (!Number.isNaN(value) && value !== map.get(key)) {
throw new Error("world is insane at key "+key);
}
});
}
This module is for people who wish to seal Eldritch horrors securely away.
You're using Browserify and NPM, right?
npm i --save safari-fix-map
require('safari-fix-map');
// Go on with your life in freedom
FAQs
Simple commonjs module to replace Safari's bugginess with better polyfills.
We found that safari-fix-map 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’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
Research
/Security News
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.