• Stars
    star
    1,703
  • Rank 26,243 (Top 0.6 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 10 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The buffer module from node.js, for the browser.

buffer ci npm downloads javascript style guide

The buffer module from node.js, for the browser.

saucelabs

With browserify, simply require('buffer') or use the Buffer global and you will get this module.

The goal is to provide an API that is 100% identical to node's Buffer API. Read the official docs for the full list of properties, instance methods, and class methods that are supported.

features

  • Manipulate binary data like a boss, in all browsers!
  • Super fast. Backed by Typed Arrays (Uint8Array/ArrayBuffer, not Object)
  • Extremely small bundle size (6.75KB minified + gzipped, 51.9KB with comments)
  • Excellent browser support (Chrome, Firefox, Edge, Safari 11+, iOS 11+, Android, etc.)
  • Preserves Node API exactly
  • Square-bracket buf[4] notation works!
  • Does not modify any browser prototypes or put anything on window
  • Comprehensive test suite (including all buffer tests from node.js core)

install

To use this module directly (without browserify), install it:

npm install buffer

This module was previously called native-buffer-browserify, but please use buffer from now on.

If you do not use a bundler, you can use the standalone script.

usage

The module's API is identical to node's Buffer API. Read the official docs for the full list of properties, instance methods, and class methods that are supported.

As mentioned above, require('buffer') or use the Buffer global with browserify and this module will automatically be included in your bundle. Almost any npm module will work in the browser, even if it assumes that the node Buffer API will be available.

To depend on this module explicitly (without browserify), require it like this:

var Buffer = require('buffer/').Buffer  // note: the trailing slash is important!

To require this module explicitly, use require('buffer/') which tells the node.js module lookup algorithm (also used by browserify) to use the npm module named buffer instead of the node.js core module named buffer!

how does it work?

The Buffer constructor returns instances of Uint8Array that have their prototype changed to Buffer.prototype. Furthermore, Buffer is a subclass of Uint8Array, so the returned instances will have all the node Buffer methods and the Uint8Array methods. Square bracket notation works as expected -- it returns a single octet.

The Uint8Array prototype remains unmodified.

tracking the latest node api

This module tracks the Buffer API in the latest (unstable) version of node.js. The Buffer API is considered stable in the node stability index, so it is unlikely that there will ever be breaking changes. Nonetheless, when/if the Buffer API changes in node, this module's API will change accordingly.

related packages

conversion packages

convert typed array to buffer

Use typedarray-to-buffer to convert any kind of typed array to a Buffer. Does not perform a copy, so it's super fast.

convert buffer to typed array

Buffer is a subclass of Uint8Array (which is a typed array). So there is no need to explicitly convert to typed array. Just use the buffer as a Uint8Array.

convert blob to buffer

Use blob-to-buffer to convert a Blob to a Buffer.

convert buffer to blob

To convert a Buffer to a Blob, use the Blob constructor:

var blob = new Blob([ buffer ])

Optionally, specify a mimetype:

var blob = new Blob([ buffer ], { type: 'text/html' })

convert arraybuffer to buffer

To convert an ArrayBuffer to a Buffer, use the Buffer.from function. Does not perform a copy, so it's super fast.

var buffer = Buffer.from(arrayBuffer)

convert buffer to arraybuffer

To convert a Buffer to an ArrayBuffer, use the .buffer property (which is present on all Uint8Array objects):

var arrayBuffer = buffer.buffer.slice(
  buffer.byteOffset, buffer.byteOffset + buffer.byteLength
)

Alternatively, use the to-arraybuffer module.

performance

See perf tests in /perf.

BrowserBuffer is the browser buffer module (this repo). Uint8Array is included as an additional check (since BrowserBuffer uses Uint8Array under the hood, Uint8Array will always be at least a bit faster). Finally, NodeBuffer is the node.js buffer module, which is included to compare against.

NOTE: Performance has improved since these benchmarks were taken. PR welcome to update the README.

Chrome 38

Method Operations Accuracy Sampled Fastest
BrowserBuffer#bracket-notation 11,457,464 ops/sec Β±0.86% 66 βœ“
Uint8Array#bracket-notation 10,824,332 ops/sec Β±0.74% 65
BrowserBuffer#concat 450,532 ops/sec Β±0.76% 68
Uint8Array#concat 1,368,911 ops/sec Β±1.50% 62 βœ“
BrowserBuffer#copy(16000) 903,001 ops/sec Β±0.96% 67
Uint8Array#copy(16000) 1,422,441 ops/sec Β±1.04% 66 βœ“
BrowserBuffer#copy(16) 11,431,358 ops/sec Β±0.46% 69
Uint8Array#copy(16) 13,944,163 ops/sec Β±1.12% 68 βœ“
BrowserBuffer#new(16000) 106,329 ops/sec Β±6.70% 44
Uint8Array#new(16000) 131,001 ops/sec Β±2.85% 31 βœ“
BrowserBuffer#new(16) 1,554,491 ops/sec Β±1.60% 65
Uint8Array#new(16) 6,623,930 ops/sec Β±1.66% 65 βœ“
BrowserBuffer#readDoubleBE 112,830 ops/sec Β±0.51% 69 βœ“
DataView#getFloat64 93,500 ops/sec Β±0.57% 68
BrowserBuffer#readFloatBE 146,678 ops/sec Β±0.95% 68 βœ“
DataView#getFloat32 99,311 ops/sec Β±0.41% 67
BrowserBuffer#readUInt32LE 843,214 ops/sec Β±0.70% 69 βœ“
DataView#getUint32 103,024 ops/sec Β±0.64% 67
BrowserBuffer#slice 1,013,941 ops/sec Β±0.75% 67
Uint8Array#subarray 1,903,928 ops/sec Β±0.53% 67 βœ“
BrowserBuffer#writeFloatBE 61,387 ops/sec Β±0.90% 67
DataView#setFloat32 141,249 ops/sec Β±0.40% 66 βœ“

Firefox 33

Method Operations Accuracy Sampled Fastest
BrowserBuffer#bracket-notation 20,800,421 ops/sec Β±1.84% 60
Uint8Array#bracket-notation 20,826,235 ops/sec Β±2.02% 61 βœ“
BrowserBuffer#concat 153,076 ops/sec Β±2.32% 61
Uint8Array#concat 1,255,674 ops/sec Β±8.65% 52 βœ“
BrowserBuffer#copy(16000) 1,105,312 ops/sec Β±1.16% 63
Uint8Array#copy(16000) 1,615,911 ops/sec Β±0.55% 66 βœ“
BrowserBuffer#copy(16) 16,357,599 ops/sec Β±0.73% 68
Uint8Array#copy(16) 31,436,281 ops/sec Β±1.05% 68 βœ“
BrowserBuffer#new(16000) 52,995 ops/sec Β±6.01% 35
Uint8Array#new(16000) 87,686 ops/sec Β±5.68% 45 βœ“
BrowserBuffer#new(16) 252,031 ops/sec Β±1.61% 66
Uint8Array#new(16) 8,477,026 ops/sec Β±0.49% 68 βœ“
BrowserBuffer#readDoubleBE 99,871 ops/sec Β±0.41% 69
DataView#getFloat64 285,663 ops/sec Β±0.70% 68 βœ“
BrowserBuffer#readFloatBE 115,540 ops/sec Β±0.42% 69
DataView#getFloat32 288,722 ops/sec Β±0.82% 68 βœ“
BrowserBuffer#readUInt32LE 633,926 ops/sec Β±1.08% 67 βœ“
DataView#getUint32 294,808 ops/sec Β±0.79% 64
BrowserBuffer#slice 349,425 ops/sec Β±0.46% 69
Uint8Array#subarray 5,965,819 ops/sec Β±0.60% 65 βœ“
BrowserBuffer#writeFloatBE 59,980 ops/sec Β±0.41% 67
DataView#setFloat32 317,634 ops/sec Β±0.63% 68 βœ“

Safari 8

Method Operations Accuracy Sampled Fastest
BrowserBuffer#bracket-notation 10,279,729 ops/sec Β±2.25% 56 βœ“
Uint8Array#bracket-notation 10,030,767 ops/sec Β±2.23% 59
BrowserBuffer#concat 144,138 ops/sec Β±1.38% 65
Uint8Array#concat 4,950,764 ops/sec Β±1.70% 63 βœ“
BrowserBuffer#copy(16000) 1,058,548 ops/sec Β±1.51% 64
Uint8Array#copy(16000) 1,409,666 ops/sec Β±1.17% 65 βœ“
BrowserBuffer#copy(16) 6,282,529 ops/sec Β±1.88% 58
Uint8Array#copy(16) 11,907,128 ops/sec Β±2.87% 58 βœ“
BrowserBuffer#new(16000) 101,663 ops/sec Β±3.89% 57
Uint8Array#new(16000) 22,050,818 ops/sec Β±6.51% 46 βœ“
BrowserBuffer#new(16) 176,072 ops/sec Β±2.13% 64
Uint8Array#new(16) 24,385,731 ops/sec Β±5.01% 51 βœ“
BrowserBuffer#readDoubleBE 41,341 ops/sec Β±1.06% 67
DataView#getFloat64 322,280 ops/sec Β±0.84% 68 βœ“
BrowserBuffer#readFloatBE 46,141 ops/sec Β±1.06% 65
DataView#getFloat32 337,025 ops/sec Β±0.43% 69 βœ“
BrowserBuffer#readUInt32LE 151,551 ops/sec Β±1.02% 66
DataView#getUint32 308,278 ops/sec Β±0.94% 67 βœ“
BrowserBuffer#slice 197,365 ops/sec Β±0.95% 66
Uint8Array#subarray 9,558,024 ops/sec Β±3.08% 58 βœ“
BrowserBuffer#writeFloatBE 17,518 ops/sec Β±1.03% 63
DataView#setFloat32 319,751 ops/sec Β±0.48% 68 βœ“

Node 0.11.14

Method Operations Accuracy Sampled Fastest
BrowserBuffer#bracket-notation 10,489,828 ops/sec Β±3.25% 90
Uint8Array#bracket-notation 10,534,884 ops/sec Β±0.81% 92 βœ“
NodeBuffer#bracket-notation 10,389,910 ops/sec Β±0.97% 87
BrowserBuffer#concat 487,830 ops/sec Β±2.58% 88
Uint8Array#concat 1,814,327 ops/sec Β±1.28% 88 βœ“
NodeBuffer#concat 1,636,523 ops/sec Β±1.88% 73
BrowserBuffer#copy(16000) 1,073,665 ops/sec Β±0.77% 90
Uint8Array#copy(16000) 1,348,517 ops/sec Β±0.84% 89 βœ“
NodeBuffer#copy(16000) 1,289,533 ops/sec Β±0.82% 93
BrowserBuffer#copy(16) 12,782,706 ops/sec Β±0.74% 85
Uint8Array#copy(16) 14,180,427 ops/sec Β±0.93% 92 βœ“
NodeBuffer#copy(16) 11,083,134 ops/sec Β±1.06% 89
BrowserBuffer#new(16000) 141,678 ops/sec Β±3.30% 67
Uint8Array#new(16000) 161,491 ops/sec Β±2.96% 60
NodeBuffer#new(16000) 292,699 ops/sec Β±3.20% 55 βœ“
BrowserBuffer#new(16) 1,655,466 ops/sec Β±2.41% 82
Uint8Array#new(16) 14,399,926 ops/sec Β±0.91% 94 βœ“
NodeBuffer#new(16) 3,894,696 ops/sec Β±0.88% 92
BrowserBuffer#readDoubleBE 109,582 ops/sec Β±0.75% 93 βœ“
DataView#getFloat64 91,235 ops/sec Β±0.81% 90
NodeBuffer#readDoubleBE 88,593 ops/sec Β±0.96% 81
BrowserBuffer#readFloatBE 139,854 ops/sec Β±1.03% 85 βœ“
DataView#getFloat32 98,744 ops/sec Β±0.80% 89
NodeBuffer#readFloatBE 92,769 ops/sec Β±0.94% 93
BrowserBuffer#readUInt32LE 710,861 ops/sec Β±0.82% 92
DataView#getUint32 117,893 ops/sec Β±0.84% 91
NodeBuffer#readUInt32LE 851,412 ops/sec Β±0.72% 93 βœ“
BrowserBuffer#slice 1,673,877 ops/sec Β±0.73% 94
Uint8Array#subarray 6,919,243 ops/sec Β±0.67% 90 βœ“
NodeBuffer#slice 4,617,604 ops/sec Β±0.79% 93
BrowserBuffer#writeFloatBE 66,011 ops/sec Β±0.75% 93
DataView#setFloat32 127,760 ops/sec Β±0.72% 93 βœ“
NodeBuffer#writeFloatBE 103,352 ops/sec Β±0.83% 93

iojs 1.8.1

Method Operations Accuracy Sampled Fastest
BrowserBuffer#bracket-notation 10,990,488 ops/sec Β±1.11% 91
Uint8Array#bracket-notation 11,268,757 ops/sec Β±0.65% 97
NodeBuffer#bracket-notation 11,353,260 ops/sec Β±0.83% 94 βœ“
BrowserBuffer#concat 378,954 ops/sec Β±0.74% 94
Uint8Array#concat 1,358,288 ops/sec Β±0.97% 87
NodeBuffer#concat 1,934,050 ops/sec Β±1.11% 78 βœ“
BrowserBuffer#copy(16000) 894,538 ops/sec Β±0.56% 84
Uint8Array#copy(16000) 1,442,656 ops/sec Β±0.71% 96
NodeBuffer#copy(16000) 1,457,898 ops/sec Β±0.53% 92 βœ“
BrowserBuffer#copy(16) 12,870,457 ops/sec Β±0.67% 95
Uint8Array#copy(16) 16,643,989 ops/sec Β±0.61% 93 βœ“
NodeBuffer#copy(16) 14,885,848 ops/sec Β±0.74% 94
BrowserBuffer#new(16000) 109,264 ops/sec Β±4.21% 63
Uint8Array#new(16000) 138,916 ops/sec Β±1.87% 61
NodeBuffer#new(16000) 281,449 ops/sec Β±3.58% 51 βœ“
BrowserBuffer#new(16) 1,362,935 ops/sec Β±0.56% 99
Uint8Array#new(16) 6,193,090 ops/sec Β±0.64% 95 βœ“
NodeBuffer#new(16) 4,745,425 ops/sec Β±1.56% 90
BrowserBuffer#readDoubleBE 118,127 ops/sec Β±0.59% 93 βœ“
DataView#getFloat64 107,332 ops/sec Β±0.65% 91
NodeBuffer#readDoubleBE 116,274 ops/sec Β±0.94% 95
BrowserBuffer#readFloatBE 150,326 ops/sec Β±0.58% 95 βœ“
DataView#getFloat32 110,541 ops/sec Β±0.57% 98
NodeBuffer#readFloatBE 121,599 ops/sec Β±0.60% 87
BrowserBuffer#readUInt32LE 814,147 ops/sec Β±0.62% 93
DataView#getUint32 137,592 ops/sec Β±0.64% 90
NodeBuffer#readUInt32LE 931,650 ops/sec Β±0.71% 96 βœ“
BrowserBuffer#slice 878,590 ops/sec Β±0.68% 93
Uint8Array#subarray 2,843,308 ops/sec Β±1.02% 90
NodeBuffer#slice 4,998,316 ops/sec Β±0.68% 90 βœ“
BrowserBuffer#writeFloatBE 65,927 ops/sec Β±0.74% 93
DataView#setFloat32 139,823 ops/sec Β±0.97% 89 βœ“
NodeBuffer#writeFloatBE 135,763 ops/sec Β±0.65% 96

Testing the project

First, install the project:

npm install

Then, to run tests in Node.js, run:

npm run test-node

To test locally in a browser, you can run:

npm run test-browser-old-local # For ES5 browsers that don't support ES6
npm run test-browser-new-local # For ES6 compliant browsers

This will print out a URL that you can then open in a browser to run the tests, using airtap.

To run automated browser tests using Saucelabs, ensure that your SAUCE_USERNAME and SAUCE_ACCESS_KEY environment variables are set, then run:

npm test

This is what's run in Travis, to check against various browsers. The list of browsers is kept in the bin/airtap-es5.yml and bin/airtap-es6.yml files.

JavaScript Standard Style

This module uses JavaScript Standard Style.

JavaScript Style Guide

To test that the code conforms to the style, npm install and run:

./node_modules/.bin/standard

credit

This was originally forked from buffer-browserify.

Security Policies and Procedures

The buffer team and community take all security bugs in buffer seriously. Please see our security policies and procedures document to learn how to report issues.

license

MIT. Copyright (C) Feross Aboukhadijeh, and other contributors. Originally forked from an MIT-licensed module by Romain Beauxis.

More Repositories

1

simple-peer

πŸ“‘ Simple WebRTC video, voice, and data channels
JavaScript
7,140
star
2

SpoofMAC

πŸ’Ό Change your MAC address for debugging
Python
2,988
star
3

thanks

πŸ™Œ Give thanks to the open source maintainers you depend on! ✨
JavaScript
2,768
star
4

spoof

Easily spoof your MAC address in macOS, Windows, & Linux!
JavaScript
1,745
star
5

awesome-mad-science

Delightful npm packages that make you say "wow, didn't know that was possible!"
1,089
star
6

filldisk.com

πŸ’Ύ Masterful trolling with HTML5 localStorage
HTML
910
star
7

hostile

Simple, programmatic `/etc/hosts` manipulation (in node.js)
JavaScript
763
star
8

TheAnnoyingSite.com

The Annoying Site a.k.a. "The Power of the Web Platform"
JavaScript
727
star
9

yt-player

Simple, robust, blazing-fast YouTube Player API
JavaScript
662
star
10

clipboard-copy

Lightweight copy to clipboard for the web
JavaScript
585
star
11

bitmidi.com

🎹 Listen to free MIDI songs, download the best MIDI files, and share the best MIDIs on the web
JavaScript
507
star
12

electron-workshop

Workshop: Build cross-platform desktop apps with Electron
JavaScript
491
star
13

drag-drop

HTML5 drag & drop for humans
JavaScript
486
star
14

simple-get

Simplest way to make http get requests. Supports HTTPS, redirects, gzip/deflate, streams in < 100 lines
JavaScript
396
star
15

md5-password-cracker.js

Crack MD5 passwords with JavaScript Web Workers
JavaScript
381
star
16

run-parallel

Run an array of functions in parallel
JavaScript
363
star
17

magickeyboard.io

Ultimate hacker keyboard
JavaScript
339
star
18

safe-buffer

Safer Node.js Buffer API
JavaScript
338
star
19

timidity

Play MIDI files in the browser w/ Web Audio, WebAssembly, and libtimidity
Shell
315
star
20

p2p-graph

Real-time P2P network visualization with D3
JavaScript
284
star
21

multistream

A stream that emits multiple other streams one after another (streams3)
JavaScript
283
star
22

zelda

Automatically `npm link` all your packages together!
JavaScript
280
star
23

run-series

Run an array of functions in series
JavaScript
240
star
24

funding

Let's get open source maintainers paid ✨
JavaScript
209
star
25

render-media

Intelligently render media files in the browser
JavaScript
199
star
26

cs253.stanford.edu

CS 253 Web Security course at Stanford University
JavaScript
194
star
27

simple-websocket

Simple, EventEmitter API for WebSockets
JavaScript
183
star
28

queue-microtask

fast, tiny `queueMicrotask` shim for modern engines
JavaScript
172
star
29

last-fm

Simple, robust LastFM API client (for public data)
JavaScript
169
star
30

studynotes.org

✏️ Learn faster. Study better.
JavaScript
159
star
31

whiteboard

P2P Whiteboard powered by WebRTC and WebTorrent
JavaScript
154
star
32

ytinstant.com

Real-time YouTube video surfing.
JavaScript
148
star
33

mediasource

MediaSource API as a node.js Writable stream
JavaScript
136
star
34

chrome-net

Use the Node `net` API in Chrome Apps
JavaScript
135
star
35

login-with-twitter

Login with Twitter. OAuth without the nonsense.
JavaScript
122
star
36

cross-zip

Cross-platform .zip file creation
JavaScript
120
star
37

Fullscreen-API-Attack

Demo of phishing attack on the native HTML5 full screen API.
JavaScript
116
star
38

capture-frame

Capture video screenshot from a `<video>` tag (at the current time)
JavaScript
113
star
39

ieee754

Read/write IEEE754 floating point numbers from/to a Buffer or array-like object.
JavaScript
111
star
40

cyberhobo

Offline `git push` and `npm publish` for cyberhobos
JavaScript
111
star
41

Instant.fm

Share music playlists with friends.
JavaScript
107
star
42

unmute-ios-audio

Enable/unmute WebAudio on iOS, even while mute switch is on
JavaScript
106
star
43

available

Scan npm for available package names
JavaScript
100
star
44

bg-sound

Web Component to emulate the old-school <bgsound> HTML element
JavaScript
95
star
45

lxjs-chat

Talk to strangers! (P2P video chat using WebRTC)
JavaScript
94
star
46

play.cash

🎢 Music lovers, rejoice.
JavaScript
93
star
47

reddit

Simple Reddit API client
JavaScript
90
star
48

is-buffer

Determine if an object is a Buffer
JavaScript
89
star
49

run-waterfall

Run an array of functions in series, each passing its results to the next function
JavaScript
89
star
50

run-auto

Determine the best order for running async functions, LIKE MAGIC!
JavaScript
86
star
51

WireSheep

WireSheep shows you each user on the network and all the HTTP requests they're making in a pretty News Feed, a la Facebook.
C++
83
star
52

oculus-drone

Pilot a Parrot AR Drone with the Oculus Rift virtual reality headset!
C
80
star
53

string-to-stream

Convert a string into a stream (streams2)
JavaScript
79
star
54

config

Server config files (nginx, mysql, certbot)
HTML
78
star
55

feross.org

Pure concentrated awesome (a.k.a. my blog)
HTML
78
star
56

run-parallel-limit

Run an array of functions in parallel, but limit the number of tasks executing at the same time
JavaScript
76
star
57

arch

Better `os.arch()` for node and the browser -- detect OS architecture
JavaScript
74
star
58

blob-to-buffer

Convert a Blob to a Buffer.
JavaScript
72
star
59

CMSploit

Security scanner to find temporary config files that contain passwords on public websites
CoffeeScript
70
star
60

location-history

Lightweight browser location history abstraction
JavaScript
69
star
61

fromentries

Object.fromEntries() ponyfill (in 6 lines)
JavaScript
66
star
62

typedarray-to-buffer

Convert a typed array to a Buffer without a copy.
JavaScript
65
star
63

express-sitemap-xml

Serve sitemap.xml from a list of URLs in Express
JavaScript
63
star
64

speakeasyjs.com

The JavaScript meetup for πŸ₯Ό mad science, πŸ§™β€β™‚οΈ hacking, and πŸ§ͺ experiments
JavaScript
63
star
65

beepbeep

Make a console beep sound.
JavaScript
62
star
66

connectivity

Detect if the network is up (do we have connectivity?)
JavaScript
60
star
67

stream-to-blob

Convert a Readable Stream to a Blob
JavaScript
59
star
68

color-scheme-change

Detect system color scheme changes on the web (Dark Mode)
JavaScript
58
star
69

conferences

Conferences that I will attend or have already attended
53
star
70

Life

An experiment in treating life like a software project.
50
star
71

git-pull-or-clone

Ensure a git repo exists on disk and that it's up-to-date
JavaScript
50
star
72

Facebook-Like-Everything

Bookmarklet to Like every post+comment that you see on Facebook.
JavaScript
47
star
73

load-script2

Dynamic script loading for modern browsers
JavaScript
46
star
74

cctv.js

Watch live visitors using your website.
JavaScript
46
star
75

simple-sha256

Generate SHA-256 hashes (in Node and the Browser)
JavaScript
45
star
76

async-lru

A simple async LRU cache supporting O(1) set, get and eviction of old keys
JavaScript
45
star
77

peerdb

JavaScript
44
star
78

dotfiles

Configuration files for zsh, screen, git, ssh, sublime, dot dot dot
Shell
39
star
79

chrome-dgram

Use the Node `dgram` API in Chrome Apps
JavaScript
39
star
80

webcam-spy

Demo of Adobe Flash clickjacking vulnerability to spy on a user's webcam.
JavaScript
39
star
81

standard-react

JavaScript Standard Style for React Users
JavaScript
36
star
82

BrainGrinder

Instant foreign language flashcards (with audio!)
CSS
34
star
83

ahh-windows

Windows XP Emulator -- in the browser :)
HTML
34
star
84

