0.2.10 • Published 6 months ago

jsshort v0.2.10

Weekly downloads
-
License
-
Repository
github
Last release
6 months ago

Short functions

npm i jsshort

you can use like this

require("jsshort")

let integerValue = int("3") // here int is short function
console.log(integerValue)

like this there are many functions

input; print int; str; float; bool; array;

Input output functions:

require("jsshort")

async function sum {
    let a = await input("Enter first number: ")
    let b = await input("Enter 2nd number: ")

    print("Sum of both numbers:", end=" ");
    print(int(a) + int(b))
}

sum();
require("jsshort")

async function sum {
    let a = await input("Enter first number: ")
    let b = await input("Enter 2nd number: ")

    // it will store Output of this function in output.txt file
    print("Sum of both numbers:", int(a) + int(b), {file: "./path/output.txt"});
}

sum();

Input output functions in typescript

import f from "jsshort";

async function sum {
    let a:string = await f.input("Enter first number: ")
    let b:string = await f.input("Enter 2nd number: ")
    
    f.print("Sum of both numbers:", {end: " "});
    f.print(f.int(a) + f.int(b))
}

sum();

String functions Uses example

require("jsshort")
let stringg = "This is my string"
let length =string.len();  // uses of len function
console.log(length)

more functions name len str add sb ind lstInd inString start end upr lwr trS trE rpc rpcA at chCdAt locCmp

There are many array functions: Uses example

require("jsshort")
let arr1 = [1, 2, 3]
let arr2 = [4, 5]
let newArray = arr1.add(arr2)  // uses of add function
console.log(newArray)

more functions: add ind lstInd inArray forE rdc rdcR fndInd

By https://Telegram.me/PanditSiddharth

0.2.10

6 months ago

0.1.0

6 months ago

0.2.1

6 months ago

0.2.0

6 months ago

0.2.7

6 months ago

0.2.6

6 months ago

0.2.9

6 months ago

0.2.8

6 months ago

0.2.3

6 months ago

0.2.2

6 months ago

0.2.5

6 months ago

0.2.4

6 months ago

0.0.1

7 months ago

0.0.0

7 months ago