-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2630e9d
commit 9b3fa8e
Showing
11 changed files
with
1,230 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,3 @@ | ||
var aa = require('./color') | ||
const color = require('./color'); | ||
|
||
exports = module.exports = aa; | ||
|
||
exports.toxic = function() { | ||
// 在String原型上扩展 | ||
// 不建议在原型对象上扩展 | ||
var colors = exports.color; | ||
Object.keys(colors).forEach(function(key) { | ||
var fn = colors[key]; | ||
Object.defineProperty(String.prototype, key, { | ||
get: function() { | ||
return fn(this.valueOf()); | ||
} | ||
}); | ||
}); | ||
}; | ||
exports = module.exports = color; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.