Permalink
Browse files

cleanup

  • Loading branch information...
rolandpoulter committed Oct 22, 2012
1 parent c592418 commit 8a77695c2559e8e353d6ddb3f32003403f9cd46a
Showing with 30 additions and 11 deletions.
  1. +4 −6 Options.js
  2. +19 −0 README.md
  3. +3 −4 package.json
  4. +1 −1 test.js → test/index.js
  5. +3 −0 test/package.json
View
@@ -1,5 +1,3 @@
-/*jslint smarttabs:true */
-
"use strict";
var util = {
@@ -20,20 +18,20 @@ var util = {
}
var Options = module.exports = require('clss')('Options', function (def) {
- def.setOptions = function (options) {
+ def.setOptions = function (options, iterator, that) {
this.options = this.options &&
this.options !== this.constructor.prototype.options ?
this.options : this.options ? Object.create(this.options) : {};
- if (options) util.merge(this.options, options);
+ if (options) util.merge(this.options, options, iterator, that);
return this;
};
- def.newOptions = function (options) {
+ def.newOptions = function (options, iterator, that) {
this.options = util.deepCreate(this.options || (this.options = {}));
- return this.setOptions(options);
+ return this.setOptions(options, iterator, that);
};
});
View
@@ -0,0 +1,19 @@
+Copyright (C) Infinity
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
View
@@ -9,9 +9,8 @@
"description": "",
"contributors": [],
"dependencies": {
- "mrg": ">= 0.0.1",
- "clss": ">= 0.0.1"
+ "mrg": "0.0.1",
+ "clss": "0.0.1"
},
- "devDependencies": {"spc": ">= 0.0.1"},
- "scripts": {"test": "node ./test.js"}
+ "scripts": {"test": "node ./test"}
}
@@ -1,5 +1,5 @@
module.exports = require('spc').describe('Options', function () {
- var Options = require('./Options');
+ var Options = require('../Options');
before(function () {
should();
View
@@ -0,0 +1,3 @@
+{
+ "dependencies": {"spc": "0.0.1"}
+}

0 comments on commit 8a77695

Please sign in to comment.