GitShow/sindresorhus/import-lazy
sindresorhus

import-lazy

Import a module lazily

by sindresorhus
Star on GitHubForknpm

JavaScript

248 stars18 forks11 contributorsQuiet · 3y agoSince 2014v4.0.0MIT

Meet the team

See all 11 on GitHub →
sindresorhus
sindresorhus26 contributions
bfred-it
bfred-it2 contributions
sonicdoe
sonicdoe2 contributions
danielhusar
danielhusar1 contribution
BendingBender
BendingBender1 contribution
fabiospampinato
fabiospampinato1 contribution
jamestalmage
jamestalmage1 contribution
rjoaopereira
rjoaopereira1 contribution

Languages

View on GitHub →
JavaScript92.3%
TypeScript7.7%

Commit activity

Last 12 weeks · 0 commits

Full graph →

Community health

4 of 6 standards met

Community profile →
85
✓README✓License✓Contributing✓Code of Conduct○Issue Template○PR Template

Recent fixes

View closed PRs →
jamestalmage
Consider `laxy`ClosedIssue

While not my intention when initially creating , it ended up being a drop in replacement for this module. It has a few key advantages: It's a more generalized Proxy generator. Allowing for any generator function (not just ), and allows passing any number of arguments. It implements much more of the Proxy API. Allowing things like , , setting values, and reflecting on property descriptors of the underlying object, etc. will work exactly as this module does, so the API is a drop in replacement. Proxy can be made to respond correctly to ( will always report regardless of the proxied object). Support for revocable proxies. It has a fun name. Obviously not all of those are applicable to the goal of lazy importing, but there are a few items worth porting here at a minimum.

jamestalmage · 10mo ago
mitkofff
Export default case was addedMergedPR

I would like to use this library in one of my projects, but it doesn't support ES6 "export default". In the current PR I suggest a little change that will make export default to be supported. Also I've added the test for this code/case.

mitkofff · 3y ago
ybiquitous
TypeScript failure with "Usage with bundlers" exampleClosedIssue

Hi there, When I try the "Usage with bundlers" example in README with TypeScript, the following failure occurs: https://github.com/sindresorhus/import-lazy/tree/4fea4ed97eb932fa997e2d8efeef298d3aa531a7#usage-with-bundlers I think the argument should be optional, but I'm not confident: https://github.com/sindresorhus/import-lazy/blob/4fea4ed97eb932fa997e2d8efeef298d3aa531a7/index.d.ts#L22-L24 What do you think? Reproduction : : : Related to #15

ybiquitous · 4y ago
Structured data for AI agents

Repository: sindresorhus/import-lazy. Description: Import a module lazily Stars: 248, Forks: 18. Primary language: JavaScript. Languages: JavaScript (92.3%), TypeScript (7.7%). License: MIT. Latest release: v4.0.0 (7y ago). Open PRs: 0, open issues: 0. Last activity: 3y ago. Community health: 85%. Top contributors: sindresorhus, bfred-it, sonicdoe, danielhusar, BendingBender, fabiospampinato, jamestalmage, rjoaopereira, Richienb.

·@ofershap

Replace github.com with gitshow.dev