{ "_args": [ [ { "raw": "babel-plugin-transform-es2015-classes@^6.5.0", "scope": null, "escapedName": "babel-plugin-transform-es2015-classes", "name": "babel-plugin-transform-es2015-classes", "rawSpec": "^6.5.0", "spec": ">=6.5.0 <7.0.0", "type": "range" }, "/home/jdaugherty/work/GT2/GT2-Android/node_modules/babel-preset-react-native" ] ], "_from": "babel-plugin-transform-es2015-classes@>=6.5.0 <7.0.0", "_id": "babel-plugin-transform-es2015-classes@6.24.1", "_inCache": true, "_location": "/babel-plugin-transform-es2015-classes", "_nodeVersion": "6.9.0", "_npmOperationalInternal": { "host": "packages-18-east.internal.npmjs.com", "tmp": "tmp/babel-plugin-transform-es2015-classes-6.24.1.tgz_1491578375780_0.6034122135024518" }, "_npmUser": { "name": "hzoo", "email": "hi@henryzoo.com" }, "_npmVersion": "3.10.10", "_phantomChildren": {}, "_requested": { "raw": "babel-plugin-transform-es2015-classes@^6.5.0", "scope": null, "escapedName": "babel-plugin-transform-es2015-classes", "name": "babel-plugin-transform-es2015-classes", "rawSpec": "^6.5.0", "spec": ">=6.5.0 <7.0.0", "type": "range" }, "_requiredBy": [ "/babel-preset-fbjs", "/babel-preset-react-native" ], "_resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz", "_shasum": "5a4c58a50c9c9461e564b4b2a3bfabc97a2584db", "_shrinkwrap": null, "_spec": "babel-plugin-transform-es2015-classes@^6.5.0", "_where": "/home/jdaugherty/work/GT2/GT2-Android/node_modules/babel-preset-react-native", "dependencies": { "babel-helper-define-map": "^6.24.1", "babel-helper-function-name": "^6.24.1", "babel-helper-optimise-call-expression": "^6.24.1", "babel-helper-replace-supers": "^6.24.1", "babel-messages": "^6.23.0", "babel-runtime": "^6.22.0", "babel-template": "^6.24.1", "babel-traverse": "^6.24.1", "babel-types": "^6.24.1" }, "description": "Compile ES2015 classes to ES5", "devDependencies": { "babel-helper-plugin-test-runner": "^6.24.1" }, "directories": {}, "dist": { "shasum": "5a4c58a50c9c9461e564b4b2a3bfabc97a2584db", "tarball": "https://registry.npmjs.org/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz" }, "keywords": [ "babel-plugin" ], "license": "MIT", "main": "lib/index.js", "maintainers": [ { "name": "amasad", "email": "amjad.masad@gmail.com" }, { "name": "hzoo", "email": "hi@henryzoo.com" }, { "name": "jmm", "email": "npm-public@jessemccarthy.net" }, { "name": "loganfsmyth", "email": "loganfsmyth@gmail.com" }, { "name": "sebmck", "email": "sebmck@gmail.com" }, { "name": "thejameskyle", "email": "me@thejameskyle.com" } ], "name": "babel-plugin-transform-es2015-classes", "optionalDependencies": {}, "readme": "# babel-plugin-transform-es2015-classes\n\n> Compile ES2015 classes to ES5\n\n## Caveats\n\nBuilt-in classes such as `Date`, `Array`, `DOM` etc cannot be properly subclassed\ndue to limitations in ES5 (for the [es2015-classes](http://babeljs.io/docs/plugins/transform-es2015-classes) plugin).\nYou can try to use [babel-plugin-transform-builtin-extend](https://github.com/loganfsmyth/babel-plugin-transform-builtin-extend) based on `Object.setPrototypeOf` and `Reflect.construct`, but it also has some limitations.\n\n## Installation\n\n```sh\nnpm install --save-dev babel-plugin-transform-es2015-classes\n```\n\n## Usage\n\n### Via `.babelrc` (Recommended)\n\n**.babelrc**\n\n```js\n// without options\n{\n \"plugins\": [\"transform-es2015-classes\"]\n}\n\n// with options\n{\n \"plugins\": [\n [\"transform-es2015-classes\", {\n \"loose\": true\n }]\n ]\n}\n```\n\n### Via CLI\n\n```sh\nbabel --plugins transform-es2015-classes script.js\n```\n\n### Via Node API\n\n```javascript\nrequire(\"babel-core\").transform(\"code\", {\n plugins: [\"transform-es2015-classes\"]\n});\n```\n\n## Options\n\n### `loose`\n\n`boolean`, defaults to `false`.\n\n#### Method enumerability\n\nPlease note that in loose mode class methods **are** enumerable. This is not in line\nwith the spec and you may run into issues.\n\n#### Method assignment\n\nUnder loose mode, methods are defined on the class prototype with simple assignments\ninstead of being defined. This can result in the following not working:\n\n```javascript\nclass Foo {\n set bar() {\n throw new Error(\"foo!\");\n }\n}\n\nclass Bar extends Foo {\n bar() {\n // will throw an error when this method is defined\n }\n}\n```\n\nWhen `Bar.prototype.foo` is defined it triggers the setter on `Foo`. This is a\ncase that is very unlikely to appear in production code however it's something\nto keep in mind.\n", "readmeFilename": "README.md", "repository": { "type": "git", "url": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-es2015-classes" }, "scripts": {}, "version": "6.24.1" }