Coder Social home page Coder Social logo

eser / immunity Goto Github PK

View Code? Open in Web Editor NEW
27.0 5.0 6.0 6.99 MB

[Deprecated] 🧱 Library of methods for maintaining immutable data structures

License: Apache License 2.0

JavaScript 8.71% TypeScript 91.29%
immutable data-structures functional functional-js javascript-library

immunity's People

Contributors

eser avatar oguzzkilic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

immunity's Issues

Pick method

pick method

immunity.pickFromObject({ a: 1, b: 2, c: 3 }, 'a', 'c') == { a: 1, c: 3 }

Type-neutral methods

append(instance, ...args) {
    return Array.isArray(instance) ?
        this.appendToArray(instance, ...args) :
        this.appendToObject(instance, ...args);
}

[BUG] Npm run build fails to minify

Hey !

  • Node version : v9.7.1
  • npm version : 5.6.0
  • ponyfills version : 0.8.4
  • create-react-app version : 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 minify

Some 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:
  1. 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 in package.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.
  1. Fork the package and publish a corrected version yourself.

  2. 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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.