babel-plugin-transform-class-properties
Advanced tools
Comparing version 6.22.0 to 6.23.0
{ | ||
"name": "babel-plugin-transform-class-properties", | ||
"version": "6.22.0", | ||
"version": "6.23.0", | ||
"description": "This plugin transforms static class properties as well as properties declared with the property initializer syntax", | ||
@@ -12,6 +12,6 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-class-properties", | ||
"dependencies": { | ||
"babel-helper-function-name": "^6.22.0", | ||
"babel-helper-function-name": "^6.23.0", | ||
"babel-plugin-syntax-class-properties": "^6.8.0", | ||
"babel-runtime": "^6.22.0", | ||
"babel-template": "^6.22.0" | ||
"babel-template": "^6.23.0" | ||
}, | ||
@@ -18,0 +18,0 @@ "devDependencies": { |
@@ -36,3 +36,2 @@ # babel-plugin-transform-class-properties | ||
[Try in REPL](http://babeljs.io/repl/#?babili=false&evaluate=false&lineWrap=false&presets=es2016%2Clatest%2Cstage-2&code=%20%20class%20Bork%20%7B%0A%20%20%20%20%2F%2FProperty%20initilizer%20syntax%0A%20%20%20%20instanceProperty%20%3D%20%22bork%22%3B%0A%20%20%20%20boundFunction%20%3D%20()%20%3D%3E%20%7B%0A%20%20%20%20%20%20return%20this.instanceProperty%3B%0A%20%20%20%20%7D%0A%20%20%20%20%0A%20%20%20%20%2F%2FStatic%20class%20properties%0A%20%20%20%20static%20staticProperty%20%3D%20%22babeliscool%22%3B%0A%20%20%20%20static%20staticFunction%20%3D%20function()%20%7B%0A%20%20%20%20%20%20return%20Bork.staticProperty%3B%0A%20%20%20%20%7D%0A%20%20%7D%0A%0A%20%20let%20myBork%20%3D%20new%20Bork%3B%0A%0A%20%20%2F%2FProperty%20initializers%20are%20not%20on%20the%20prototype.%0A%20%20console.log(Bork.prototype.boundFunction)%3B%20%2F%2F%20%3E%20undefined%0A%0A%20%20%2F%2FBound%20functions%20are%20bound%20to%20the%20class%20instance.%0A%20%20console.log(myBork.boundFunction.call(undefined))%3B%20%2F%2F%20%3E%20%22bork%22%0A%0A%20%20%2F%2FStatic%20function%20exists%20on%20the%20class.%0A%20%20console.log(Bork.staticFunction())%3B%20%2F%2F%20%3E%20%22babelIsCool%22) | ||
@@ -81,6 +80,10 @@ ## Installation | ||
* `spec` - Class properties are compiled to use `Object.defineProperty. Static fields are now defined even if they are not initialized | ||
### `spec` | ||
`boolean`, defaults to `false`. | ||
Class properties are compiled to use `Object.defineProperty`. Static fields are now defined even if they are not initialized. | ||
## References | ||
* [Proposal: ES Class Fields & Static Properties](https://github.com/jeffmo/es-class-static-properties-and-fields) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
88
10707
1
Updatedbabel-template@^6.23.0