npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

betajs

v1.0.245

Published

BetaJS is a general-purpose JavaScript helper module. It contains a variety of helper functions and classes.

Downloads

991

Readme

betajs 1.0.245

Build Status Code Climate NPM Gitter Chat

BetaJS is a general-purpose JavaScript helper module. It contains a variety of helper functions and classes.

Getting Started

You can use the library in the browser, in your NodeJS project and compile it as well.

Browser

	<script src="betajs/dist/betajs.min.js"></script>

NodeJS

	var BetaJS = require('betajs/dist/beta.js');

Compile

	git clone https://github.com/betajs/betajs.git
	npm install
	grunt

Basic Usage

The BetaJS module contains a variety of low-level helper libraries, particularly:

  • Asynchronous behaviour and Promises
  • Object Orientation
  • Event Handling
  • Dynamic Lists and Collections
  • Dynamic Properties
  • Remote Method Invocation
  • String Manipulation and Templating
  • Binary Search Trees
  • Timers and Time
  • Iterators
  • Uris
  • State Machine and Abstract Routing

Properties


	var properties = new BetaJS.Properties.Properties({foobar: "initial value"});

	properties.set("foobar", "second value");

	var value = properties.get("foobar");
	// value === "second value"
	
	properties.of('change:foobar', function(newValue, oldValue) {
		console.log('The value of foobar has been changed from', oldValue, 'to', newValue);
	});

Object Orientation

  TestClass = BetaJS.Class.extend(null, {
  
    y: 0,
  
    fooBar: function (x) {
      console.log("Test Class Instance", "fooBar", x, y);
    }
    
  }, {
  
    staticFooBar: function (x) {
      console.log("Test Class", "staticFooBar", x);
    }
    
  });
  TestClass.staticFooBar(5);
  var first = new TestClass();
  first.y = 1;
  first.foobar(2);
  var second = new TestClass();
  second.y = 3;
  second.foobar(4);
  Test Class  staticFooBar  5
  Test Class Instance  fooBar  2  1
  Test Class Instance  fooBar  4  3

Events

	var events = new BetaJS.Events.Events();

	events.trigger("event_name", event_data1, event_data2);

	events.on("event_name", function (event_arg1, event_arg2) {
		// Do something
	}, function_context);

	events.off("event_name", null, function_context);

Links

| Resource | URL | | :--------- | --: | | Homepage | https://betajs.com | | Git | git://github.com/betajs/betajs.git | | Repository | https://github.com/betajs/betajs | | Blog | https://blog.betajs.com | | Twitter | https://twitter.com/thebetajs | | Gitter | https://gitter.im/betajs/betajs |

Compatability

| Target | Versions | | :----- | -------: | | Firefox | 3 - Latest | | Chrome | 18 - Latest | | Safari | 4 - Latest | | Opera | 12 - Latest | | Internet Explorer | 6 - Latest | | Edge | 12 - Latest | | iOS | 3.0 - Latest | | Yandex | Latest | | Android | 4.4 - Latest | | NodeJS | 4.0 - Latest |

CDN

| Resource | URL | | :----- | -------: | | beta.js | http://cdn.rawgit.com/betajs/betajs/master/dist/beta.js | | beta.min.js | http://cdn.rawgit.com/betajs/betajs/master/dist/beta.min.js | | beta-noscoped.js | http://cdn.rawgit.com/betajs/betajs/master/dist/beta-noscoped.js | | beta-noscoped.min.js | http://cdn.rawgit.com/betajs/betajs/master/dist/beta-noscoped.min.js |

Unit Tests

| Resource | URL | | :----- | -------: | | Test Suite | Run |

Weak Dependencies

| Name | URL | | :----- | -------: | | betajs-scoped | Open | | betajs-shims | Open |

Main Contributors

  • Oliver Friedmann
  • Victor Lingenthal

License

Apache-2.0

Credits

This software may include modified and unmodified portions of:

  • Underscore, MIT Software License, (c) 2009-2013 Jeremy Ashkenas, DocumentCloud
  • parseUri, MIT Software License, (c) Steven Levithan

Sponsors

  • Ziggeo
  • Browserstack