Comments (7)
Freezing of non enumerable properties is available from v3.0.0
Major version has been published because as side effect option to deepFreeze prototype chain has also been removed (braking change). { proto: true }
is not longer available because of undesired side effects. For more information on it reference v3.0.0 relese
from js-flock.
{ proto: true }
was dangerous but great feature. I'll miss it :)
from js-flock.
I will review it one more time and and consider bringing it back if I find some nice way of avoiding side effects (freezing built in JavaScript objects and their properties).
from js-flock.
As I see these side effects can be avoided by stopping prototype chain on one having constructor
property. So we can freeze all properties of prototype objects, but not freeze "prototype classes" (including things like global.Object
etc.).
This way if you freeze an array length
will be frozen but map
will not.
look my get-props for example.
from js-flock.
@astur Thanks for information i will investigate it.
I'm also open to contributions if you want to contribute to it?
from js-flock.
@astur new PR is in preparation that should allow freezing of prototype chain #44.
I still need to do some more testing and maybe some small modifications before merging it in.
If you have time feel free to take a look and comment.
Thanks!
from js-flock.
Looks safe enough. Good.
from js-flock.
Related Issues (14)
- Require single module without need to specify 'src' folder path
- promisify resolves only single parametar HOT 1
- deepFreeze doesn't freeze Symbol props HOT 1
- deepFreeze raises error on Buffer fields HOT 4
- deepFreeze skips child's of frozen objects HOT 1
- Document sort function stability HOT 3
- Promisify.all duplicate promisified functions on each call
- Browser support question / Reflect usage HOT 2
- I would like a syntax for sorting some properties ascending and others descending HOT 8
- Working incorrectly with character and number HOT 2
- Add timsort to benchmark HOT 2
- created by mistake
- Publish typescript types? 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 js-flock.