/** * Copyright (c) 2017 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author David Sehnal * @author Alexander Rose */ import BitFlags from './bit-flags' import Computation from './computation' import Scheduler from './scheduler' import StringBuilder from './string-builder' import Time from './time' import UUID from './uuid' export { BitFlags, Computation, Scheduler, StringBuilder, Time, UUID } export function arrayEqual(arr1: T[], arr2: T[]) { const length = arr1.length if (length !== arr2.length) return false for (let i = 0; i < length; i++) { if (arr1[i] !== arr2[i]) { return false } } return true } export function defaults (value: any, defaultValue: any) { return value !== undefined ? value : defaultValue }