Socket
Socket
Sign inDemoInstall

@types/js-yaml

Package Overview
Dependencies
0
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.10.0 to 3.10.1

171

js-yaml/index.d.ts

@@ -1,96 +0,103 @@

// Type definitions for js-yaml 3.10.0
// Type definitions for js-yaml 3.10
// Project: https://github.com/nodeca/js-yaml
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>, Sebastian Clausen <https://github.com/sclausen>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
declare namespace jsyaml {
export function safeLoad(str: string, opts?: LoadOptions): any;
export function load(str: string, opts?: LoadOptions): any;
export function safeLoad(str: string, opts?: LoadOptions): any;
export function load(str: string, opts?: LoadOptions): any;
export interface Type extends TypeConstructorOptions { }
export class Type {
constructor(tag: string, opts?: TypeConstructorOptions);
tag: string;
}
export class Schema {
constructor(definition: SchemaDefinition);
public static create(types: Type[] | Type): Schema;
public static create(schemas: Schema[] | Schema, types: Type[] | Type): Schema;
}
export class Type {
constructor(tag: string, opts?: TypeConstructorOptions);
kind: 'sequence' | 'scalar' | 'mapping' | null;
resolve(data: any): boolean;
construct(data: any): any;
instanceOf: object | null;
predicate: string | null;
represent: ((data: object) => any) | { [x: string]: (data: object) => any; } | null;
defaultStyle: string | null;
styleAliases: { [x: string]: any; };
}
export function safeLoadAll(str: string, iterator?: (doc: any) => void, opts?: LoadOptions): any;
export function loadAll(str: string, iterator?: (doc: any) => void, opts?: LoadOptions): any;
/* tslint:disable-next-line:no-unnecessary-class */
export class Schema implements SchemaDefinition {
constructor(definition: SchemaDefinition);
static create(types: Type[] | Type): Schema;
static create(schemas: Schema[] | Schema, types: Type[] | Type): Schema;
}
export function safeDump(obj: any, opts?: DumpOptions): string;
export function dump(obj: any, opts?: DumpOptions): string;
export function safeLoadAll(str: string, iterator?: (doc: any) => void, opts?: LoadOptions): any;
export function loadAll(str: string, iterator?: (doc: any) => void, opts?: LoadOptions): any;
export interface LoadOptions {
// string to be used as a file path in error/warning messages.
filename?: string;
// makes the loader to throw errors instead of warnings.
strict?: boolean;
// specifies a schema to use.
schema?: any;
}
export function safeDump(obj: any, opts?: DumpOptions): string;
export function dump(obj: any, opts?: DumpOptions): string;
export interface DumpOptions {
// indentation width to use (in spaces).
indent?: number;
// do not throw on invalid types (like function in the safe schema) and skip pairs and single values with such types.
skipInvalid?: boolean;
// specifies level of nesting, when to switch from block to flow style for collections. -1 means block style everwhere
flowLevel?: number;
// Each tag may have own set of styles. - "tag" => "style" map.
styles?: Object;
// specifies a schema to use.
schema?: any;
// if true, sort keys when dumping YAML. If a function, use the function to sort the keys. (default: false)
sortKeys?: boolean | ((a: any, b: any) => number);
// set max line width. (default: 80)
lineWidth?: number;
// if true, don't convert duplicate objects into references (default: false)
noRefs?: boolean;
// if true don't try to be compatible with older yaml versions. Currently: don't quote "yes", "no" and so on, as required for YAML 1.1 (default: false)
noCompatMode?: boolean;
// if true flow sequences will be condensed, omitting the space between `key: value` or `a, b`. Eg. `'[a,b]'` or `{a:{b:c}}`. Can be useful when using yaml for pretty URL query params as spaces are %-encoded. (default: false)
condenseFlow?: boolean;
}
export interface LoadOptions {
// string to be used as a file path in error/warning messages.
filename?: string;
// makes the loader to throw errors instead of warnings.
strict?: boolean;
// specifies a schema to use.
schema?: any;
// compatibility with JSON.parse behaviour.
json?: boolean;
}
export interface TypeConstructorOptions {
kind?: string;
resolve?: Function;
construct?: Function;
instanceOf?: Object;
predicate?: string;
represent?: Function;
defaultStyle?: string;
styleAliases?: Object;
}
export interface DumpOptions {
// indentation width to use (in spaces).
indent?: number;
// do not throw on invalid types (like function in the safe schema) and skip pairs and single values with such types.
skipInvalid?: boolean;
// specifies level of nesting, when to switch from block to flow style for collections. -1 means block style everwhere
flowLevel?: number;
// Each tag may have own set of styles. - "tag" => "style" map.
styles?: { [x: string]: any; };
// specifies a schema to use.
schema?: any;
// if true, sort keys when dumping YAML. If a function, use the function to sort the keys. (default: false)
sortKeys?: boolean | ((a: any, b: any) => number);
// set max line width. (default: 80)
lineWidth?: number;
// if true, don't convert duplicate objects into references (default: false)
noRefs?: boolean;
// if true don't try to be compatible with older yaml versions. Currently: don't quote "yes", "no" and so on, as required for YAML 1.1 (default: false)
noCompatMode?: boolean;
// if true flow sequences will be condensed, omitting the space between `key: value` or `a, b`. Eg. `'[a,b]'` or `{a:{b:c}}`.
// Can be useful when using yaml for pretty URL query params as spaces are %-encoded. (default: false)
condenseFlow?: boolean;
}
export interface SchemaDefinition {
implicit?: any[];
explicit?: any[];
include?: any[];
}
export interface TypeConstructorOptions {
kind?: 'sequence' | 'scalar' | 'mapping';
resolve?: (data: any) => boolean;
construct?: (data: any) => any;
instanceOf?: object;
predicate?: string;
represent?: ((data: object) => any) | { [x: string]: (data: object) => any };
defaultStyle?: string;
styleAliases?: { [x: string]: any; };
}
// only strings, arrays and plain objects: http://www.yaml.org/spec/1.2/spec.html#id2802346
export var FAILSAFE_SCHEMA: any;
// only strings, arrays and plain objects: http://www.yaml.org/spec/1.2/spec.html#id2802346
export var JSON_SCHEMA: any;
// same as JSON_SCHEMA: http://www.yaml.org/spec/1.2/spec.html#id2804923
export var CORE_SCHEMA: any;
// all supported YAML types, without unsafe ones (!!js/undefined, !!js/regexp and !!js/function): http://yaml.org/type/
export var DEFAULT_SAFE_SCHEMA: any;
// all supported YAML types.
export var DEFAULT_FULL_SCHEMA: any;
export var MINIMAL_SCHEMA: any;
export var SAFE_SCHEMA: any;
export interface SchemaDefinition {
implicit?: any[];
explicit?: Type[];
include?: Schema[];
}
export class YAMLException extends Error {
constructor(reason?: any, mark?: any);
toString(compact?: boolean): string;
}
// only strings, arrays and plain objects: http://www.yaml.org/spec/1.2/spec.html#id2802346
export let FAILSAFE_SCHEMA: Schema;
// only strings, arrays and plain objects: http://www.yaml.org/spec/1.2/spec.html#id2802346
export let JSON_SCHEMA: Schema;
// same as JSON_SCHEMA: http://www.yaml.org/spec/1.2/spec.html#id2804923
export let CORE_SCHEMA: Schema;
// all supported YAML types, without unsafe ones (!!js/undefined, !!js/regexp and !!js/function): http://yaml.org/type/
export let DEFAULT_SAFE_SCHEMA: Schema;
// all supported YAML types.
export let DEFAULT_FULL_SCHEMA: Schema;
export let MINIMAL_SCHEMA: Schema;
export let SAFE_SCHEMA: Schema;
export class YAMLException extends Error {
constructor(reason?: any, mark?: any);
toString(compact?: boolean): string;
}
export = jsyaml;
export as namespace jsyaml;
{
"name": "@types/js-yaml",
"version": "3.10.0",
"version": "3.10.1",
"description": "TypeScript definitions for js-yaml",

@@ -25,4 +25,4 @@ "license": "MIT",

"dependencies": {},
"typesPublisherContentHash": "9ce24affe96bd03e784b7f87d8c6ce889f7406ce4fc59f4a7c392b9fe991dad9",
"typeScriptVersion": "2.0"
"typesPublisherContentHash": "6c0c2cd8f92c2b0d16e4454061d83e8e4d89a4aa4f30966c9f109d5d76ab2049",
"typeScriptVersion": "2.2"
}

@@ -11,7 +11,7 @@ # Installation

Additional Details
* Last updated: Mon, 13 Nov 2017 23:49:21 GMT
* Last updated: Wed, 22 Nov 2017 18:02:14 GMT
* Dependencies: none
* Global values: jsyaml
* Global values: none
# Credits
These definitions were written by Bart van der Schoor <https://github.com/Bartvds>, Sebastian Clausen <https://github.com/sclausen>.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc