Giter VIP home page Giter VIP logo

node-bswap's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

node-bswap's Issues

bswap does nothing on Buffers

Documentation says: "For node.js 4.x and later, this also works on Buffers."

Running on node v6.6.0:

var bswap = require("bswap")
var x = new Buffer([1,2,3,4,5])
bswap(x)

Output:

> var bswap = require("bswap")
undefined
> var x = new Buffer([1,2,3,4,5])
undefined
> x
<Buffer 01 02 03 04 05>
> bswap(x)
undefined
> x
<Buffer 01 02 03 04 05>

Build error on raspberry pi 3

Hi,

node-gyp is failing on raspberry pi3 gcc version 4.9.2

pi@raspberrypi:~/node-bswap $ npm install

[email protected] install /home/pi/node-bswap
node-gyp rebuild

make: Entering directory '/home/pi/node-bswap/build'
CXX(target) Release/obj.target/bswap/src/bswap.o
*** Error in g++': double free or corruption (!prev): 0x01787780 *** bswap.target.mk:96: recipe for target 'Release/obj.target/bswap/src/bswap.o' failed make: *** [Release/obj.target/bswap/src/bswap.o] Aborted make: Leaving directory '/home/pi/node-bswap/build' gyp ERR! build error gyp ERR! stack Error: make` failed with exit code: 2

Any ideas? Would love to use this module oin a pi project I'm working on

TypeError when using in windows

I am using bswap in my react project which is packed using electron. When I create a package for mac everything works fine but my project throws an error on bswap when using the package created for windows.

TypeError: (0, c.default) is not a function

Here is my code:

currentPacketNumber = new Uint32Array([intToHexa(ele)])
      bswap(currentPacketNumber)
      return typedarrayToBuffer(currentPacketNumber).toString('hex')

const intToHexa = ele => `0x${Number(ele).toString(16)}`

Please help me. Tell me the more details you need.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.