GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - vmolsa/node-arraybuffer: NodeJS C++ ArrayBuffer handler

This repository was archived by the owner on Jun 5, 2020. It is now read-only.
BranchesTags
Open more actions menu

Latest commit

 

History

29 Commits
29 Commits

Folders and files

NameName
Last commit message
Last commit date
.gitignore
.gitignore
 
 
ArrayBuffer.h
ArrayBuffer.h
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
index.js
index.js
 
 
package.json
package.json
 
 

Repository files navigation

NodeJS C++ ArrayBuffer handler

Install

npm install node-arraybuffer --save

Usage

Add node-arraybuffer to your project binding.gyp

"include_dirs" : [
    "<!(node -e \"require('node-arraybuffer')\")"
]

And add #include header in source code

#include <ArrayBuffer.h>

NodeJS version < 12

static ArrayBuffer* New(const char *str = 0)
static ArrayBuffer* New(const char *str, size_t length)
static ArrayBuffer* New(const std::string &data)
static ArrayBuffer* New(const v8::Local<v8::Object> &arrayBuffer)
static ArrayBuffer* New(const v8::Local<v8::Value> &arg)
  
v8::Local<v8::Object> ToArrayBuffer() const
v8::Local<v8::String> ToString() const

const char *ToUtf8() const
void *Data() const
size_t Length() const
size_t ByteLength() const

NodeJS version >= 12

static ArrayBuffer* New(const char *str = 0)
static ArrayBuffer* New(const char *str, size_t length)
static ArrayBuffer* New(const std::string &data)
static ArrayBuffer* New(const v8::Local<v8::ArrayBuffer> &arrayBuffer)
static ArrayBuffer* New(const v8::Local<v8::Value> &arg)

static ArrayBuffer* New(v8::Isolate *isolate, const char *str = 0)
static ArrayBuffer* New(v8::Isolate *isolate, const char *str, size_t length)
static ArrayBuffer* New(v8::Isolate *isolate, const std::string &data)
static ArrayBuffer* New(v8::Isolate *isolate, const v8::Local<v8::ArrayBuffer> &arrayBuffer)
static ArrayBuffer* New(v8::Isolate *isolate, const v8::Local<v8::Value> &arg)

v8::Local<v8::ArrayBuffer> ToArrayBuffer(v8::Isolate *isolate = 0) const
v8::Local<v8::String> ToString(v8::Isolate *isolate = 0) const

const char *ToUtf8() const
void *Data() const
size_t Length() const
size_t ByteLength() const

Example

sample.cc

sample.js

About

NodeJS C++ ArrayBuffer handler

Resources

Readme
MIT license
Activity

Stars

5 stars

Watchers

1 watching

Forks

2 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.