Skip to content

Commit

Permalink
Use compiled-accessors instead of deep-get-set
Browse files Browse the repository at this point in the history
Fix links in packages.json
  • Loading branch information
Quentin Rossetti committed Sep 2, 2014
1 parent f8522e0 commit a2e9559
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
10 changes: 6 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
'use strict';

var Api = function (obj) {
this.obj = obj;
};
Expand All @@ -8,12 +7,15 @@ Api.prototype.access = function (path, value) {
if (arguments.length === 0) {
return this.obj;
}
var accessor = require('deep-get-set');
var accessor = require('compiled-accessors');
if (value) {
return accessor(this.obj, path, value);
var setter = accessor.setter(path);
return setter(this.obj, value);
} else {
return accessor(this.obj, path);
var getter = accessor.getter(path);
return getter(this.obj);
}

};

Api.prototype.each = function (fn) {
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"repository": {
"type": "git",
"url": "git://github.com/quentinrossetti/R.git"
"url": "git://github.com/quentinrossetti/rrr.git"
},
"keywords": [
"recursive",
Expand All @@ -21,16 +21,16 @@
"author": "Quentin Rossetti <quentin.rossetti@gmail.com>",
"license": "ISC",
"bugs": {
"url": "https://github.com/quentinrossetti/R/issues"
"url": "https://github.com/quentinrossetti/rrr/issues"
},
"homepage": "https://github.com/quentinrossetti/R",
"homepage": "https://github.com/quentinrossetti/rrr",
"devDependencies": {
"chai": "^1.9.1",
"docco": "^0.6.3",
"istanbul": "^0.3.0",
"mocha": "^1.21.4"
},
"dependencies": {
"deep-get-set": "^0.1.1"
"compiled-accessors": "^0.2.0"
}
}

0 comments on commit a2e9559

Please sign in to comment.