stdio.h
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

stdio.h for nodejs

Github License GitHub Package.json Version GitHub Issues GitHub Pull Requests GitHub Contributors

just hobby project to create input output for nodejs

Installing

Install with NPM

npm install stdio.h

or install with Yarn

yarn add stdio.h

Example

printf

import { int, printf } from "stdio.h";

let n1: int = 20;
let n2: int = 30;
printf("%d+%d = %d", n1, n2, n1 + n2);

ife

import { int, printf, ife } from "stdio.h";

ife(
  20 > 10,
  () => printf("true"),
  () => printf("false")
);

swap

import { _int, printf, swap } from "stdio.h";

let i: _int = [20];
let j: _int = [150];

printf("i = %d, j = %d", i, j);
swap(i, j);
printf("i = %d, j = %d", i, j);

// output
// i = 20, j = 150
// i = 150, j = 20

sprintf

import { _str, printf, sprintf } from "stdio.h";

let text: _str = [''];
sprintf(text, "result = %d", 10) ;
printf("%s", text);

// output
// result = 10

/stdio.h/

    Package Sidebar

    Install

    npm i stdio.h

    Weekly Downloads

    3

    Version

    0.1.1

    License

    MIT

    Unpacked Size

    10.3 kB

    Total Files

    15

    Last publish

    Collaborators

    • arikato111