Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Unified Diff: node_modules/vulcanize/node_modules/update-notifier/node_modules/configstore/node_modules/js-yaml/lib/js-yaml/type.js

Issue 877193002: Upgrade vulcanize to 0.7.6. (Closed) Base URL: https://chromium.googlesource.com/infra/third_party/npm_modules.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: node_modules/vulcanize/node_modules/update-notifier/node_modules/configstore/node_modules/js-yaml/lib/js-yaml/type.js
diff --git a/node_modules/vulcanize/node_modules/update-notifier/node_modules/configstore/node_modules/js-yaml/lib/js-yaml/type.js b/node_modules/vulcanize/node_modules/update-notifier/node_modules/configstore/node_modules/js-yaml/lib/js-yaml/type.js
index 2d368bf70690162ae98702097eeda134496e95a0..5e3176cebef8875152c138170e23fe0810577d6e 100644
--- a/node_modules/vulcanize/node_modules/update-notifier/node_modules/configstore/node_modules/js-yaml/lib/js-yaml/type.js
+++ b/node_modules/vulcanize/node_modules/update-notifier/node_modules/configstore/node_modules/js-yaml/lib/js-yaml/type.js
@@ -1,27 +1,24 @@
'use strict';
-
var YAMLException = require('./exception');
-
var TYPE_CONSTRUCTOR_OPTIONS = [
- 'loadKind',
- 'loadResolver',
- 'dumpInstanceOf',
- 'dumpPredicate',
- 'dumpRepresenter',
- 'dumpDefaultStyle',
- 'dumpStyleAliases'
+ 'kind',
+ 'resolve',
+ 'construct',
+ 'instanceOf',
+ 'predicate',
+ 'represent',
+ 'defaultStyle',
+ 'styleAliases'
];
-
var YAML_NODE_KINDS = [
'scalar',
'sequence',
'mapping'
];
-
function compileStyleAliases(map) {
var result = {};
@@ -36,7 +33,6 @@ function compileStyleAliases(map) {
return result;
}
-
function Type(tag, options) {
options = options || {};
@@ -47,19 +43,19 @@ function Type(tag, options) {
});
// TODO: Add tag format check.
- this.tag = tag;
- this.loadKind = options['loadKind'] || null;
- this.loadResolver = options['loadResolver'] || null;
- this.dumpInstanceOf = options['dumpInstanceOf'] || null;
- this.dumpPredicate = options['dumpPredicate'] || null;
- this.dumpRepresenter = options['dumpRepresenter'] || null;
- this.dumpDefaultStyle = options['dumpDefaultStyle'] || null;
- this.dumpStyleAliases = compileStyleAliases(options['dumpStyleAliases'] || null);
-
- if (-1 === YAML_NODE_KINDS.indexOf(this.loadKind)) {
- throw new YAMLException('Unknown loadKind "' + this.loadKind + '" is specified for "' + tag + '" YAML type.');
+ this.tag = tag;
+ this.kind = options['kind'] || null;
+ this.resolve = options['resolve'] || function () { return true; };
+ this.construct = options['construct'] || function (data) { return data; };
+ this.instanceOf = options['instanceOf'] || null;
+ this.predicate = options['predicate'] || null;
+ this.represent = options['represent'] || null;
+ this.defaultStyle = options['defaultStyle'] || null;
+ this.styleAliases = compileStyleAliases(options['styleAliases'] || null);
+
+ if (-1 === YAML_NODE_KINDS.indexOf(this.kind)) {
+ throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.');
}
}
-
module.exports = Type;

Powered by Google App Engine
This is Rietveld 408576698