@poppinss/utils
Advanced tools
Comparing version 6.4.0-0 to 6.5.0-0
/// <reference types="node" resolution-mode="require"/> | ||
export { base64 } from './src/base64.js'; | ||
export { compose } from './src/compose.js'; | ||
export { importDefault } from './src/import_default.js'; | ||
export { defineStaticProperty } from './src/define_static_property.js'; | ||
@@ -5,0 +6,0 @@ export { Exception, createError } from './src/exception.js'; |
@@ -5,2 +5,3 @@ import { fileURLToPath } from 'node:url'; | ||
export { compose } from './src/compose.js'; | ||
export { importDefault } from './src/import_default.js'; | ||
export { defineStaticProperty } from './src/define_static_property.js'; | ||
@@ -7,0 +8,0 @@ export { Exception, createError } from './src/exception.js'; |
{ | ||
"name": "@poppinss/utils", | ||
"version": "6.4.0-0", | ||
"version": "6.5.0-0", | ||
"description": "Handy utilities for repetitive work", | ||
@@ -64,3 +64,3 @@ "main": "build/index.js", | ||
"@japa/spec-reporter": "^1.3.2", | ||
"@swc/core": "^1.3.27", | ||
"@swc/core": "^1.3.29", | ||
"@types/fs-extra": "^11.0.1", | ||
@@ -67,0 +67,0 @@ "@types/node": "^18.11.18", |
@@ -940,2 +940,12 @@ # @poppinss/utils | ||
#### importDefault | ||
A helper function that assert a lazy import function output to have a `default export`, otherwise raises an exception. | ||
We use dynamic default exports a lot in AdonisJS apps, so extracting the check to a helper function. | ||
```ts | ||
import { importDefault } from '@poppinss/utils' | ||
const defaultVal = await importDefault(() => import('./some_module.js')) | ||
``` | ||
#### naturalSort | ||
@@ -942,0 +952,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
99192
75
1122
1109