From f651f596ccdac372714caef7d6a26d0d14f5306c Mon Sep 17 00:00:00 2001 From: Sean Fridman Date: Mon, 6 Apr 2015 14:27:20 -0400 Subject: Expose resource raw schema --- app/node_modules/okschema/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'app/node_modules/okschema/index.js') diff --git a/app/node_modules/okschema/index.js b/app/node_modules/okschema/index.js index c601a07..1ffe2d6 100644 --- a/app/node_modules/okschema/index.js +++ b/app/node_modules/okschema/index.js @@ -9,7 +9,10 @@ function OKSchema(spec) { if (!(this instanceof OKSchema)) return new OKSchema(spec); if (!spec) throw new Error('No spec provided to OKSchema'); - this._spec = spec; + Object.defineProperty(this, 'spec', { + value: spec, + writable: false + }); } OKSchema.prototype.assertValid = function(data) { -- cgit v1.2.3-70-g09d2