Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
@types/jstoxml
Advanced tools
npm install --save @types/jstoxml
This package contains type definitions for jstoxml (https://github.com/davidcalhoun/jstoxml).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jstoxml.
// Type definitions for jstoxml 2.0
// Project: https://github.com/davidcalhoun/jstoxml
// Definitions by: Steven Snoeijen <https://github.com/stevensnoeijen>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
interface XmlAttrs {
[name: string]: unknown;
}
export interface XmlElement {
/**
* Element's name
*/
_name?: string | undefined;
/**
* Element's attributes.
*/
_attrs?: XmlAttrs | XmlAttrs[] | undefined;
/**
* Element's content.
*/
_content?: XmlElement | XmlElement[] | unknown | undefined;
/**
* Another way to create (sub)-elements (like in _content).
*/
[key: string]: XmlElement | XmlElement[] | unknown;
}
export interface XmlOptions {
/**
* Tree depth.
* @default 0
*/
depth?: number | undefined;
/**
* By default elements are intented with 1 whitespace per depth.
* @default " "
*/
indent?: string | undefined;
/**
* Set Custom XML header when given a string,
* when setting to true the default xml header will be added.
* @default false
*/
header?: string | boolean | undefined;
/**
* Custom filter for XML entities.
*/
filter?: { [char: string]: string } | undefined;
/**
* Custom filter for XML attributes
* Default filters are:
* @example
* <code>
* const defaultEntityFilter = {
* "<": "<",
* ">": ">",
* "&": "&",
* };
* </code>
* Setting this to `false` disables attribute filters.
*/
attributesFilter?: {} | undefined;
/**
* If for some reason you want to avoid self-closing tags, you can pass in a special config option _selfCloseTag.
* @default true
*/
_selfCloseTag?: boolean | undefined;
}
export function toXML(obj?: XmlElement | XmlElement[], options?: XmlOptions): string;
// do not export every type by default
export {};
These definitions were written by Steven Snoeijen.
FAQs
TypeScript definitions for jstoxml
The npm package @types/jstoxml receives a total of 2,892 weekly downloads. As such, @types/jstoxml popularity was classified as popular.
We found that @types/jstoxml 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
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.