1.4.73 • Published 10 years ago

chest-src v1.4.73

Weekly downloads
5
License
MIT
Repository
github
Last release
10 years ago

chest-src

Dynamic require in the browser and a few other lightweight tools...

Getting Started

In conjuction with grunt-chest-compiler, this tool allows you to use nodejs's style of require calls on the browser side (along with module.exports), and it loads "required" modules automatically and asynchronously. It stores dependencies in localStorage so you might have to clear it every once in a while, for that reason and more this is still an experimental tool.

It also ships with a few small default modules: extend, jmap and zipcookie.

Here is an example of inheritance and inclusion you can probably identify with:

var extend = require('extend');

function mammel(name, age){
  this.name = name;
  this.age = age;
}
mammel.prototype = {
  talk: function(){
    return ': hello, my name is ' + this.name + ', i\'m ' + this.age + '.';
  }
};

function dog(name, age){
  super(name, age);
}
dog.prototype.talk = function(a){
  return 'barkeese' + super.talk(a);
};

extend(dog, mammel);

var bob = new dog('bob', 21);

console.log(bob.talk('hello'));

module.exports = dog;
1.4.73

10 years ago

1.4.72

10 years ago

1.4.71

10 years ago

1.4.7

10 years ago

1.4.6

10 years ago

1.4.5

10 years ago

1.4.4

10 years ago

1.4.3

10 years ago

1.4.2

10 years ago

1.4.1

10 years ago

1.4.0

10 years ago

1.3.9

10 years ago

1.3.8

10 years ago

1.3.7

10 years ago

1.3.6

10 years ago

1.3.5

10 years ago

1.3.4

10 years ago

1.3.3

10 years ago

1.3.2

10 years ago

1.3.1

10 years ago

1.3.0

10 years ago

1.2.9

10 years ago

1.2.8

10 years ago

1.2.7

10 years ago

1.2.6

10 years ago

1.2.5

10 years ago

1.2.4

10 years ago

1.2.3

10 years ago

1.2.2

10 years ago

1.2.1

10 years ago

1.2.0

10 years ago

1.1.9

10 years ago

1.1.8

10 years ago

1.1.7

10 years ago

1.1.6

10 years ago

1.1.4

10 years ago

1.1.3

10 years ago

1.1.2

10 years ago

1.1.1

10 years ago

1.1.0

10 years ago

1.0.9

10 years ago

1.0.8

10 years ago

1.0.7

10 years ago

1.0.6

10 years ago

1.0.5-1

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3-2

10 years ago

1.0.3

10 years ago

1.0.2-1

10 years ago

1.0.2

10 years ago