Skip to content

kai5263499/hex-window

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 

Repository files navigation

hex-window

This is a simple class for calculating the sliding window of a hex string.

Installation

npm install hex-window --save

Usage

var HexWindow = require("hex-window");

// Initialize HexWindow with a starting string and a "resolution" consisting of zeros and ones only 
// which denotes the amount to slide the window by.
var hexwindow = new HexWindow("ffffffffffffffffffffffffffffffff","10000000000000000000000000000000");
var results = hexwindow.back();

// results contains {"upper":"ffffffffffffffffffffffffffffffff","lower","efffffffffffffffffffffffffffffff"}

Additional features

You can also widen or narrow the window via the .narrow() and .widen() functions.

About

Generates a sliding window of hex bounds

Resources

Stars

Watchers

Forks

Packages

No packages published