hulilabs / ju-shared Goto Github PK
View Code? Open in Web Editor NEWObject-Oriented Javascript and utilities for web applications
Object-Oriented Javascript and utilities for web applications
Today I found a situation where my wifi chipset and the browser where "unreachable", ending in a situation where the window.navigator.onLine
always return false
. This means a user may think there is no connection BUT it does.
ENVIRONMENT
Macbook Pro 2015
Chrome Version 64.0.3282.140
We are adding a new utility function to compare two objects deeply. If they have the same key values regardless of the order, the two objects will be the same.
ticket related with hulilabs/ju-mvc#2
The callback beforeMakingAjaxRequest
in the code below simply does what the code in the else
executes. I'd like to remove the callback in order for the hook to be able to do more useful processing without having the side effect of executing the ajax callback.
if ('function' === typeof this.opts.beforeMakingAjaxRequest) {
var performAjaxRequestCallback = $.proxy($.ajax, $);
return this.opts.beforeMakingAjaxRequest(performAjaxRequestCallback, params);
} else {
// if no hook is provided, performs the request
return $.ajax(params);
}
Since merging a pull request to expose the $.ajax handler (#11) we're allowing the developers to add code that's tightly coupled with jQuery's API.
We should wrap this object with BaseProxy
's methods in order to avoid such dependency.
If you look at the current error logger function it adds the error context depending on whether an Error
object is provided as the first argument or not.
If the Error
object isn't the first argument, a more generic stack trace will be generated and, more importantly, the context sent to the server will skip the original error message, as JSON.stringify(Error)
won't work; and the common case is to log errors like Logger.error('Something custom failed', errorThrown, moreDetails...)
We should get the proper error stack regardless of the position of the error argument
Add a workaround to prevent this jQuery behavior: https://bugs.jquery.com/ticket/8417
We need to add more information to the logger so we get useful data.
Adding the stack trace when there is an error would be a great start.
Add libraries and helpers to give JWT support
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.