From d2453f44df2788788556e8232bc2f1803419a7d9 Mon Sep 17 00:00:00 2001 From: Christina Roberts Date: Fri, 19 Feb 2016 19:11:46 -0500 Subject: [PATCH 1/2] Add test for exports. --- tests/exports.js | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 tests/exports.js diff --git a/tests/exports.js b/tests/exports.js new file mode 100644 index 00000000..48d16b84 --- /dev/null +++ b/tests/exports.js @@ -0,0 +1,9 @@ +var _ = require('underscore'); +var deepEqual = require('assert').deepEqual; +var s = require('../'); + +test('#exports', function() { + deepEqual(_.intersection(Object.keys(s.exports()), _.functions(_)), [], + 'Conflicts exist between exports and underscore functions' + ); +}); From c1a3b89f2f430d781bd7837e89de83bc2038064f Mon Sep 17 00:00:00 2001 From: Christina Roberts Date: Fri, 19 Feb 2016 19:22:33 -0500 Subject: [PATCH 2/2] Add "wrap" to exports. Fixes a bug introduced in https://github.com/epeli/underscore.string/pull/410. --- exports.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exports.js b/exports.js index 501010b5..62e0732f 100644 --- a/exports.js +++ b/exports.js @@ -2,7 +2,7 @@ module.exports = function() { var result = {}; for (var prop in this) { - if (!this.hasOwnProperty(prop) || prop.match(/^(?:include|contains|reverse|join|map)$/)) continue; + if (!this.hasOwnProperty(prop) || prop.match(/^(?:include|contains|reverse|join|map|wrap)$/)) continue; result[prop] = this[prop]; }