has-required-props
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -55,3 +55,3 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
/* 0 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -64,3 +64,3 @@ 'use strict'; | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; | ||
@@ -96,5 +96,5 @@ exports.default = hasRequiredProps; | ||
/***/ }, | ||
/***/ }), | ||
/* 1 */ | ||
/***/ function(module, exports) { | ||
/***/ (function(module, exports) { | ||
@@ -153,5 +153,5 @@ /*! | ||
/***/ } | ||
/***/ }) | ||
/******/ ]) | ||
}); | ||
; |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.hasRequiredProps=t():e.hasRequiredProps=t()}(this,function(){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if("object"!==("undefined"==typeof t?"undefined":u(t))||c(t)||"string"!=typeof e&&!Array.isArray(e)||"string"==typeof e&&""===e.trim()||c(e))return!1;var r=s(e);return Array.isArray(t)?t.every(r):r(t)}Object.defineProperty(t,"__esModule",{value:!0});var u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};t["default"]=o;var f=r(1),i=n(f),c=function(e){return null==e||(Array.isArray(e)?0===e.length:0===Object.keys(e).length)},s=function(e){return function(t){return"string"==typeof e?void 0!==(0,i["default"])(t,e):e.every(function(e){return void 0!==(0,i["default"])(t,e)})}};e.exports=t["default"]},function(e,t){function r(e){return null!==e&&("object"==typeof e||"function"==typeof e)}function n(e){return e?Array.isArray(e)?e.join("."):e:""}/*! | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.hasRequiredProps=e():t.hasRequiredProps=e()}(this,function(){return function(t){function e(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if("object"!==("undefined"==typeof e?"undefined":u(e))||y(e)||"string"!=typeof t&&!Array.isArray(t)||"string"==typeof t&&""===t.trim()||y(t))return!1;var r=c(t);return Array.isArray(e)?e.every(r):r(e)}Object.defineProperty(e,"__esModule",{value:!0});var u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.default=o;var f=r(1),i=n(f),y=function(t){return null==t||(Array.isArray(t)?0===t.length:0===Object.keys(t).length)},c=function(t){return function(e){return"string"==typeof t?void 0!==(0,i.default)(e,t):t.every(function(t){return void 0!==(0,i.default)(e,t)})}};t.exports=e.default},function(t,e){function r(t){return null!==t&&("object"==typeof t||"function"==typeof t)}function n(t){return t?Array.isArray(t)?t.join("."):t:""}/*! | ||
* get-value <https://github.com/jonschlinkert/get-value> | ||
@@ -7,2 +7,2 @@ * | ||
*/ | ||
e.exports=function(e,t,o,u,f){if(!r(e)||!t)return e;if(t=n(t),o&&(t+="."+n(o)),u&&(t+="."+n(u)),f&&(t+="."+n(f)),t in e)return e[t];for(var i=t.split("."),c=i.length,s=-1;e&&++s<c;){for(var y=i[s];"\\"===y[y.length-1];)y=y.slice(0,-1)+"."+i[++s];e=e[y]}return e}}])}); | ||
t.exports=function(t,e,o,u,f){if(!r(t)||!e)return t;if(e=n(e),o&&(e+="."+n(o)),u&&(e+="."+n(u)),f&&(e+="."+n(f)),e in t)return t[e];for(var i=e.split("."),y=i.length,c=-1;t&&++c<y;){for(var p=i[c];"\\"===p[p.length-1];)p=p.slice(0,-1)+"."+i[++c];t=t[p]}return t}}])}); |
@@ -18,4 +18,4 @@ import get from 'get-value' | ||
isEmpty(props) || | ||
typeof requiredProps !== 'string' && !Array.isArray(requiredProps) || | ||
typeof requiredProps === 'string' && requiredProps.trim() === '' || | ||
(typeof requiredProps !== 'string' && !Array.isArray(requiredProps)) || | ||
(typeof requiredProps === 'string' && requiredProps.trim() === '') || | ||
isEmpty(requiredProps) | ||
@@ -22,0 +22,0 @@ ) return false |
@@ -7,3 +7,3 @@ 'use strict'; | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; | ||
@@ -10,0 +10,0 @@ exports.default = hasRequiredProps; |
{ | ||
"name": "has-required-props", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "Assert that your object props have non-undefined values for each required prop", | ||
@@ -24,6 +24,6 @@ "main": "lib/index.js", | ||
"cross-env": "^1.0.8", | ||
"ghooks": "^1.3.2", | ||
"husky": "^0.13.3", | ||
"nyc": "^7.1.0", | ||
"rimraf": "^2.5.3", | ||
"standard": "^7.1.2", | ||
"standard": "^10.0.2", | ||
"webpack": "^1.13.1" | ||
@@ -41,3 +41,5 @@ }, | ||
"build": "npm run clean && npm run build:commonjs && npm run build:umd && npm run build:umd:min", | ||
"prepublish": "npm run check && npm run build" | ||
"prepublish": "npm run check && npm run build", | ||
"precommit": "standard", | ||
"prepush": "npm test" | ||
}, | ||
@@ -86,9 +88,3 @@ "repository": { | ||
"check-coverage": true | ||
}, | ||
"config": { | ||
"ghooks": { | ||
"pre-commit": "standard", | ||
"pre-push": "npm test" | ||
} | ||
} | ||
} |
@@ -18,4 +18,4 @@ # has-required-props | ||
Not using Node or a module bundler? Use a UMD build via the `<script>` tag. | ||
- [https://npmcdn.com/has-required-props/dist/has-required-props.js](https://npmcdn.com/has-required-props/dist/has-required-props.js) | ||
- [https://npmcdn.com/has-required-props/dist/has-required-props.min.js](https://npmcdn.com/has-required-props/dist/has-required-props.min.js) | ||
- [https://unpkg.com/has-required-props/dist/has-required-props.js](https://unpkg.com/has-required-props/dist/has-required-props.js) | ||
- [https://unpkg.com/has-required-props/dist/has-required-props.min.js](https://unpkg.com/has-required-props/dist/has-required-props.min.js) | ||
@@ -22,0 +22,0 @@ ## Usage |
13309