Adds SFRA 6.0

This commit is contained in:
Isaac Vallee
2021-12-21 10:57:31 -08:00
parent d04eb5dd16
commit 823c7608c3
1257 changed files with 137087 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
'use strict';
function map() {
var args = Array.from(arguments);
var list = args[0];
var callback = args[1];
if (list && Object.prototype.hasOwnProperty.call(list, 'toArray')) {
list = list.toArray();
}
return list ? list.map(callback) : [];
}
function find() {
var args = Array.from(arguments);
var list = args[0];
var callback = args[1];
if (list && Object.prototype.hasOwnProperty.call(list, 'toArray')) {
list = list.toArray();
}
return list ? list.find(callback) : null;
}
function forEach() {
var args = Array.from(arguments);
var list = args[0];
var callback = args[1];
if (list && Object.prototype.hasOwnProperty.call(list, 'toArray')) {
list = list.toArray();
}
return list ? list.forEach(callback) : null;
}
function every() {
var args = Array.from(arguments);
var list = args[0];
var callback = args[1];
if (list && Object.prototype.hasOwnProperty.call(list, 'toArray')) {
list = list.toArray();
}
return list ? list.every(callback) : null;
}
module.exports = {
find: find,
forEach: forEach,
map: map,
every: every
};