New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

sharedarray

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

sharedarray

Int32Array with infinite length using SharedArrayBuffer

unpublished
Source
npmnpm
Version
1.0.4
Version published
Maintainers
1
Created
Source

SharedArray

Int32Array with infinite length using SharedArrayBuffer

License npm repo size open issues npm GitHub Workflow Status

Coverage lines Coverage functions Coverage branches Coverage statements

Installation

Run npm install sharedarray in your project

Require using

const SharedArray = require('sharedarray')

Usage

Example

let array = new SharedArray()

await array.set(10, 500)
let a = await array.get(10) // a = 500

await array.concatenate(0, [1, 2, 3])
let x = await array.get(0) // x = 1
let y = await array.get(1) // y = 2
let z = await array.get(2) // z = 3

//export array
let exportData = array.export()

//send that exportData to another thread/worker and then re-recreate array object
let array2 = new SharedArray(exportData)
let b = await array2.get(10) // b = 500

FAQs

Package last updated on 23 Apr 2022

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