Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@aofl/polyfill-service
Advanced tools
Implements a customized version of @webcomponents/webcomponentsjs/webcomponents-loader.js
that uses dynamic imports to load polyfills. It also allows for lazy loading other polyfills based on a config file.
npm i -S @aofl/polyfill-service
// sample-config.js
export default {
'Object.assign': () => import('@aofl/polyfill-service/src/object-assign-polyfill'),
'fetch': () => import('isomorphic-fetch'),
'Reflect': () => import('harmony-reflect'),
'Array.prototype.find': () => import('array.prototype.find'),
'html-imports': {
test() {
return !('import' in document.createElement('link'));
},
load: () => import('@webcomponents/webcomponentsjs/webcomponents-bundle')
}
};
// init-polyfill-service.js
import {Polyfill} from '@aofl/polyfill-service';
import polyfills from './sample-config';
const ready = Polyfill.loadAll(polyfills); // promise
export default ready;
polyfill.loadAll()
returns a promise. In addition to this WebComponentsReady
is fired once all promises are loaded.
If using webpack you will have to use imports-loader
to fix the global variable in webcomponents polyfills.
// webpack.config.js
...
module: {
rules: [
{
test: /@webcomponents/,
loader: 'imports-loader?this=>window'
},
]
}
...
v3.5.0 - 2020-02-25
FAQs
Uses dynamic imports to load polyfills
The npm package @aofl/polyfill-service receives a total of 87 weekly downloads. As such, @aofl/polyfill-service popularity was classified as not popular.
We found that @aofl/polyfill-service demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.