Remove default exports (#755)
* Remove default exports * Cleanup tests * Exports in util * Single secp256k1 instance * Length check * format check * encoded lengths
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
// Copyright 2017-2020 @polkadot/util authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import isNull from '../is/null';
|
||||
import isUndefined from '../is/undefined';
|
||||
import { isNull } from '../is/null';
|
||||
import { isUndefined } from '../is/undefined';
|
||||
|
||||
/**
|
||||
* @name arrayFilter
|
||||
@@ -20,7 +20,7 @@ import isUndefined from '../is/undefined';
|
||||
* ```
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
export default function arrayFilter <T = any> (array: T[], allowNulls = true): T[] {
|
||||
export function arrayFilter <T = any> (array: T[], allowNulls = true): T[] {
|
||||
return array.filter((value) =>
|
||||
!isUndefined(value) && (allowNulls || !isNull(value))
|
||||
);
|
||||
|
||||
@@ -5,4 +5,4 @@
|
||||
* @summary Utility methods that operates on arrays
|
||||
*/
|
||||
|
||||
export { default as arrayFilter } from './filter';
|
||||
export { arrayFilter } from './filter';
|
||||
|
||||
Reference in New Issue
Block a user