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

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

Issue 800513006: Added vulcanize under third_party/npm_modules (Closed) Base URL: https://chromium.googlesource.com/infra/third_party/npm_modules.git@master
Patch Set: Created 6 years 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/common.js
diff --git a/node_modules/vulcanize/node_modules/update-notifier/node_modules/configstore/node_modules/js-yaml/lib/js-yaml/common.js b/node_modules/vulcanize/node_modules/update-notifier/node_modules/configstore/node_modules/js-yaml/lib/js-yaml/common.js
new file mode 100644
index 0000000000000000000000000000000000000000..d60b7492450dff69b95700e25beedd545170936c
--- /dev/null
+++ b/node_modules/vulcanize/node_modules/update-notifier/node_modules/configstore/node_modules/js-yaml/lib/js-yaml/common.js
@@ -0,0 +1,56 @@
+'use strict';
+
+
+function isNothing(subject) {
+ return (undefined === subject) || (null === subject);
+}
+
+
+function isObject(subject) {
+ return ('object' === typeof subject) && (null !== subject);
+}
+
+
+function toArray(sequence) {
+ if (Array.isArray(sequence)) {
+ return sequence;
+ } else if (isNothing(sequence)) {
+ return [];
+ } else {
+ return [ sequence ];
+ }
+}
+
+
+function extend(target, source) {
+ var index, length, key, sourceKeys;
+
+ if (source) {
+ sourceKeys = Object.keys(source);
+
+ for (index = 0, length = sourceKeys.length; index < length; index += 1) {
+ key = sourceKeys[index];
+ target[key] = source[key];
+ }
+ }
+
+ return target;
+}
+
+
+function repeat(string, count) {
+ var result = '', cycle;
+
+ for (cycle = 0; cycle < count; cycle += 1) {
+ result += string;
+ }
+
+ return result;
+}
+
+
+module.exports.isNothing = isNothing;
+module.exports.isObject = isObject;
+module.exports.toArray = toArray;
+module.exports.repeat = repeat;
+module.exports.extend = extend;

Powered by Google App Engine
This is Rietveld 408576698