Comments (4)
Hm, strange, I haven’t tried it on projects without browserify-shim so I haven’t encountered this error. I have browserify-shim as dev dependancy in this module so it won’t be installed when installing from npm by default.
Easiest way to have it be required as it should is to install browserify-shim as dev dependancy in your project and it should be picked up as usual. But maybe I should revise this module and remove browserify-shim as dependancy altogether and leave shimming on per project basis (or move browserify-shim to standard dependancy).
from throttle-debounce.
@realph I’ve pushed new version which applies browserify-shim only for standalone build. Shimming is there only because standalone builds don’t pack whole jQuery but expect it to already be available in global namespace. For every CommonJS build process (Browserify, Webpack, etc.) developers should take care to partialize their bundles (I suppose you already do this as part of bundling process).
Can you confirm that it’s working now?
from throttle-debounce.
This module doesn't seem to be meant to work outside of browser/jquery environment, which is a shame since there's absolutely no reason to tie this to jquery. It should really export proper functions and let consumer decide how and where to bolt them onto if there's a need.
For convenience, standalone version is also provided and it maps to jQuery namespace if it exists, otherwise it adds two methods to global (window) namespace.
from throttle-debounce.
Hey @alexgorbatchev, sorry for super late reply!
I’ve just pushed new major release which remove jQuery as dependancy, doesn’t rely on Browserify and shimming and works as standard CommonJS module. Hope this solves your issue!
from throttle-debounce.
Related Issues (20)
- The cancel() method prevents all future invocations HOT 6
- `noTrailing` exegesis error HOT 2
- How can I get `value` in `react`? HOT 3
- [Violation] 'setTimeout' handler took <some value>ms HOT 3
- Feature request: Add noLeading option HOT 9
- Usage example doesn't show well the basic functionality HOT 3
- License is unclear HOT 2
- Dual license of MIT/GPL HOT 1
- Feature request: is pending HOT 1
- Cant seem to get Throttle working with onClick HOT 2
- debounce and throttle seems to decrease performance for window.onscroll HOT 5
- Update types for new version HOT 4
- Normalize debounce API with throttle API changes HOT 5
- Throttle does not throttle on first call HOT 4
- It is recommended that the change information of API be noted in the README.md file. HOT 3
- async debounce? HOT 6
- Can I only comply with the MIT license?
- Strange behaviour with React useState + debounce HOT 5
- Proposal to add/adopt adaptive sync throttling method
- License condition HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from throttle-debounce.