Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@uoctamika/libraryjs

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uoctamika/libraryjs

A lightweight JavaScript & TypeScript utility library - just import and use. No configuration needed, functions are ready to use

latest
npmnpm
Version
1.2.5
Version published
Weekly downloads
485
Maintainers
1
Weekly downloads
 
Created
Source

libraryjs

npm Version npm Downloads License

Node.js TypeScript

Socket

About

[!IMPORTANT] We're moving into codeberg, also my project for "uoctamika" is moving in here to, i still used github for contributors. visit our repository

A lightweight JavaScript and TypeScript utility library - just import and use. No configuration required.

LibraryJS provides many built-in utility functions for common development tasks. If you need additional functionality, feel free to open an issue or submit a feature request.

Installation & Requirements

Requirements

  • Node.js 18 or higher
  • TypeScript 5 or higher (only required if you use TypeScript)

Install

$ npm install @uoctamika/libraryjs

Or install a specific version:

$ npm install @uoctamika/libraryjs@latest

or

$ npm install @uoctamika/libraryjs@1.0.0

Documentation

For the best experience, please read the documentation before using this library.

If you come from a high-level development background, some parts of the API may feel unusual at first. However, if you have experience with C or C++, many design choices should feel familiar.

namespace

stdio - standard input output, provide a function for I/O things

Input Output (stdio)

printf

NAME

stdio.printf — formatted output function.


SYNOPSIS

import { stdio } from '@uoctamika/libraryjs'; const { stdio } = require('@uoctamika/libraryjs');

stdio.printf(format: string, ...args: any[]): void;


DESCRIPTION

The "printf()" function writes formatted output to "stdout" (standard output).

The format string consists of ordinary characters and conversion specifiers. Ordinary characters are copied directly to the output stream, while conversion specifiers begin with "%" and are replaced with formatted argument values.

Supported conversion specifiers:

SpecifierDescriptionExample InputOutput
%sString value"world""world"
%dDecimal integer42"42"
%iInteger (parsed from input)"42px""42"
%fFloating-point number (6 decimal places)3.14159"3.141590"
%cCharacter (first character of string)"ABC""A"
%oObject (default string representation){a:1}"[object Object]"
%OObject (full inspection, unlimited depth){a:{b:2}}"{ a: { b: 2 } }"
%xHexadecimal (lowercase)255"ff"
%XHexadecimal (uppercase)255"FF"
%bBinary5"101"
%jJSON stringify{name:"Uoc"}"{\"name\":\"Uoc\"}"
%%Literal percent sign-"%"

Behavior for invalid arguments:

SpecifierInvalid Input Behavior
%dReturns "NaN" when the value is not a valid integer
%iReturns "NaN" when no integer can be parsed from the input
%fReturns "NaN" when the value is not a valid number
%cReturns an empty string ("") when the input string is empty
%oReturns "[object Object]" for non-null values using default object conversion
%OReturns a string representation of the value, including nested structures
%xReturns "NaN" when the value cannot be converted to an integer
%XReturns "NaN" when the value cannot be converted to an integer
%bReturns "NaN" when the value cannot be converted to an integer
%jReturns "undefined" when JSON serialization fails or the value cannot be serialized

RETURN VALUE

This function returns number (int).

determine how much outputs is writing into stdout.

Unlike "console.log()", "printf()" does not automatically append a newline character. To print a new line, explicitly include "\n" in the format string.


EXAMPLE

stdio.printf("Hello %s!\n", "World");
stdio.printf("Age: %d\n", 18);
stdio.printf("PI: %f\n", 3.14159);
stdio.printf("Grade: %c\n", "A");

Contributing

Contributions are welcome.

Before contributing, please read the following documents:

  • "README.md"
  • "SECURITY.md"
  • "CODE_OF_CONDUCT.md"

We appreciate all bug reports, feature requests, documentation improvements, and pull requests.

Keywords

utility

FAQs

Package last updated on 07 Jun 2026

Did you know?

Socket

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