Socket
Socket
Sign inDemoInstall

@types/js-yaml

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/js-yaml - npm Package Compare versions

Comparing version 3.12.5 to 4.0.0

45

js-yaml/index.d.ts

@@ -1,2 +0,2 @@

// Type definitions for js-yaml 3.12
// Type definitions for js-yaml 4.0
// Project: https://github.com/nodeca/js-yaml

@@ -6,2 +6,3 @@ // Definitions by: Bart van der Schoor <https://github.com/Bartvds>

// ExE Boss <https://github.com/ExE-Boss>
// Armaan Tobaccowalla <https://github.com/ArmaanT>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

@@ -12,4 +13,3 @@ // TypeScript Version: 2.2

export function safeLoad(str: string, opts?: LoadOptions): string | object | undefined;
export function load(str: string, opts?: LoadOptions): any;
export function load(str: string, opts?: LoadOptions): object | string | number | null | undefined;

@@ -24,20 +24,16 @@ export class Type {

represent: ((data: object) => any) | { [x: string]: (data: object) => any } | null;
representName: ((data: object) => any) | null;
defaultStyle: string | null;
multi: boolean;
styleAliases: { [x: string]: 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 class Schema {
constructor(definition: SchemaDefinition | Type[] | Type);
extend(types: SchemaDefinition | Type[] | Type): Schema;
}
export function safeLoadAll(str: string, iterator?: null, opts?: LoadOptions): any[];
export function safeLoadAll(str: string, iterator: (doc: any) => void, opts?: LoadOptions): void;
export function loadAll(str: string, iterator?: null, opts?: LoadOptions): any[];
export function loadAll(str: string, iterator: (doc: any) => void, opts?: LoadOptions): void;
export function safeDump(obj: any, opts?: DumpOptions): string;
export function dump(obj: any, opts?: DumpOptions): string;

@@ -51,3 +47,3 @@

/** specifies a schema to use. */
schema?: SchemaDefinition;
schema?: Schema;
/** compatibility with JSON.parse behaviour. */

@@ -64,3 +60,3 @@ json?: boolean;

filename: string | null;
schema: SchemaDefinition;
schema: Schema;
onWarning: (this: null, e: YAMLException) => void;

@@ -92,3 +88,3 @@ json: boolean;

/** specifies a schema to use. */
schema?: SchemaDefinition;
schema?: Schema;
/** if true, sort keys when dumping YAML. If a function, use the function to sort the keys. (default: false) */

@@ -107,2 +103,8 @@ sortKeys?: boolean | ((a: any, b: any) => number);

condenseFlow?: boolean;
/** strings will be quoted using this quoting style. If you specify single quotes, double quotes will still be used for non-printable characters. (default: `'`) */
quotingType?: "'" | '"';
/** if true, all non-key strings will be quoted even if they normally don't need to. (default: false) */
forceQuotes?: boolean;
/** callback `function (key, value)` called recursively on each key/value in source object (see `replacer` docs for `JSON.stringify`). */
replacer?: (key: string, value: any) => any;
}

@@ -117,3 +119,5 @@

represent?: ((data: object) => any) | { [x: string]: (data: object) => any };
representName?: (data: object) => any;
defaultStyle?: string;
multi?: boolean;
styleAliases?: { [x: string]: any };

@@ -123,5 +127,4 @@ }

export interface SchemaDefinition {
implicit?: any[];
implicit?: Type[];
explicit?: Type[];
include?: Schema[];
}

@@ -135,8 +138,4 @@

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;
/** all supported YAML types */
export let DEFAULT_SCHEMA: Schema;

@@ -143,0 +142,0 @@ export class YAMLException extends Error {

{
"name": "@types/js-yaml",
"version": "3.12.5",
"version": "4.0.0",
"description": "TypeScript definitions for js-yaml",

@@ -21,2 +21,7 @@ "license": "MIT",

"githubUsername": "ExE-Boss"
},
{
"name": "Armaan Tobaccowalla",
"url": "https://github.com/ArmaanT",
"githubUsername": "ArmaanT"
}

@@ -33,4 +38,4 @@ ],

"dependencies": {},
"typesPublisherContentHash": "152b780ed47626a634e193c96fa6105ae0258f6a061acb007314bc975ab51d8c",
"typeScriptVersion": "3.0"
"typesPublisherContentHash": "80fa54cee8b808d1d3878f38915a0a6ae63c3a9f66a20d6f26f1a9a342a23117",
"typeScriptVersion": "3.3"
}

@@ -11,3 +11,3 @@ # Installation

### Additional Details
* Last updated: Thu, 25 Jun 2020 02:29:19 GMT
* Last updated: Tue, 05 Jan 2021 23:19:35 GMT
* Dependencies: none

@@ -17,2 +17,2 @@ * Global values: `jsyaml`

# Credits
These definitions were written by [Bart van der Schoor](https://github.com/Bartvds), [Sebastian Clausen](https://github.com/sclausen), and [ExE Boss](https://github.com/ExE-Boss).
These definitions were written by [Bart van der Schoor](https://github.com/Bartvds), [Sebastian Clausen](https://github.com/sclausen), [ExE Boss](https://github.com/ExE-Boss), and [Armaan Tobaccowalla](https://github.com/ArmaanT).
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc