Skip to content

Commit

Permalink
inline inherits
Browse files Browse the repository at this point in the history
  • Loading branch information
juliangruber committed Mar 22, 2013
1 parent 8b8b28d commit b3a57da
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
5 changes: 2 additions & 3 deletions component.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "periodic",
"repo": "juliangruber/periodic",
"description": "Reliable periodic events.",
"version": "0.0.1",
"version": "0.0.2",
"keywords": [
"timer",
"setTimeout",
Expand All @@ -13,8 +13,7 @@
"periodic"
],
"dependencies": {
"juliangruber/events": "0.0.1",
"component/inherit": "0.0.2"
"juliangruber/events": "0.0.1"
},
"scripts": [
"index.js"
Expand Down
14 changes: 7 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
var EventEmitter = require('events').EventEmitter;

var inherits;
try {
inherits = require('util').inherits;
} catch (err) {
inherits = require('inherit');
}

module.exports = periodic;

function periodic (interval) {
Expand Down Expand Up @@ -46,3 +39,10 @@ periodic.prototype.end = function () {
this.ended = true;
if (this.timeout) clearTimeout(this.timeout);
}

function inherits (a, b){
var fn = function(){};
fn.prototype = b.prototype;
a.prototype = new fn;
a.prototype.constructor = a;
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "periodic",
"description": "Reliable periodic events.",
"version": "0.0.1",
"version": "0.0.2",
"repository": {
"type": "git",
"url": "git://github.com/juliangruber/periodic.git"
Expand Down

0 comments on commit b3a57da

Please sign in to comment.