{"name":"@swc-node/core","version":"0.6.1","keywords":["swc","babel","esbuild","rust","n-api","napi","node-rs","uglify","napi-rs","terser","webpack","ts-node","typescript","tsc"],"author":{"name":"LongYinan","email":"lynweklm@gmail.com"},"license":"MIT","_id":"@swc-node/core@0.6.1","homepage":"https://github.com/Brooooooklyn/swc-node","bugs":{"url":"https://github.com/Brooooooklyn/swc-node/issues"},"os":["darwin","linux","win32"],"cpu":["x64"],"dist":{"shasum":"f3cf3b669f094f6b3d6f78ade54224aaa62a3362","tarball":"http://registry-npm.ywwl.com/@swc-node/core/download/@swc-node/core-0.6.1.tgz","fileCount":8,"integrity":"sha512-5DXGG7u1lawiZuqv2MDgKgXNpjXu08uxg89bPU8PJATGeP+EQtJDgHwM7uF1hmRM1wsOsIy4o1t10w6NUWKCxQ==","signatures":[{"sig":"MEUCIQDEmvTiq8GAw9QElxnoN/PYaLxVqSRTLTupVLtZSJm9RQIgFmXrIkA+8rT5PLdpBLUOubQVfTG0sQ7bUEhw0g/0ln0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":169639,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfTjWNCRA9TVsSAnZWagAAQn8P/jo1kMaM0FVq57MvJWQW\nAkCH/YYQq9ZVl4HH4ZzDEe1fK0m11tQi6yRaavWf4sZ4d5axbolE+qj5nGi0\njgcxjOdiOxUIwXnyNSf3nDNoORGNc9YAciM347FSPbDUTVfN79MV5rvoqlvc\nQN1jh53DeFFG908tHAp6iPgGYkEeJ61Faf6E5LRWUneeJLhyYs0xRxL+h0Rx\nz1GdN5ttlLdk7Xb6tt0QyiY+s2VXVEAX5XHnObhIrP7kJcqbMYoA+wMskM+K\nXZJeYputCe3kCRkynT/ZPLrr2q7kHceqUaMLPvjQzWt8e/syq2qC0qbvSqqU\n2KmGDCE1HBwjGAE3CRCPjznPBF/4OIlYhPYvlfphcf6MbyJsBk05SIjCi3GZ\nGtT6sZd+Jn5lKsduq4TL4jkhXUNcTrPLEw+OLJlYu3v87Cv/1tkz4VmM00xb\neC9Qs+IO0S4XvBtpcXYl4r4MFH5QQ8K49uahHubyXaP+ns5DtfibiVmSz/92\nlmTHehwz2RsIwuCNqdFJdCfbBhK9b2iWsVdGqbK6i+SMeZe0V6pZDVMVL3UO\n8jP+UbG6KGCDteLbELV/ShhBXAVq9jAwNAxhzeS/58o+n9HlsDckfAiBy0ra\nDvXLt2Zjks2u9TnP7JDAe+xgcNRMIY6p0GvKtcfm9vM1a6Acl3vhiFfwWF46\nSosV\r\n=BJvv\r\n-----END PGP SIGNATURE-----\r\n","size":16196,"noattachment":false,"key":"/@swc-node/core/-/@swc-node/core-0.6.1.tgz"},"main":"lib/index.js","engines":{"node":">= 8.9"},"gitHead":"e7161ff24de4ba63f068244e4a4a20df22f135ff","scripts":{"version":"node -r @swc-node/register ./version.ts","prepublishOnly":"node -r @swc-node/register ./publish.ts"},"typings":"lib/index.d.ts","_npmUser":{"name":"broooooklyn","email":"lynweklm@gmail.com"},"repository":{"url":"git+https://github.com/Brooooooklyn/swc-node.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v12.18.3+x64 (linux)","description":"Faster swc nodejs binding","directories":{},"_nodeVersion":"12.18.3","dependencies":{"@node-rs/helper":"^0.3.1","@swc-node/core-linux":"^0.6.1","@swc-node/core-win32":"^0.6.1","@swc-node/core-darwin":"^0.6.1"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"optionalDependencies":{"@swc-node/core-linux":"^0.6.1","@swc-node/core-win32":"^0.6.1","@swc-node/core-darwin":"^0.6.1"},"_npmOperationalInternal":{"tmp":"tmp/core_0.6.1_1598961036624_0.8409200908934313","host":"s3://npm-registry-packages"},"readme":"# `@swc-node/core`\n\n<a href=\"https://npmcharts.com/compare/@swc-node/core?minimal=true\"><img src=\"https://img.shields.io/npm/dm/@swc-node/core.svg?sanitize=true\" alt=\"Downloads\" /></a>\n\n> 🚀 Help me to become a full-time open-source developer by [sponsoring me on Github](https://github.com/sponsors/Brooooooklyn)\n\n## Benchmark\n\n> transform AjaxObservable.ts to ES2015 & CommonJS `JavaScript`.\n\n```\n@swc-node/core x 151 ops/sec ±3.74% (77 runs sampled)\n@swc/core x 107 ops/sec ±0.51% (78 runs sampled)\nesbuild x 52.89 ops/sec ±1.58% (67 runs sampled)\ntypescript x 21.08 ops/sec ±9.68% (40 runs sampled)\nTransform rxjs/AjaxObservable.ts benchmark bench suite: Fastest is @swc-node/core\n```\n\n## Usage\n\n```ts\nexport interface Options {\n  target?: 'es3' | 'es5' | 'es2015' | 'es2016' | 'es2017' | 'es2018' | 'es2019' | 'es2020'\n  module?: 'commonjs' | 'umd' | 'amd' | 'es6'\n  sourcemap?: boolean | 'inline'\n  experimentalDecorators?: boolean\n  emitDecoratorMetadata?: boolean\n  dynamicImport?: boolean\n  esModuleInterop?: boolean\n  keepClassNames?: boolean\n  react?: Partial<ReactConfig>\n  paths?: {\n    [from: string]: [string]\n  }\n}\n\nexport interface ReactConfig {\n  /**\n   * Replace the function used when compiling JSX expressions.\n   *\n   * Defaults to `React.createElement`.\n   */\n  pragma: string\n  /**\n   * Replace the component used when compiling JSX fragments.\n   *\n   * Defaults to `React.Fragment`\n   */\n  pragmaFrag: string\n  /**\n   * Toggles whether or not to throw an error if a XML namespaced tag name is used. For example:\n   * `<f:image />`\n   *\n   * Though the JSX spec allows this, it is disabled by default since React's\n   * JSX does not currently have support for it.\n   *\n   */\n  throwIfNamespace: boolean\n  /**\n   * Toggles plugins that aid in development, such as @swc/plugin-transform-react-jsx-self\n   * and @swc/plugin-transform-react-jsx-source.\n   *\n   * Defaults to `false`,\n   *\n   */\n  development: boolean\n  /**\n   * Use `Object.assign()` instead of `_extends`. Defaults to false.\n   */\n  useBuiltins: boolean\n}\n\nexport function transformSync(\n  source: string | Buffer,\n  path: string,\n  options?: Options,\n): {\n  code: string\n  map: string\n}\n\nexport function transform(\n  source: string | Buffer,\n  path: string,\n  options?: Options,\n): Promise<{\n  code: string\n  map: string\n}>\n```\n","publish_time":1598961036750,"maintainers":[{"name":"broooooklyn","email":"lynweklm@gmail.com"}],"_cnpm_publish_time":1598961036750,"dist-tags":{"latest":"1.15.0"}}