Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
minimal-polyfills
Advanced tools
🎯An ultra light-weight, nonexhaustive, polyfills library 🎯
Set of polyfills for allowing usage of common data structures on older browsers ( Map, Set, WeakMap ).
Focus is placed on bundle size rather than performance and transparency.
The goal is to allow our code to run on older browsers without significantly increasing the bundle size by adding exhaustive polyfills that in 95% of the cases won't be necessary.
The classes exposed only implement the more common features of their native counterpart, it does so in a very naïve and inefficient way to keep the code as short as possible.
As you would expect the polyfills will only be used when the native classes are missing.
//Example with map.
import { Polyfill as Map, LightMap } from "minimal-polyfills/dist/lib/Map";
// Explicitly define the type of your variable to make it clear
// that you are using a subset of Map...
const map: LightMap<string, number>= new Map();
//...or let the type be inferred.
const map = new Map<string, number>();
import { Polyfill as Set, LightSet } from "minimal-polyfills/dist/lib/Set";
//WARNING: If not natively supported WeakMap will only be a simple Map that will keep string references of it's keys.
import { Polyfill as WeakMap } from "minimal-polyfills/dist/lib/WeakMap";
import "minimal-polyfills/dist/lib/Array.prototype.find";
import "minimal-polyfills/dist/lib/String.prototype.startsWith.ts";
import "minimal-polyfills/dist/lib/Array.from.ts";
import "minimal-polyfills/dist/lib/ArrayBuffer.isView.ts";
Thanks to Stackblitz you can try this lib with within your browser like if you where in VSCode.
FAQs
An ultra light-weight, nonexhaustive, polyfills library
The npm package minimal-polyfills receives a total of 25,434 weekly downloads. As such, minimal-polyfills popularity was classified as popular.
We found that minimal-polyfills 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.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.