gilbarbara / is-lite Goto Github PK
View Code? Open in Web Editor NEWType check tool
License: MIT License
Type check tool
License: MIT License
I am currently using react-joyride in my current project, and I am facing an issue when starting the tour. The application fails with with error Error: Expected plain objects or array. Upon investigation I found that is.plainObject method of is-lite library is returning false even when both the objects are similar.
Specifically the comparison prototype === Object.getPrototypeOf({}) https://github.com/gilbarbara/is-lite/blob/main/src/index.ts#L233-L235 is returning false.
Issue occurs during react-joyride: step:0 and while comparing previousProps with this.props. Unfortunately I can not share the code where this issue is coming because of company's privacy policy. But please let me know what other information I can provide.
Interestingly if I create a standalone project and use react-joyride there, everything works fine.
Can it be related to polyfills?
It would be nice to put a note somewhere, that IE is not supported by this library, because of these lines:
Lines 160 to 162 in 6b60914
Number.isNaN is not supported by IE.
Hi, came from react-joyride
and it throws on IE11, which traced back to is.nan
:
https://github.com/gilbarbara/is-lite/blob/v0.6.0/src/index.ts#L163-L165
Number
don't have the isNaN
function defined in legacy browsers.
Question
Are you willing to support legacy browsers? Guess that might against your intention of having this package.
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.