chrome-dns

Use the Node `dns` API in Chrome Apps
JavaScript
34
star
85

objection-slug

Automatically generate slugs for an Objection.js model
JavaScript
33
star
86

call-log

Instrument a JavaScript class (or object) so that anytime a method function is called it gets logged to the console.
JavaScript
33
star
87

zero-fill

Zero-fill a number to the given size.
JavaScript
31
star
88

caught-in-a-web-of-apis

Attack code to accompany "Caught in a Web of APIs: An Analysis of Powerful Web APIs" research paper
JavaScript
30
star
89

cache-chunk-store

In-memory LRU (least-recently-used) cache for abstract-chunk-store compliant stores
JavaScript
29
star
90

clash

A Simple Bash-Like Shell
C++
28
star
91

preload-img

Preload an image on a webpage
JavaScript
26
star
92

chunk-store-stream

Convert an abstract-chunk-store compliant store into a readable or writable stream
JavaScript
26
star
93

feross-card

It's me, Feross!
JavaScript
24
star
94

vlc-command

Find VLC player command line path
JavaScript
24
star
95

raft

An understandable consensus algorithm
C++
23
star
96

simple-concat

Super-minimalist version of `concat-stream`. Less than 15 lines!
JavaScript
23
star
97

stream-to-blob-url

Convert a Readable Stream to a Blob URL
JavaScript
23
star
98

SuperTranslate

"Super translate" words into many different languages at once
CSS
21
star
99

Fling

Send songs, videos, web urls from your phone to your desktop with a flick of your wrist
Objective-C
21
star
100

detect-proxy

Using <img> to detect whether the user is browsing through a proxy or not.
21
star