/wisebit

Wisebit (alias Enum Wizard) - create and manage bit aliases

Primary LanguageJavaScriptMIT LicenseMIT

A quick and easy-to-use tool to create lists of bits to use in rights management or whatever you find it useful for

Originally drafted on JSBin, then put on GitHub Wisebit repo.

By @Sherbrow.

Using Knockout.js.

wisebit.switchEngine("Engine Name");

wisebit.registerEngine("Engine Name", function(
  // `this` is the wisebit viewmodel
  values // [ { name: "State", base: 2 }, ... ]
  // `this.keyedValues` = { "State": 2, ... }
) { return "string"; });

wisebit.addValue("State");

wisebit.addValues([ { name: "State", base: 2 }, ... ]);

wisebit.examples.push({ name: "Ex1", callback: function(wisebit){}});

wisebit.reset();

Help

Demo on gfycat or as a gif and result on wisebit