Skip to content
This repository has been archived by the owner on Mar 6, 2019. It is now read-only.

Commit

Permalink
Add versions and version checking to the libraries.
Browse files Browse the repository at this point in the history
  • Loading branch information
bluefeet committed Apr 14, 2013
1 parent 276970b commit eb5f044
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
NEXT RELEASE
0.0.4 : 2013-04-14
- Remove the option definition property.
- Rename o.extend to o.augment.
- Rename the default definition property to devoid.
Expand All @@ -10,6 +10,7 @@ NEXT RELEASE
- Added the typeOf type.
- New arrayOf and objectOf types.
- New attribute extention (o-attribute.js).
- Add versions and version checking to the libraries.

0.0.3 : 2013-03-24
- New types extension (o-types.js).
Expand Down
4 changes: 4 additions & 0 deletions o-attribute.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
var o = oJS;
if (!o) throw new Error('...');

if (o.versions.core !== '0.0.4') throw new Error('...');
if (o.versions.types !== '0.0.4') throw new Error('...');
o.versions.attribute = '0.0.4';

function ucFirst (str) {
return str.charAt(0).toUpperCase() + str.slice(1);
}
Expand Down
3 changes: 3 additions & 0 deletions o-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
var o = oJS;
if (!o) throw new Error('...');

if (o.versions.core !== '0.0.4') throw new Error('...');
o.versions.types = '0.0.4';

function simpleType (func) {
return function () { return func }
}
Expand Down
2 changes: 2 additions & 0 deletions o.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
var previousO = root.o;
var o = {};

o.versions = { core: '0.0.4' };

// The method in which we export o (and oJS), that works whether in the browseri
// or Node.js, including noConflict, was graciously copied from underscore.js.
if (typeof exports !== 'undefined') {
Expand Down

0 comments on commit eb5f044

Please sign in to comment.