jsbi

JSBI is a pure-JavaScript implementation of the official ECMAScript BigInt proposal. (by GoogleChromeLabs)

Jsbi Alternatives

Similar projects and alternatives to jsbi

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better jsbi alternative or higher similarity.

jsbi reviews and mentions

Posts with mentions or reviews of jsbi. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-11-19.
  • How to Implement and Deploy a Smart Contract Event Listener with AWS CDK
    5 projects | dev.to | 19 Nov 2023
    import 'dotenv/config'; import * as erc20abi from './abi.json'; import Web3, { Contract, WebSocketProvider } from 'web3'; /* Workaround for JSON.stringify() event logs with BigInt values. We need to stringify event logs for more readable logging in CloudWatch. https://github.com/GoogleChromeLabs/jsbi/issues/30 */ (BigInt.prototype as any).toJSON = function () { return this.toString(); }; /** * Starts the smart contract event listener. * Websocket Provider config: https://docs.web3js.org/api/web3-providers-ws/class/WebSocketProvider * @param chain - Name of the blockchain network for logging purposes. * @param wssEndpoint - Websocket endpoint for the blockchain network. * @param contractAddress - Smart contract address. */ const startEventListener = async (chain: string, wssEndpoint: string, contractAddress: string) => { const provider = new WebSocketProvider( wssEndpoint, {}, { autoReconnect: true, delay: 10000, // Default: 5000 ms maxAttempts: 10, // Default: 5 }, ); provider.on('connect', () => { console.log(`Connected to ${chain} websocket provider`); }); provider.on('disconnect', error => { console.error(`Closed ${chain} webSocket connection`, error); }); const web3 = new Web3(provider); /* Smart contract event listeners Listening to events: - Transfer - Approval */ const contract = new web3.eth.Contract(erc20abi, contractAddress); await subscribeToEvent(chain, contract, 'Transfer'); await subscribeToEvent(chain, contract, 'Approval'); }; /** * Subscribes to a smart contract event. * @param chain - Name of the blockchain network for logging purposes. * @param contract - Smart contract address. * @param eventName - Name of the event to subscribe to. */ const subscribeToEvent = async (chain: string, contract: Contract, eventName: string) => { const subscription = await contract.events[eventName](); subscription.on('connected', subscriptionId => { console.log(`${chain} USDT '${eventName}' SubID:`, subscriptionId); }); subscription.on('data', event => { console.log(`${chain} USDT '${eventName}'`, JSON.stringify({ event })); // cannot json.stringify BigInt... }); subscription.on('changed', event => { // Remove event from local database }); subscription.on('error', error => { console.error(`${chain} USDT '${eventName}' error:`, error); }); }; /* Start smart contract event listeners Chains: - Ethereum */ startEventListener('Ethereum', process.env.ETH_WSS_ENDPOINT!, process.env.ETH_SMART_CONTRACT_ADDRESS!);
  • BigInt support for Android without Hermes
    1 project | /r/reactnative | 6 Feb 2023
    Have you considered something like https://github.com/GoogleChromeLabs/jsbi ? That's a pure-JS implementation of BigInt (though it may have some caveats for usage - check the repo for details).
  • TypeError: Cannot read property 'BigInt' of undefined
    2 projects | /r/typescript | 4 May 2022
    I looked at the repository: https://github.com/GoogleChromeLabs/jsbi
  • Prisma returning this response when I try searching for a particular record or returning a single record
    1 project | /r/node | 22 Feb 2022
  • A note from our sponsor - SurveyJS
    surveyjs.io | 14 May 2024
    With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js. Learn more →

Stats

Basic jsbi repo stats
4
891
2.0
9 months ago

GoogleChromeLabs/jsbi is an open source project licensed under Apache License 2.0 which is an OSI approved license.

The primary programming language of jsbi is JavaScript.


Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com