const isFlowCompleted = ( state: State ) => LaunchSequence.slice( 0, LaunchSequence.length - 1 ).every( ( step ) => isStepCompleted( state, step ) )
function isKept(thePath) { return thePath.endsWith(".cache") || keptPaths.every((dirname) => ! thePath.startsWith(dirname)) }
/** * Whether this presence is equal to another. * @param {Presence} presence The presence to compare with * @returns {boolean} */ equals(presence) { return ( this === presence || (presence && this.status === presence.status && this.activities.length === presence.activities.length && this.activities.every((activity, index) => activity.equals(presence.activities[index])) && this.clientStatus.web === presence.clientStatus.web && this.clientStatus.mobile === presence.clientStatus.mobile && this.clientStatus.desktop === presence.clientStatus.desktop) ); }
/** * Only refreshes metadata if the data is stale according to the `metadataMaxAge` param * * @public * @param {Array<String>} topics * @returns {Promise<null>} */ async refreshMetadataIfNecessary(topics) { const shouldRefresh = this.metadata == null || this.metadataExpireAt == null || Date.now() > this.metadataExpireAt || !topics.every(topic => this.metadata.topicMetadata.some(topicMetadata => topicMetadata.topic === topic) ) if (shouldRefresh) { return this.refreshMetadata(topics) } }
function isKept(thePath) { return keptPaths.every((dirname) => ! thePath.startsWith(dirname)) }
const isValidKeys = obj => { const keys = Object.keys(obj); return keys.every(key => /^[A-Za-z]/i.test(key[0])); }
Object.keys(plugins).every(plugin => plugins[plugin].isReady === true)
function inAllSets (first, ...rest) { return first.filter(value => rest.every((collection) => collection.includes(value))) }
const isUserComplete = ( user: GSuiteNewUser ): boolean => { return getFields( user ).every( ( { value } ) => '' !== value ); }
const areAllUsersValid = ( users: GSuiteNewUser[] ): boolean => 0 < users.length && users.every( isUserValid )
export function objectIsProduct( item: object ): item is Product { const requiredKeys = [ 'product_slug', 'product_name', 'term', 'bill_period' ]; return requiredKeys.every( ( k ) => k in item ); }
Object.keys(options).every(key => !options[key])
Object.keys(plugins).every(plugin => plugins[plugin].isReady === true)