Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
await Promise.all(this.src().map(src => { // eslint-disable-line array-callback-return
const options = {...this.options, ...src.options};
const sizes = arrayUniq(src.sizes.filter(/./.test, /^\d{2,4}x\d{2,4}$/i));
const keywords = arrayDiffer(src.sizes, sizes);
if (!src.url) {
throw new Error('URL required');
}
this.urls.push(src.url);
if (sizes.length === 0 && keywords.indexOf('w3counter') !== -1) {
return this.resolution(src.url, options);
}
if (keywords.length > 0) {
return this.viewport({url: src.url, sizes, keywords}, options);
}
for (const size of sizes) {
const updateGroup = async () => {
const remove = differ(initialGroupMembers, groupMembers)
const add = differ(groupMembers, initialGroupMembers)
await callDcMethodAsync('chat.modifyGroup', [groupId, groupName, groupImage, remove, add])
}
const onUpdateGroup = async () => {
export function extend(source, ext) {
let { _order: srcOrder } = source,
{ _order: extOrder, ...props } = ext,
extKeys = Object.keys(props);
let newTokens = diff(extKeys, srcOrder);
let def = clone(source);
return extendShallow(def, ext, {
_order: srcOrder.concat(newTokens)
});
}
export function insertBefore(source, before, insert) {
if (!isObj(source) || !source.hasOwnProperty("_order") || !Array.isArray(source._order)) {
throw new Error("Source does not have required property '_order' as an array.");
}
if (!isObj(insert) || !insert.hasOwnProperty("_order") || !Array.isArray(insert._order)) {
throw new Error("insert does not have required property '_order' as an array");
}
source._order = diff(source._order, Object.keys(insert));
let index = source._order.indexOf(before);
source._order.splice(index, 0, ...insert._order);
delete insert._order;
return extendShallow(source, insert);
}
const updateGroup = async () => {
const remove = differ(initialGroupMembers, groupMembers)
const add = differ(groupMembers, initialGroupMembers)
await callDcMethodAsync('chat.modifyGroup', [groupId, groupName, groupImage, remove, add])
}
const onUpdateGroup = async () => {