| Index: node_modules/vulcanize/node_modules/update-notifier/node_modules/configstore/node_modules/js-yaml/lib/js-yaml/type/bool.js
|
| diff --git a/node_modules/vulcanize/node_modules/update-notifier/node_modules/configstore/node_modules/js-yaml/lib/js-yaml/type/bool.js b/node_modules/vulcanize/node_modules/update-notifier/node_modules/configstore/node_modules/js-yaml/lib/js-yaml/type/bool.js
|
| index 9e69f4a0c199cb1e11266e8191e0711e71892e32..5c2a304d8a46d8f11cd9d752d15f81f54b8a5627 100644
|
| --- a/node_modules/vulcanize/node_modules/update-notifier/node_modules/configstore/node_modules/js-yaml/lib/js-yaml/type/bool.js
|
| +++ b/node_modules/vulcanize/node_modules/update-notifier/node_modules/configstore/node_modules/js-yaml/lib/js-yaml/type/bool.js
|
| @@ -1,67 +1,37 @@
|
| 'use strict';
|
|
|
| -
|
| var Type = require('../type');
|
|
|
| -
|
| -var YAML_IMPLICIT_BOOLEAN_MAP = {
|
| - 'true' : true,
|
| - 'True' : true,
|
| - 'TRUE' : true,
|
| - 'false' : false,
|
| - 'False' : false,
|
| - 'FALSE' : false
|
| -};
|
| -
|
| -/*var YAML_EXPLICIT_BOOLEAN_MAP = {
|
| - 'true' : true,
|
| - 'True' : true,
|
| - 'TRUE' : true,
|
| - 'false' : false,
|
| - 'False' : false,
|
| - 'FALSE' : false,
|
| - 'y' : true,
|
| - 'Y' : true,
|
| - 'yes' : true,
|
| - 'Yes' : true,
|
| - 'YES' : true,
|
| - 'n' : false,
|
| - 'N' : false,
|
| - 'no' : false,
|
| - 'No' : false,
|
| - 'NO' : false,
|
| - 'on' : true,
|
| - 'On' : true,
|
| - 'ON' : true,
|
| - 'off' : false,
|
| - 'Off' : false,
|
| - 'OFF' : false
|
| -};*/
|
| -
|
| -
|
| -function resolveYamlBoolean(state) {
|
| - if (YAML_IMPLICIT_BOOLEAN_MAP.hasOwnProperty(state.result)) {
|
| - state.result = YAML_IMPLICIT_BOOLEAN_MAP[state.result];
|
| - return true;
|
| - } else {
|
| +function resolveYamlBoolean(data) {
|
| + if (null === data) {
|
| return false;
|
| }
|
| +
|
| + var max = data.length;
|
| +
|
| + return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) ||
|
| + (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE'));
|
| }
|
|
|
| +function constructYamlBoolean(data) {
|
| + return data === 'true' ||
|
| + data === 'True' ||
|
| + data === 'TRUE';
|
| +}
|
|
|
| function isBoolean(object) {
|
| return '[object Boolean]' === Object.prototype.toString.call(object);
|
| }
|
|
|
| -
|
| module.exports = new Type('tag:yaml.org,2002:bool', {
|
| - loadKind: 'scalar',
|
| - loadResolver: resolveYamlBoolean,
|
| - dumpPredicate: isBoolean,
|
| - dumpRepresenter: {
|
| + kind: 'scalar',
|
| + resolve: resolveYamlBoolean,
|
| + construct: constructYamlBoolean,
|
| + predicate: isBoolean,
|
| + represent: {
|
| lowercase: function (object) { return object ? 'true' : 'false'; },
|
| uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; },
|
| camelcase: function (object) { return object ? 'True' : 'False'; }
|
| },
|
| - dumpDefaultStyle: 'lowercase'
|
| + defaultStyle: 'lowercase'
|
| });
|
|
|