Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cuint

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cuint

Unsigned integers for Javascript

  • 0.2.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.3M
decreased by-11.25%
Maintainers
1
Weekly downloads
 
Created

What is cuint?

The cuint npm package provides utilities for handling unsigned integers of various sizes, particularly useful in environments where native support for large integers is limited or non-existent. It allows for the creation, manipulation, and arithmetic of unsigned integers beyond JavaScript's native Number limits.

What are cuint's main functionalities?

Creation of unsigned integers

This feature allows the creation of 32-bit unsigned integers. The example shows how to create a UINT32 instance and print its value.

const UINT32 = require('cuint').UINT32;
const uint = UINT32(123456789);
console.log(uint.toString());

Arithmetic operations

This feature supports basic arithmetic operations such as addition. The code sample demonstrates adding two UINT32 instances.

const UINT32 = require('cuint').UINT32;
const a = UINT32('123456789');
const b = UINT32('987654321');
const result = a.add(b);
console.log(result.toString());

Bitwise operations

This feature supports bitwise operations like AND. The example illustrates performing a bitwise AND between two UINT32 instances.

const UINT32 = require('cuint').UINT32;
const a = UINT32('4294967295');
const result = a.and(UINT32('123456789'));
console.log(result.toString());

Other packages similar to cuint

Keywords

FAQs

Package last updated on 23 Aug 2016

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc