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

Unified Diff: node_modules/vulcanize/node_modules/update-notifier/node_modules/configstore/node_modules/js-yaml/lib/js-yaml/type/omap.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/omap.js
diff --git a/node_modules/vulcanize/node_modules/update-notifier/node_modules/configstore/node_modules/js-yaml/lib/js-yaml/type/omap.js b/node_modules/vulcanize/node_modules/update-notifier/node_modules/configstore/node_modules/js-yaml/lib/js-yaml/type/omap.js
index cbb21bda485e228f08ce727b994f99587e5078ac..f956459a0d6ae45410b1c10fb53da702c583f313 100644
--- a/node_modules/vulcanize/node_modules/update-notifier/node_modules/configstore/node_modules/js-yaml/lib/js-yaml/type/omap.js
+++ b/node_modules/vulcanize/node_modules/update-notifier/node_modules/configstore/node_modules/js-yaml/lib/js-yaml/type/omap.js
@@ -1,16 +1,17 @@
'use strict';
-
var Type = require('../type');
-
var _hasOwnProperty = Object.prototype.hasOwnProperty;
var _toString = Object.prototype.toString;
+function resolveYamlOmap(data) {
+ if (null === data) {
+ return true;
+ }
-function resolveYamlOmap(state) {
var objectKeys = [], index, length, pair, pairKey, pairHasKey,
- object = state.result;
+ object = data;
for (index = 0, length = object.length; index < length; index += 1) {
pair = object[index];
@@ -44,8 +45,12 @@ function resolveYamlOmap(state) {
return true;
}
+function constructYamlOmap(data) {
+ return null !== data ? data : [];
+}
module.exports = new Type('tag:yaml.org,2002:omap', {
- loadKind: 'sequence',
- loadResolver: resolveYamlOmap
+ kind: 'sequence',
+ resolve: resolveYamlOmap,
+ construct: constructYamlOmap
});

Powered by Google App Engine
This is Rietveld 408576698