1.0.245 • Published 5 months ago

betajs v1.0.245

Weekly downloads
1,945
License
Apache-2.0
Repository
github
Last release
5 months ago

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

ResourceURL
Homepagehttps://betajs.com
Gitgit://github.com/betajs/betajs.git
Repositoryhttps://github.com/betajs/betajs
Bloghttps://blog.betajs.com
Twitterhttps://twitter.com/thebetajs
Gitterhttps://gitter.im/betajs/betajs

Compatability

TargetVersions
Firefox3 - Latest
Chrome18 - Latest
Safari4 - Latest
Opera12 - Latest
Internet Explorer6 - Latest
Edge12 - Latest
iOS3.0 - Latest
YandexLatest
Android4.4 - Latest
NodeJS4.0 - Latest

CDN

ResourceURL
beta.jshttp://cdn.rawgit.com/betajs/betajs/master/dist/beta.js
beta.min.jshttp://cdn.rawgit.com/betajs/betajs/master/dist/beta.min.js
beta-noscoped.jshttp://cdn.rawgit.com/betajs/betajs/master/dist/beta-noscoped.js
beta-noscoped.min.jshttp://cdn.rawgit.com/betajs/betajs/master/dist/beta-noscoped.min.js

Unit Tests

ResourceURL
Test SuiteRun

Weak Dependencies

NameURL
betajs-scopedOpen
betajs-shimsOpen

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
1.0.244

8 months ago

1.0.243

8 months ago

1.0.245

5 months ago

1.0.242

1 year ago

1.0.241

1 year ago

1.0.240

1 year ago

1.0.239

1 year ago

1.0.238

1 year ago

1.0.237

1 year ago

1.0.236

2 years ago

1.0.235

2 years ago

1.0.234

2 years ago

1.0.233

2 years ago

1.0.232

3 years ago

1.0.231

3 years ago

1.0.230

3 years ago

1.0.229

3 years ago

1.0.228

3 years ago

1.0.227

3 years ago

1.0.224

3 years ago

1.0.223

3 years ago

1.0.226

3 years ago

1.0.225

3 years ago

1.0.222

3 years ago

1.0.221

3 years ago

1.0.220

3 years ago

1.0.219

3 years ago

1.0.218

3 years ago

1.0.217

3 years ago

1.0.216

4 years ago

1.0.215

4 years ago

1.0.214

4 years ago

1.0.213

4 years ago

1.0.212

4 years ago

1.0.211

4 years ago

1.0.210

4 years ago

1.0.209

4 years ago

1.0.208

4 years ago

1.0.207

4 years ago

1.0.206

4 years ago

1.0.205

4 years ago

1.0.204

4 years ago

1.0.203

4 years ago

1.0.202

4 years ago

1.0.201

4 years ago

1.0.200

4 years ago

1.0.199

4 years ago

1.0.197

4 years ago

1.0.196

4 years ago

1.0.195

5 years ago

1.0.194

5 years ago

1.0.193

5 years ago

1.0.191

5 years ago

1.0.188

5 years ago

1.0.187

5 years ago

1.0.185

5 years ago

1.0.184

5 years ago

1.0.183

5 years ago

1.0.182

5 years ago

1.0.181

5 years ago

1.0.180

5 years ago

1.0.179

5 years ago

1.0.178

5 years ago

1.0.177

5 years ago

1.0.176

5 years ago

1.0.175

5 years ago

1.0.174

5 years ago

1.0.173

5 years ago

1.0.172

5 years ago

1.0.171

5 years ago

1.0.169

6 years ago

1.0.168

6 years ago

1.0.167

6 years ago

1.0.166

6 years ago

1.0.165

6 years ago

1.0.164

6 years ago

1.0.163

6 years ago

1.0.162

6 years ago

1.0.161

6 years ago

1.0.160

6 years ago

1.0.159

6 years ago

1.0.158

6 years ago

1.0.157

6 years ago

1.0.155

6 years ago

1.0.154

6 years ago

1.0.153

6 years ago

1.0.152

6 years ago

1.0.151

6 years ago

1.0.150

6 years ago

1.0.149

6 years ago

1.0.148

6 years ago

1.0.147

6 years ago

1.0.146

6 years ago

1.0.145

6 years ago

1.0.144

6 years ago

1.0.143

6 years ago

1.0.142

6 years ago

1.0.141

6 years ago

1.0.140

6 years ago

1.0.139

6 years ago

1.0.138

6 years ago

1.0.137

6 years ago

1.0.136

6 years ago

1.0.135

6 years ago

1.0.134

6 years ago

1.0.133

6 years ago

1.0.132

6 years ago

1.0.131

6 years ago

1.0.130

6 years ago

1.0.129

6 years ago

1.0.128

6 years ago

1.0.127

7 years ago

1.0.126

7 years ago

1.0.125

7 years ago

1.0.124

7 years ago

1.0.123

7 years ago

1.0.122

7 years ago

1.0.121

7 years ago

1.0.120

7 years ago

1.0.119

7 years ago

1.0.118

7 years ago

1.0.117

7 years ago

1.0.116

7 years ago

1.0.115

7 years ago

1.0.114

7 years ago

1.0.113

7 years ago

1.0.111

7 years ago

1.0.110

7 years ago

1.0.109

7 years ago

1.0.108

7 years ago

1.0.107

7 years ago

1.0.106

7 years ago

1.0.105

7 years ago

1.0.104

7 years ago

1.0.103

7 years ago

1.0.102

7 years ago

1.0.101

7 years ago

1.0.100

7 years ago

1.0.99

7 years ago

1.0.98

7 years ago

1.0.97

7 years ago

1.0.96

7 years ago

1.0.95

7 years ago

0.0.0

10 years ago