
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
formio-utils
Advanced tools
Utility functions for form.io
$ npm install formio-utils
Calls fn(component)
for each component in components
, accounting for nested layout components. (Does not call for layout components themselves, unless includeAll is true).
The current data path of the element. Example: data.user.firstName
var utils = require('formio-utils');
utils.eachComponent(form.components, function(component) {
// Do something...
})
Returns the component with the given key
or undefined if not found.
var utils = require('formio-utils');
var component = utils.getComponent(form.components, 'myKey');
Returns an key-value object where the keys are the keys for each component in components
and each key points to the corresponding component. This includes nested components as well. Pass true for includeAll if you want to include layout components.
var utils = require('formio-utils');
var flattened = utils.flattenComponents(form.components);
console.log(flattened['myNestedComponent']);
Determine if a component is a layout component.
var utils = require('formio-utils');
var layoutComponent = utils.isLayoutComponent(form.components[0]);
console.log(layoutComponent);
Get the value for a components API key, from the given submission. Recursively searches the submission for the key.
var utils = require('formio-utils');
var value = utils.getValue(submission, 'myComponent'); // The value or undefined.
$ npm run test
FAQs
Utility functions for form.io
We found that formio-utils demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Research
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.