first commit
This commit is contained in:
20
app_vue/node_modules/@hapi/hoek/lib/flatten.js
generated
vendored
Normal file
20
app_vue/node_modules/@hapi/hoek/lib/flatten.js
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
'use strict';
|
||||
|
||||
const internals = {};
|
||||
|
||||
|
||||
module.exports = internals.flatten = function (array, target) {
|
||||
|
||||
const result = target || [];
|
||||
|
||||
for (const entry of array) {
|
||||
if (Array.isArray(entry)) {
|
||||
internals.flatten(entry, result);
|
||||
}
|
||||
else {
|
||||
result.push(entry);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
Reference in New Issue
Block a user