Skip to content

Commit

Permalink
Merge pull request #41 from adamsilver/master
Browse files Browse the repository at this point in the history
Improvements plus addition of mixin function
  • Loading branch information
David Mark committed Jul 31, 2012
2 parents 5df507e + 33180ee commit b406610
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 2 deletions.
6 changes: 6 additions & 0 deletions README.md
Expand Up @@ -197,6 +197,12 @@ Currently the documentation is very basic and the API could change for the bette
fail: function(xhr) {}
});

### mixin

var target = { a: 1 };
var source = { b: 2 };
jessie.mixin(target, source); // target now has a property b with value 2

## Developer guides

To begin working on Jessie there are a few simple things you have to be aware of.
Expand Down
3 changes: 3 additions & 0 deletions builder/app.js
Expand Up @@ -25,6 +25,7 @@ app.configure(function(){
});
app.listen(1337);


functionSet.create();
constructorFnSet.create();

Expand Down Expand Up @@ -104,6 +105,8 @@ app.get('/', function(req, res){
}
});

console.log('Listening on port 1337 so visit 127.0.0.1:1337 in your browser.');

function getRequestedFunctions(query) {
var requestedFunctions = [],
key;
Expand Down
12 changes: 12 additions & 0 deletions builder/package.json
@@ -0,0 +1,12 @@
{
"name": "JessieBuilder",
"version": "0.0.1",
"description": "Jessie Builder",
"dependencies": {
"uglify-js": ">=1.2.6",
"simplesets": ">=1.2.0",
"commander": ">=0.6.0",
"cli-table": ">=0.0.1",
"express": "3.0"
}
}
21 changes: 21 additions & 0 deletions functions/mixin/rendition1.js
@@ -0,0 +1,21 @@
var mixin;

/*
Description:
Relies on `Object.prototype.hasOwnProperty`
*/

/*
Degrades:
In browsers without `Object.prototype.hasOwnProperty`
*/

if(Object.prototype.hasOwnProperty) {
mixin = function(target, source) {
for(var property in source) {
if(source.hasOwnProperty(property)) {
target[property] = source[property];
}
}
};
}
4 changes: 2 additions & 2 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "jessie",
"description": "Utility Library",
"description": "Lean beautiful smart",
"author": {
"name": "",
"email": ""
Expand All @@ -12,7 +12,7 @@
},
"repository": {
"type": "git",
"url": "git@github.com:adamsilver/jessie.git"
"url": "git@github.com:rassie/jessie.git"
},
"_id": "jessie@0.0.1",
"dependencies": {
Expand Down

0 comments on commit b406610

Please sign in to comment.