Security News
UK Officials Consider Banning Ransomware Payments from Public Entities
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
@ng-web-apis/common
Advanced tools
Common utils for Web APIs
Part of Web APIs for Angular
A set of common utils for consuming Web APIs with Angular
WINDOW
— provides access to global window
objectNAVIGATOR
— provides access to window.navigator
objectNETWORK_INFORMATION
— provides access to window.navigator.connection
objectUSER_AGENT
— provides access to window.navigator.userAgent
stringMEDIA_DEVICES
— provides access to window.navigator.mediaDevices
objectPERFORMANCE
— provides access to window.performance
objectANIMATION_FRAME
— shared Observable
based on window.requestAnimationFrame
CACHES
— provides access to window.caches
objectCSS
— provides access to window.CSS
object or mock object if it's not available (i.e. in IE)CRYPTO
— provides access to window.crypto
objectLOCATION
— provides access to window.location
objectLOCAL_STORAGE
— provides access to window.localStorage
objectSESSION_STORAGE
— provides access to window.sessionStorage
objectSPEECH_RECOGNITION
— provides access to SpeechRecognition
class or returns null
if browser does not support itSPEECH_SYNTHESIS
— provides access to window.speechSynthesis
objectPAGE_VISIBILITY
— wrapper for document.addEventListener('visibilityChange')
apiHISTORY
— provides access to window.history
objectJust inject a token you need. You can also take a look at Stackblitz sample
👨🎓 It is easy to understand: you see all dependencies of your entity in its constructor
🧞 It is easy to test: you can just mock any of your dependencies to test
🧩 It is easy to reuse: your components and directives can be used in any context if it has dependencies that they need to be created
♻️ It is environment agnostic: you can start your app in SSR or other environments (see also @ng-web-apis/universal)
Other Web APIs for Angular by @ng-web-apis
Alex Inkin |
Roman Sedov |
FAQs
A set of common utils for consuming Web APIs with Angular
The npm package @ng-web-apis/common receives a total of 23,455 weekly downloads. As such, @ng-web-apis/common popularity was classified as popular.
We found that @ng-web-apis/common demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 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
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.