
Security News
Socket Releases Free Certified Patches for Critical vm2 Sandbox Escape
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.
@novigi/util
Advanced tools
A module containing common javascript util methods ✨
npm install @novigi/util
const lib = require('@novigi/util');
A module containing common javascript util methods.
const util = require('@novigi/util');
stringstringstringstringConverts any object to base64 string representation
Kind: static method of util
Returns: string - Base64 string representation of the input
| Param | Type | Description |
|---|---|---|
| input | object | string | Input reqired to be converted to base64 |
Example
// returns dGVzdA==
const util = require('@novigi/util');
util.to_base64('test');
stringConverts a js object or valid JSON string to xml
Kind: static method of util
Returns: string - xml representation of the input JSON string or js object
| Param | Type | Description |
|---|---|---|
| json | object | string | Javascript object or JSON string |
| rootElement | string | Optional string to provide as the root element |
Example
// returns <?xml version='1.0'?>
// <root>
// <test>1</test>
// </root>
const util = require('@novigi/util');
util.json_to_xml({ test: 1 }, 'root');
stringConverts a XML string to a JSON string
Kind: static method of util
Returns: string - JSON string representation of the xml input
| Param | Type | Description |
|---|---|---|
| xml | string | XML string |
Example
// returns "{\"x\":{\"test\":{\"_text\":\"1\"}}}"
const util = require('nov-nodejs-core-util');
util.xml_to_json("<x><test>1</test></x>");
This is an auto generated file. Please don't make changes manually
FAQs
A module containing common javascript util methods ✨
We found that @novigi/util 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
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.

Research
Five malicious NuGet packages impersonate Chinese .NET libraries to deploy a stealer targeting browser credentials, crypto wallets, SSH keys, and local files.

Security News
pnpm 11 turns on a 1-day Minimum Release Age and blocks exotic subdeps by default, adding safeguards against fast-moving supply chain attacks.