Comments (11)
Thanks for the feedback! I added it here to a new project https://github.com/halvardssm/deno_stdext 💪🏻 (JSR link)
from deno_std.
Not really, that function only encodes to hex, it does not create a format for debugging as above.
from deno_std.
Like encodeHex()
?
from deno_std.
Keep using 3rd party libraries
Which 3rd party libs do you use now?
from deno_std.
None at the moment. I didn't find one I wanted to use since I wanted to keep 3rd party deps to a minimum, so I just created my own.
Here are some that I considered:
from deno_std.
Maybe let's start with a minimal set of options.
00000000 30 31 32 33 34 35 36 37 38 39 41 42 43 44 45 46 |0123456789ABCDEF|
I think the use of vertical bar can be confusing. How about following the output format of hexy
?
function hexdump(buffer: ArrayBufferView): string
Probably we should also support ArrayBuffer
input? Some of Web APIs (such as Web Crypto API) return ArrayBuffer
instead of ArrayBufferView
from deno_std.
I chose the vertical bars since they align with the output from the hexdump
command, and honestly I like it more than the hexy
format.
➜ dev echo "Hello World" > hdfile
➜ dev hexdump -C hdfile
00000000 48 65 6c 6c 6f 20 57 6f 72 6c 64 0a |Hello World.|
Good idea, lets support both. Any other interface we should also support?
from deno_std.
Can I create a PR, or is there still room for discussion regarding the function?
from deno_std.
It seems unlikely that the average JavaScript developer would ever need this. I'm not for having this in the Standard Library, but I think it'd be a great fit for a third-party module.
from deno_std.
Golang has Dump
in encoding/hex
which does almost the same thing. https://pkg.go.dev/encoding/hex#Dump
from deno_std.
We discussed this internally and thought such an API would be best in a third-party module rather than the Standard Library. Either way, thank you for the suggestion, @halvardssm! Let us know if you end up publishing 🙂
from deno_std.
Related Issues (20)
- test: write test cases for @std/cli/spinner HOT 3
- chore: setup new release process
- suggestion: make `RotatingFileHandler` buffer size configurable HOT 1
- suggestion: move `std/fmt/colors` to `std/cli/styles` HOT 2
- suggestion: add interactive prompts to `@std/cli` HOT 5
- [feature request(collections)] add `invert` HOT 4
- todo: investigate use of `CAN_NOT_DISPLAY` constant
- proposal: Introduce the Brotli Compression Algorithm HOT 2
- assertStrictEquals(-0, +0) should not throw HOT 5
- proposal: stabilize `std/assert`
- new package contribution can't pass `Validate PR title` check
- deno-docs references `[email protected]`, which doesn't exist HOT 1
- proposal: stabilize `std/media-types`
- to-do: answer remaining frequently asked questions HOT 1
- bug: flaky `Spinner.color` test
- Is devcontainer settings useful?
- proposal: stabilize `std/internal` HOT 3
- proposal: stabilize `std/uuid`
- [feature request(collections)] option to merge `undefined` in `deepMerge` HOT 4
- Feature request (async): limit() to limit a function concurrency HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deno_std.