Anyone can create a library, and this is very useful in small projects where you need specific methods and so many times that it is better to organize the code.
Basically there are two approaches. Create functions that accept all data as arguments, or extend the prototype of DOM elements or JavaScript types.
jQuery covered by the first option, MooTools for example by the second.
In any case, it is important to note that there may be clashes with other libraries and therefore plan well for which names to use.
If you want an API around an object, your, you could do it like this:
var MetodosMeus = {
foo: function(str){
// fazer algo
},
bar: function(arr){
// fazer algo
}
};
And then flames for example:
var strLimpa = MetodosMeus.limpar(stringSuja);
Doing the same via extension in the prototype would be
String.prototype.limpar = function(){
// fazer algo
};
and to use would be:
var strLimpa = stringSuja.limpar();
I mentioned MooTools which is also a modular library, which jQuery does not allow in the same way. So if your library gets big it's best to have modules that can work as add-ons. That way you can use just what you need and keep code and files light.