shared-array-buffer-readonly-string-array
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

Install

npm i shared-array-buffer-readonly-string-array

Use

Example

For an example of how to create and share an array among threads, see the tests in ./src/test/index.ts.

Api

See ./src/index.ts, which has Typescript types.

You can:

  • Make a new shareable, readonly array by prividing an array of strings.
  • Iterate over it starting at the beginning
  • Transfer it to other threads via postMessage
  • Access an existing shared array with fromWorkerThreadMessageData

You can't (currently):

  • Get its length
  • Access values at a particular index
  • Iterate starting from different positions
  • Iterate in reverse

Readme

Keywords

none

Package Sidebar

Install

npm i shared-array-buffer-readonly-string-array

Weekly Downloads

2

Version

1.0.2

License

ISC

Unpacked Size

5.72 kB

Total Files

4

Last publish

Collaborators

  • tyler-murphy