Skip to content

Instantly share code, notes, and snippets.

Prototyping ideas

Nathaniel Blackburn nblackburn

Prototyping ideas
Block or report user

Report or block nblackburn

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
ceejbot /
Last active Jul 17, 2019
npm's proposal for supporting ES modules in node

ESM modules in node: npm edition

The proposal you’re about to read is not just a proposal. We have a working implementation of almost everything we discussed here. We encourage you to checkout and build our branch: our fork, with the relevant branch selected. Building and using the implementation will give you a better understanding of what using it as a developer is like.

Our implementation ended up differing from the proposal on some minor points. As our last action item before making a PR, we’re writing documentation on what we did. While I loathe pointing to tests in lieu of documentation, they will be helpful until we complete writing docs: the unit tests.

This repo also contains a bundled version of npm that has a new command, asset. You can read the documentation for and goals of that comma

tauzen / hexstring.js
Last active Sep 5, 2019
Hex string to byte and other way round conversion functions.
View hexstring.js
function byteToHexString(uint8arr) {
if (!uint8arr) {
return '';
var hexStr = '';
for (var i = 0; i < uint8arr.length; i++) {
var hex = (uint8arr[i] & 0xff).toString(16);
hex = (hex.length === 1) ? '0' + hex : hex;
hexStr += hex;
You can’t perform that action at this time.