
Security News
CISA Kills Off RSS Feeds for KEVs and Cyber Alerts
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
A very simple module to do runtime argument type checking of functions.
Installation:
Use yarn
or npm
:
$ [sudo] npm install --save arg-types
Example:
The very contrived example below would stop "33"
being returned by the function.
var argTypes = require('./')
// define your function signature, the next line returns a function
// which expects an `arguments` object
var helloSignature = argTypes(['number', 'number', 'number'])
function hello (a, b, c) {
helloSignature(arguments) // add this line as the first one in the target function
return a + b + c
}
try {
hello(1, 2, '3')
} catch (ex) {
assert(ex.message === 'Expected "number" but got "string" at argument 3.')
}
FAQs
runtime argument type checking
The npm package arg-types receives a total of 2 weekly downloads. As such, arg-types popularity was classified as not popular.
We found that arg-types 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
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.