# js2cp

> A Javascript to C++ "Translator", built from Node.js!

Latest version **2.0.2** (published 2023-02-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install js2cp
pnpm add js2cp
yarn add js2cp
bun add js2cp
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.2 |
| Published | 2023-02-28 |
| First published | 2021-07-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 13.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | borecjeborec1 |
| Maintainers | borecjeborec1 |

## Links

- npm: https://www.npmjs.com/package/js2cp
- Repository: https://github.com/borecjeborec1/js2cp
- Homepage: https://github.com/borecjeborec1/js2cp#readme
- Issues: https://github.com/borecjeborec1/js2cp/issues
- npm.io page: https://npm.io/package/js2cp

## Dependencies (1)

- [acorn](https://npm.io/package/acorn.md) 8.8.2

## Recent versions

- 2.0.2 (latest) — 2023-02-28
- 2.0.1 — 2023-02-28
- 2.0.0 — 2023-02-28
- 1.0.12 — 2021-09-19
- 1.0.11 — 2021-07-31
- 1.0.10 — 2021-07-30
- 1.0.9 — 2021-07-30
- 1.0.8 — 2021-07-30
- 1.0.7 — 2021-07-30
- 1.0.6 — 2021-07-30
- 1.0.5 — 2021-07-30
- 1.0.4 — 2021-07-30
- 1.0.3 — 2021-07-29
- 1.0.2 — 2021-07-29
- 1.0.1 — 2021-07-27
- … 1 more at https://npm.io/package/js2cp/versions

## README

# JS2CP

A Javascript to C++ "Translator", built from Node.js!

# Installation

#### Local install

    npm install js2cp

# Usage
#### Local usage

    const js2cp = require("js2cp")
    js2cp.translate("Path to js program") //js2cp.translate("test.js")

# Examples

---

Let's assume u have your extra powerful hello world program.

> helloWorld.js

With insane "Hello World!" code inside

```Javascript
console.log("Hello World!")
```

#### How to translate

```Javascript
    const js2cp = require("js2cp")
    js2cp.translate("./helloWorld.js")
```


This will create a new file.In our case **helloWorld.cpp**

> ./helloWorld.cpp

    #include <iostream>

    int main(){

    std::cout <<"Hello World!"<< std::endl;

    // If you want to pause the program at the end just uncomment line below
    // system("pause>0")
    };

# Info

Translator does not support the "frontend technologies", like document.querySelector etc. So please, don't even try it, it will compile with bugs.

JS2CP is build for "competetive programming" applications. That means, with logic of complexity in js functions.

JS2CP is still under development, so use it wisely.

PSS: If you have any questions or complaints, please open issue on the GitHub https://github.com/borecjeborec1/

---
_Source: https://npm.io/package/js2cp · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
