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

Unified Diff: node_modules/vulcanize/node_modules/update-notifier/node_modules/configstore/node_modules/js-yaml/lib/js-yaml/type/null.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/null.js
diff --git a/node_modules/vulcanize/node_modules/update-notifier/node_modules/configstore/node_modules/js-yaml/lib/js-yaml/type/null.js b/node_modules/vulcanize/node_modules/update-notifier/node_modules/configstore/node_modules/js-yaml/lib/js-yaml/type/null.js
index 3ea02df27685ae566af792130b58747309d18627..3474055698f5ddb7e11085766431ad16b4a8fc58 100644
--- a/node_modules/vulcanize/node_modules/update-notifier/node_modules/configstore/node_modules/js-yaml/lib/js-yaml/type/null.js
+++ b/node_modules/vulcanize/node_modules/update-notifier/node_modules/configstore/node_modules/js-yaml/lib/js-yaml/type/null.js
@@ -1,40 +1,36 @@
'use strict';
-
var Type = require('../type');
-
-var YAML_NULL_MAP = {
- '~' : true,
- 'null' : true,
- 'Null' : true,
- 'NULL' : true
-};
-
-
-function resolveYamlNull(state) {
- if (YAML_NULL_MAP.hasOwnProperty(state.result)) {
- state.result = null;
+function resolveYamlNull(data) {
+ if (null === data) {
return true;
}
- return false;
+
+ var max = data.length;
+
+ return (max === 1 && data === '~') ||
+ (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL'));
}
+function constructYamlNull() {
+ return null;
+}
function isNull(object) {
return null === object;
}
-
module.exports = new Type('tag:yaml.org,2002:null', {
- loadKind: 'scalar',
- loadResolver: resolveYamlNull,
- dumpPredicate: isNull,
- dumpRepresenter: {
+ kind: 'scalar',
+ resolve: resolveYamlNull,
+ construct: constructYamlNull,
+ predicate: isNull,
+ represent: {
canonical: function () { return '~'; },
lowercase: function () { return 'null'; },
uppercase: function () { return 'NULL'; },
camelcase: function () { return 'Null'; }
},
- dumpDefaultStyle: 'lowercase'
+ defaultStyle: 'lowercase'
});

Powered by Google App Engine
This is Rietveld 408576698