Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@poppinss/utils

Package Overview
Dependencies
Maintainers
2
Versions
89
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@poppinss/utils - npm Package Compare versions

Comparing version 6.4.0-0 to 6.5.0-0

build/src/import_default.d.ts

1

build/index.d.ts
/// <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';

4

package.json
{
"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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc