From 1b3f1f21572638209c79b2577a138a882ae40d06 Mon Sep 17 00:00:00 2001 From: Matt Bishop Date: Sat, 7 Apr 2018 11:15:53 -0700 Subject: [PATCH] Remove webpack build. --- .npmignore | 4 +- dist/js.spec.bundle.js | 1 - package.json | 10 +- webpack.config.js | 86 ---- yarn.lock | 1091 +--------------------------------------- 5 files changed, 25 insertions(+), 1167 deletions(-) delete mode 100644 dist/js.spec.bundle.js delete mode 100644 webpack.config.js diff --git a/.npmignore b/.npmignore index 69878d7..962efe3 100644 --- a/.npmignore +++ b/.npmignore @@ -8,6 +8,4 @@ coverage .travis.yml example.js LICENSE -README.md -webpack.config.js -dist/js.spec.bundle.js +README.md \ No newline at end of file diff --git a/dist/js.spec.bundle.js b/dist/js.spec.bundle.js deleted file mode 100644 index b08d2af..0000000 --- a/dist/js.spec.bundle.js +++ /dev/null @@ -1 +0,0 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["js.spec"]=e():t["js.spec"]=e()}("undefined"!=typeof self?self:this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=16)}([function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e2&&void 0!==arguments[2]&&arguments[2];if(t){var r=l(t);if(r)return r.conform(e);if(b.fn(t))return n?t(e):t(e)?e:g.invalid;throw new Error(a(t)+" is a "+(void 0===t?"undefined":v(t))+", not a function. Expected predicate")}return e},e.isSpecInstance=f,e.toSpec=l,e.specize=s,e.valid=function(t,e){return c(t,e)!==g.invalid},e.explain=function(t,e,n,r){var o=s(t);return(0,m.isRegex)(o)?(0,m.regexExplain)(o,e,n,r):o.explain(e,n,r)};var d=r(n(1)),h=n(12),b=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(3)),m=n(14),g=n(2),_=/Symbol\((.*?)\)/},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n0},e.negative=function(t){return(0,u.default)(t)&&t<0},e.zero=function(t){return 0===t};var i=r(n(45)),u=r(n(46)),a=r(n(47)),c=r(n(48)),f=r(n(49)),l=r(n(50)),s=r(n(51)),p=r(n(52)),y=r(n(53)),v=r(n(54)),d=r(n(55)),isArray=Array.isArray;e.nil=function(t){return(0,f.default)(t)},e.number=function(t){return(0,u.default)(t)},e.finite=function(t){return(0,d.default)(t)},e.fn=function(t){return(0,a.default)(t)},e.obj=isObject,e.object=isObject,e.set=isSet,e.bool=isBoolean,e.boolean=isBoolean,e.date=function(t){return(0,s.default)(t)},e.int=isInteger,e.integer=isInteger,e.str=isString,e.string=isString,e.sym=isSymbol,e.symbol=isSymbol,e.array=isArray},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){t.exports=!n(10)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(34),o=n(36);t.exports=function(t){return r(o(t))}},function(t,e){var n=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){"use strict";function r(t,e){if(!e)throw new Error("Cannot use Predicate spec without predicate function.");return new c(t,{fn:e,name:t})}Object.defineProperty(e,"__esModule",{value:!0}),e.Predicate=void 0;var o=function(){function t(t,e){for(var n=0;n0?l(u,o):d.invalid}function s(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.ps,n=void 0===e?[]:e,c=t.ks,f=void 0===c?[]:c,l=t.ret,p=void 0===l?[]:l,y=i(n),v=y[0],d=y.slice(1),h=i(f),b=h[0],m=h.slice(1);if(a(v)){var g=[].concat(o(p),[b?r({},b,v.ret):v.ret]);return d.length>0?s({ps:d,ks:m,ret:g}):u(g.reduce(function(t,e){return Object.assign(t,e)},{}))}return{op:_,ps:n,ks:f,ret:p}}function p(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.ps,n=void 0===e?[]:e,c=t.ks,f=void 0===c?[]:c,l=t.ret,s=void 0===l?{}:l,p=function(t,e,n){if(e.length>0){var r=(0,v.zip)(t,e).filter(function(t){var e=y(t,1)[0];return n(e)});return r.length>0?v.zip.apply(void 0,o(r)):[[],[]]}return[t.filter(function(t){return n(t)}),[]]}(n,f,function(t){return!!t}),d=y(p,2);n=d[0],f=d[1];var h=i(n),b=h[0],m=h.slice(1),_=y(f,1)[0],j={op:g,ps:n,ks:f,ret:s},w=n.findIndex(function(t){return a(t)});return-1!==w?f[w]?u(r({},f[w],n[w].ret)):u(n[w].ret):0!==m.length||_?j:b}Object.defineProperty(e,"__esModule",{value:!0});var y=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var u,a=t[Symbol.iterator]();!(r=(u=a.next()).done)&&(n.push(u.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.isRegex=c,e.deriv=f,e.regexConform=l,e.regexExplain=function(t,e,n,r){if(h.nil(r))return null;if((0,v.valid)(t,r))return null;if(!c(t))return(0,v.explain)(t,e,n,r);if(!Array.isArray(r))return[{path:e,via:n,value:r,predicate:Array.isArray}];switch(t.op){case _:return r.length=t.ps.length}}]:t.ps.map(function(t,e){return[(0,v.valid)(t,r[e]),t,e]}).filter(function(t){return!y(t,1)[0]}).map(function(i){var u=y(i,3),a=u[1],c=u[2];return(0,v.explain)(a,[].concat(o(e),[c]),[].concat(o(n),[(0,v.getName)(t),t.ks[c]]),r[c])});case g:return t.ps.map(function(i,u){return(0,v.explain)(i,[].concat(o(e),[u]),[].concat(o(n),[(0,v.getName)(t),t.ks[u]]),r)});case j:return null}},e.catImpl=function(){for(var t=arguments.length,e=Array(t),n=0;n1?e-1:0),r=1;r0&&(e+=" at ["+t.path.join(", ")+"]"),e+"."}function a(t,e){return i(t,e).map(function(t){return u(t)}).join("\n")}Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractSpec=e.conform=e.valid=e.symbol=e.spec=void 0;var c=n(0);Object.defineProperty(e,"valid",{enumerable:!0,get:function(){return c.valid}}),Object.defineProperty(e,"conform",{enumerable:!0,get:function(){return c.conform}}),e.explainData=i,e.problemStr=u,e.explain=function(t,e){i(t,e).forEach(function(t){return console.log(u(t))})},e.explainStr=a,e.assert=function(t,e){if(!f.valid(t,e))throw new Error(a(t,e))};var f=o(c),l=o(n(56)),s=r(n(1)),p=n(14),y=o(n(3)),v=o(n(2)),d=r(n(64)),h=r(n(65)),b=Object.assign({cat:p.catImpl,alt:p.altImpl},l,y);e.spec=b,e.symbol=v,e.AbstractSpec=s.default},function(t,e,n){t.exports={default:n(18),__esModule:!0}},function(t,e,n){n(19),t.exports=n(9).Object.entries},function(t,e,n){var r=n(20),o=n(30)(!0);r(r.S,"Object",{entries:function(t){return o(t)}})},function(t,e,n){var r=n(5),o=n(9),i=n(21),u=n(23),a="prototype",c=function(t,e,n){var f,l,s,p=t&c.F,y=t&c.G,v=t&c.S,d=t&c.P,h=t&c.B,b=t&c.W,m=y?o:o[e]||(o[e]={}),g=m[a],_=y?r:v?r[e]:(r[e]||{})[a];y&&(n=e);for(f in n)(l=!p&&_&&void 0!==_[f])&&f in m||(s=l?_[f]:n[f],m[f]=y&&"function"!=typeof _[f]?n[f]:h&&l?i(s,r):b&&_[f]==s?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e[a]=t[a],e}(s):d&&"function"==typeof s?i(Function.call,s):s,d&&((m.virtual||(m.virtual={}))[f]=s,t&c.R&&g&&!g[f]&&u(g,f,s)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,e,n){var r=n(22);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var r=n(24),o=n(29);t.exports=n(7)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(25),o=n(26),i=n(28),u=Object.defineProperty;e.f=n(7)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var isObject=n(6);t.exports=function(t){if(!isObject(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){t.exports=!n(7)&&!n(10)(function(){return 7!=Object.defineProperty(n(27)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var isObject=n(6),r=n(5).document,o=isObject(r)&&isObject(r.createElement);t.exports=function(t){return o?r.createElement(t):{}}},function(t,e,n){var isObject=n(6);t.exports=function(t,e){if(!isObject(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!isObject(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!isObject(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!isObject(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(31),o=n(8),i=n(44).f;t.exports=function(t){return function(e){for(var n,u=o(e),a=r(u),c=a.length,f=0,l=[];c>f;)i.call(u,n=a[f++])&&l.push(t?[n,u[n]]:u[n]);return l}}},function(t,e,n){var r=n(32),o=n(43);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e,n){var r=n(33),o=n(8),i=n(37)(!1),u=n(40)("IE_PROTO");t.exports=function(t,e){var n,a=o(t),c=0,f=[];for(n in a)n!=u&&r(a,n)&&f.push(n);for(;e.length>c;)r(a,n=e[c++])&&(~i(f,n)||f.push(n));return f}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(35);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(8),o=n(38),i=n(39);t.exports=function(t){return function(e,n,u){var a,c=r(e),f=o(c.length),l=i(u,f);if(t&&n!=n){for(;f>l;)if((a=c[l++])!=a)return!0}else for(;f>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}}},function(t,e,n){var r=n(11),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e,n){var r=n(11),o=Math.max,i=Math.min;t.exports=function(t,e){return(t=r(t))<0?o(t+e,0):i(t,e)}},function(t,e,n){var r=n(41)("keys"),o=n(42);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,e,n){var r=n(5),o="__core-js_shared__",i=r[o]||(r[o]={});t.exports=function(t){return i[t]||(i[t]={})}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){(function(t,n){function r(t){if(!isObject(t)||function(t){return!!x&&x in t}(t))return!1;return(function(t){var e=isObject(t)?A.call(t):"";return e==u||e==a}(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}(t)?E:p).test(i(t))}function o(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return r(n)?n:void 0}function i(t){if(null!=t){try{return P.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function isObject(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}var u="[object Function]",a="[object GeneratorFunction]",c="[object Promise]",f="[object Set]",l="[object WeakMap]",s="[object DataView]",p=/^\[object .+?Constructor\]$/,y="object"==typeof t&&t&&t.Object===Object&&t,v="object"==typeof self&&self&&self.Object===Object&&self,d=y||v||Function("return this")(),h="object"==typeof e&&e&&!e.nodeType&&e,b=h&&"object"==typeof n&&n&&!n.nodeType&&n,m=b&&b.exports===h&&y.process,g=function(){try{return m&&m.binding("util")}catch(t){}}(),_=g&&g.isSet,j=Function.prototype,w=Object.prototype,O=d["__core-js_shared__"],x=function(){var t=/[^.]+$/.exec(O&&O.keys&&O.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),P=j.toString,S=w.hasOwnProperty,A=w.toString,E=RegExp("^"+P.call(S).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),k=o(d,"DataView"),M=o(d,"Map"),N=o(d,"Promise"),T=o(d,"Set"),C=o(d,"WeakMap"),I=i(k),F=i(M),R=i(N),K=i(T),$=i(C),W=function(t){return A.call(t)};(k&&W(new k(new ArrayBuffer(1)))!=s||M&&"[object Map]"!=W(new M)||N&&W(N.resolve())!=c||T&&W(new T)!=f||C&&W(new C)!=l)&&(W=function(t){var e=A.call(t),n="[object Object]"==e?t.constructor:void 0,r=n?i(n):void 0;if(r)switch(r){case I:return s;case F:return"[object Map]";case R:return c;case K:return f;case $:return l}return e});var isSet=_?function(t){return function(e){return t(e)}}(_):function(t){return function(t){return!!t&&"object"==typeof t}(t)&&W(t)==f};n.exports=isSet}).call(e,n(4),n(13)(t))},function(t,e){var n="[object Number]",r=Object.prototype.toString;t.exports=function(t){return"number"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&r.call(t)==n}},function(t,e){var n="[object Function]",r="[object GeneratorFunction]",o=Object.prototype.toString;t.exports=function(t){var e=function(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}(t)?o.call(t):"";return e==n||e==r}},function(t,e){var n="[object Object]",r=Function.prototype,o=Object.prototype,i=r.toString,u=o.hasOwnProperty,a=i.call(Object),c=o.toString,f=function(t,e){return function(n){return t(e(n))}}(Object.getPrototypeOf,Object);t.exports=function(t){if(!function(t){return!!t&&"object"==typeof t}(t)||c.call(t)!=n||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}(t))return!1;var e=f(t);if(null===e)return!0;var r=u.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&i.call(r)==a}},function(t,e){t.exports=function(t){return null==t}},function(t,e){var n="[object Boolean]",r=Object.prototype.toString;t.exports=function(t){return!0===t||!1===t||function(t){return!!t&&"object"==typeof t}(t)&&r.call(t)==n}},function(t,e,n){(function(t,n){var r="[object Date]",o="object"==typeof t&&t&&t.Object===Object&&t,i="object"==typeof e&&e&&!e.nodeType&&e,u=i&&"object"==typeof n&&n&&!n.nodeType&&n,a=u&&u.exports===i&&o.process,c=function(){try{return a&&a.binding("util")}catch(t){}}(),f=c&&c.isDate,l=Object.prototype.toString,isDate=f?function(t){return function(e){return t(e)}}(f):function(t){return function(t){return!!t&&"object"==typeof t}(t)&&l.call(t)==r};n.exports=isDate}).call(e,n(4),n(13)(t))},function(t,e){function isObject(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}var n=1/0,r=1.7976931348623157e308,o=NaN,i="[object Symbol]",u=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,f=/^0o[0-7]+$/i,l=parseInt,s=Object.prototype.toString;t.exports=function(t){return"number"==typeof t&&t==function(t){var e=function(t){if(!t)return 0===t?t:0;if((t=function(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&s.call(t)==i}(t))return o;if(isObject(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=isObject(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(u,"");var n=c.test(t);return n||f.test(t)?l(t.slice(2),n?2:8):a.test(t)?o:+t}(t))===n||t===-n){var e=t<0?-1:1;return e*r}return t==t?t:0}(t),p=e%1;return e==e?p?e-p:e:0}(t)}},function(t,e){var n="[object String]",r=Object.prototype.toString,isArray=Array.isArray;t.exports=function(t){return"string"==typeof t||!isArray(t)&&function(t){return!!t&&"object"==typeof t}(t)&&r.call(t)==n}},function(t,e){var n="[object Symbol]",r=Object.prototype.toString;t.exports=function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&r.call(t)==n}},function(t,e,n){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e,r="object"==typeof self&&self&&self.Object===Object&&self,o=(n||r||Function("return this")()).isFinite;t.exports=function(t){return"number"==typeof t&&o(t)}}).call(e,n(4))},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(57);Object.defineProperty(e,"tuple",{enumerable:!0,get:function(){return r(o).default}});var i=n(58);Object.defineProperty(e,"map",{enumerable:!0,get:function(){return r(i).default}});var u=n(59);Object.defineProperty(e,"oneOf",{enumerable:!0,get:function(){return r(u).default}});var a=n(60);Object.defineProperty(e,"and",{enumerable:!0,get:function(){return r(a).default}});var c=n(61);Object.defineProperty(e,"collection",{enumerable:!0,get:function(){return r(c).default}});var f=n(15);Object.defineProperty(e,"keys",{enumerable:!0,get:function(){return r(f).default}});var l=n(62);Object.defineProperty(e,"or",{enumerable:!0,get:function(){return r(l).default}});var s=n(63);Object.defineProperty(e,"nilable",{enumerable:!0,get:function(){return r(s).default}});var p=n(12);Object.defineProperty(e,"predicate",{enumerable:!0,get:function(){return p.namedPredicate}})},function(t,e,n){"use strict";function r(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e1?e-1:0),r=1;r0&&(0,c.undefinedPredicateWarning)(t,e),r.length>0&&(0,c.undefinedPredicateWarning)(t,e[l.optional]),new s(t,{requiredKeys:i,requiredSpecs:o,optionalKeys:r,optionalSpecs:n})};var u=r(n(1)),a=r(n(15)),c=n(0),f=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(3)),l=n(2),s=e.Map=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return n.requiredKeys.length>0&&(r.keySpec=a.default.apply(void 0,["Keys("+r.name+")"].concat(o(n.requiredKeys)))),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,u.default),i(e,[{key:"conform",value:function(t){if(f.object(t)){if(this.keySpec&&!(0,c.valid)(this.keySpec,t))return l.invalid;var e={},n=!0,r=!1,o=void 0;try{for(var i,u=(0,c.getAllKeys)(t)[Symbol.iterator]();!(n=(i=u.next()).done);n=!0){var a=i.value,s=t[a],p=this.options.requiredSpecs[a]||this.options.optionalSpecs[a]||null;if(null!==p){var y=(0,c.dt)(p,s);if(y===l.invalid)return l.invalid;e[a]=y}else e[a]=s}}catch(t){r=!0,o=t}finally{try{!n&&u.return&&u.return()}finally{if(r)throw o}}return e}return l.invalid}},{key:"toString",value:function(){return this.name||"Map"}},{key:"explain",value:function(t,e,n){var r=this;return this.keySpec&&!(0,c.valid)(this.keySpec,n)?(0,c.explain)(this.keySpec,t,[].concat(o(e),[(0,c.getName)(this)]),n):(0,c.getAllKeys)(n).map(function(i){var u=n[i],a=r.options.requiredSpecs[i]||r.options.optionalSpecs[i]||null;if(a){var f=(0,c.specize)(a);if(!(0,c.valid)(f,u))return(0,c.explain)(f,[].concat(o(t),[i]),[].concat(o(e),[(0,c.getName)(r)]),n[i])}return null})}}]),e}()},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Enum=void 0;var r=function(){function t(t,e){for(var n=0;n1?e-1:0),r=1;r1?e-1:0),r=1;r2&&void 0!==arguments[2]?arguments[2]:{};if(!c.string(t))throw new Error("Name "+t+" must be a string.");(0,a.undefinedPredicateWarning)(t,e);var r=Object.assign({},n,{spec:(0,a.specize)(e)});return new l(t,r)};var u=function(t){return t&&t.__esModule?t:{default:t}}(n(1)),a=n(0),c=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(3)),f=n(2),l=e.Collection=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,u.default),i(e,[{key:"conform",value:function(t){var e=this;if(!c.coll(t))return f.invalid;var n=(0,a.cardinality)(t),o=this.options[f.count],i=this.options[f.minCount],u=this.options[f.maxCount];if(o){if(c.int(o)&&n!==o)return f.invalid}else if(i||u){if(c.int(i)&&i>n)return f.invalid;if(c.int(u)&&us.length?f.invalid:c.array(t)?s:new Set(s)}},{key:"toString",value:function(){return this.name||"Collection("+(0,a.getName)(this.options.spec)+")"}},{key:"explain",value:function(t,e,n){var i=this;if(!c.coll(n))return[{path:t,via:[].concat(r(e),[(0,a.getName)(this)]),value:n,predicate:c.coll}];var u=(0,a.cardinality)(n),l=this.options[f.count],s=this.options[f.minCount],p=this.options[f.maxCount];if(l){if(c.int(l)&&u!==l)return[{path:t,via:[].concat(r(e),[(0,a.getName)(this)]),value:n,predicate:function t(e){return t(e)===l}}]}else if(s||p){if(c.int(s)&&s>u)return[{path:t,via:[].concat(r(e),[(0,a.getName)(this)]),value:n,predicate:function t(e){return t(e)===s}}];if(c.int(p)&&p-1},r.prototype.set=function(t,e){var n=this.__data__,r=i(n,t);return r<0?n.push([t,e]):n[r][1]=e,this},o.prototype.clear=function(){this.__data__={hash:new n,map:new($||r),string:new n}},o.prototype.delete=function(t){return c(this,t).delete(t)},o.prototype.get=function(t){return c(this,t).get(t)},o.prototype.has=function(t){return c(this,t).has(t)},o.prototype.set=function(t,e){return c(this,t).set(t,e),this};var G=l(function(t){t=s(t);var e=[];return _.test(t)&&e.push(""),t.replace(j,function(t,n,r,o){e.push(r?o.replace(w,"$1"):n||t)}),e});l.Cache=o;var isArray=Array.isArray;t.exports=function(t,e,n){var r=null==t?void 0:u(t,e);return void 0===r?n:r}}).call(e,n(4))},function(t,e,n){(function(e){function n(t,e){for(var n=-1,r=e.length,o=t.length;++n0&&i(l)?e>1?r(l,e-1,i,u,a):n(a,l):u||(a[a.length]=l)}return a}function o(t){return isArray(t)||function(t){return function(t){return function(t){return!!t&&"object"==typeof t}(t)&&function(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=u}(t.length)&&!function(t){var e=function(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}(t)?d.call(t):"";return e==c||e==f}(t)}(t)}(t)&&v.call(t,"callee")&&(!b.call(t,"callee")||d.call(t)==a)}(t)||!!(m&&t&&t[m])}var i=1/0,u=9007199254740991,a="[object Arguments]",c="[object Function]",f="[object GeneratorFunction]",l="object"==typeof e&&e&&e.Object===Object&&e,s="object"==typeof self&&self&&self.Object===Object&&self,p=l||s||Function("return this")(),y=Object.prototype,v=y.hasOwnProperty,d=y.toString,h=p.Symbol,b=y.propertyIsEnumerable,m=h?h.isConcatSpreadable:void 0,isArray=Array.isArray;t.exports=function(t){return t&&t.length?r(t,i):[]}}).call(e,n(4))}])}); \ No newline at end of file diff --git a/package.json b/package.json index 71f7c9d..c251f75 100644 --- a/package.json +++ b/package.json @@ -2,20 +2,17 @@ "name": "js.spec", "version": "1.0.0-23", "description": "clojure.spec for Javascript", - "main": "dist/js.spec.js", + "main": "index.js", "types": "types/index.d.ts", "scripts": { - "build": "webpack --config webpack.config.js", "lint": "yarn run lint-src && yarn run lint-test", "lint-src": "eslint --config .eslintrc.json 'index.js' 'lib/**/*.js'", "lint-test": "eslint --config .eslintrc.test.json 'test/**/*.js'", - "prepare": "yarn run build", "test": "yarn run lint && yarn run test-ts && mocha --recursive --compilers js:babel-register test", "test:watch": "mocha --recursive --reporter=min --watch --compilers js:babel-register test", "test-ts": "./node_modules/.bin/tsc --noImplicitAny --noEmit test/types/types-test.ts", "coverage": "babel-node ./node_modules/.bin/babel-istanbul cover ./node_modules/.bin/_mocha -- test --recursive", "coveralls": "yarn run coverage && cat ./coverage/lcov.info | ./node_modules/.bin/coveralls", - "autobuild": "./node_modules/.bin/nodemon -i 'dist/' -e 'js' -x 'yarn run build'", "prettier": "./node_modules/.bin/prettier --print-width 80 --write index.js \"lib/**/*.js\"" }, "repository": { @@ -53,10 +50,7 @@ "nodemon": "1.13.2", "prettier": "1.9.2", "pretty-format": "21.2.1", - "typescript": "2.7.2", - "uglify-js": "3.2.2", - "uglifyjs-webpack-plugin": "1.1.4", - "webpack": "3.10.0" + "typescript": "2.7.2" }, "dependencies": { "lodash.chunk": "^4.2.0", diff --git a/webpack.config.js b/webpack.config.js deleted file mode 100644 index 9540489..0000000 --- a/webpack.config.js +++ /dev/null @@ -1,86 +0,0 @@ -const fs = require('fs') -const path = require('path') -const node_modules = fs.readdirSync('node_modules') -const uglifyJSPlugin = require('uglifyjs-webpack-plugin'); - -const uglifyJSOptions = { - mangle: { - reserved: [ - // TODO generate - "isArray", - "isNumber", - "isFunction", - "isObject", - "isSet", - "isBoolean", - "isDate", - "isInteger", - "isString", - "isSymbol", - "isNil" - ] - } -}; - -module.exports = [{ - // node library - entry: './index.js', - target: 'node', - bail: true, - externals: node_modules, - output: { - path: path.join(__dirname, 'dist'), - filename: 'js.spec.js', - library: 'js.spec', - libraryTarget: "commonjs2" - }, - module: { - loaders: [{ - test: /\.js$/, - exclude: /node_modules/, - loader: 'babel-loader', - query: { - presets: [ - ['es2015', { - modules: false - }] - ] - } - }] - }, - plugins: [ - new uglifyJSPlugin({ - uglifyOptions: uglifyJSOptions - }) - ] -}, { - //