eser / immunity Goto Github PK
View Code? Open in Web Editor NEW[Deprecated] 🧱 Library of methods for maintaining immutable data structures
License: Apache License 2.0
[Deprecated] 🧱 Library of methods for maintaining immutable data structures
License: Apache License 2.0
pick method
immunity.pickFromObject({ a: 1, b: 2, c: 3 }, 'a', 'c') == { a: 1, c: 3 }
append(instance, ...args) {
return Array.isArray(instance) ?
this.appendToArray(instance, ...args) :
this.appendToObject(instance, ...args);
}
Lerna is currently release candidate for version 2.0. As soon as they published 2.0, looking possibilities of managing npm packages with Lerna would be useful.
Hey !
v9.7.1
5.6.0
0.8.4
v1.1.1
When running npm run build
:
Creating an optimized production build...
Failed to compile.
Failed to minify the code from this file:
./node_modules/ponyfills/lib/assign.js:3
Read more here: http://bit.ly/2tRViJ9
This leads to facebook/create-react-app/.../README.md#npm-run-build-fails-to-minify which tell us :
npm run build
fails to minifySome third-party packages don't compile their code to ES5 before publishing to npm. This often causes problems in the ecosystem because neither browsers (except for most modern versions) nor some tools currently support all ES6 features. We recommend to publish code on npm as ES5 at least for a few more years.
To resolve this:
- Open an issue on the dependency's issue tracker and ask that the package be published pre-compiled.
- Note: Create React App can consume both CommonJS and ES modules. For Node.js compatibility, it is recommended that the main entry point is CommonJS. However, they can optionally provide an ES module entry point with the
module
field inpackage.json
. Note that even if a library provides an ES Modules version, it should still precompile other ES6 features to ES5 if it intends to support older browsers.
Fork the package and publish a corrected version yourself.
If the dependency is small enough, copy it to your
src/
folder and treat it as application code.In the future, we might start automatically compiling incompatible third-party modules, but it is not currently supported. This approach would also slow down the production builds.
I think the best solution is to precompile to ES5, and btw avoid any compatibility issue.
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.