Socket
Socket
Sign inDemoInstall

sylvanas

Package Overview
Dependencies
10
Maintainers
3
Versions
20
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    sylvanas

Covert TS to JS


Version published
Weekly downloads
7.5K
decreased by-11.76%
Maintainers
3
Install size
157 MB
Created
Weekly downloads
 

Readme

Source

Sylvanas

A tool to convert TypeScript to JavaScript with human-like code style.

How to use

npm install --save-dev sylvanas

sylvanas(files: string[], option?: Option)

const sylvanas = require('sylvanas');

const files = glob.sync('**/*.@(ts|tsx)');

const fileList = sylvanas(files);

fileList.forEach(({ data }) => {
  console.log('Trans:', data);
});

Option

cwd - string

The current working directory in which to search. Defaults to process.cwd().

action - none | write | overwrite

Default none. Set what will Sylvanas do with files:

  • write: Write new file with name of suffix .js or .jsx.
  • overwrite: Like write but will remove origin files.
outDir - string

Set the write file folder. Defaults to cwd.

decoratorsBeforeExport - boolean

Same as babel decoratorsbeforeexport.

FAQs

Last updated on 05 Nov 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc