node.js - nodejs convert string like php pack function -


i trying convert string ascii

in php:

>>> pack('h*', '123') => "\x120" 

how same thing in nodejs?

i trying use https://github.com/peze/node-pack package pack result following :

> pack.pack('h*', '123')   outputpos=2 <buffer 12 30> 


Comments

Popular posts from this blog

c# - Update a combobox from a presenter (MVP) -

android - Unable to generate FCM token from dynamically instantiated Firebase -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -