New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

util-array-object-or-both

Package Overview
Dependencies
Maintainers
1
Versions
152
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

util-array-object-or-both - npm Package Compare versions

Comparing version 4.2.1 to 4.2.2

28

CHANGELOG.md

@@ -76,10 +76,10 @@ # Change Log

- ✨ Various documentation and setup tweaks after we migrated to monorepo
- ✨ Setup refresh: updated dependencies and all config files using automated tools
- Various documentation and setup tweaks after we migrated to monorepo
- Setup refresh: updated dependencies and all config files using automated tools
## 2.3.0 (2018-10-26)
- ✨ Updated all dependencies
- ✨ Restored coveralls.io reporting
- ✨ Restored unit test linting
- Updated all dependencies
- Restored coveralls.io reporting
- Restored unit test linting

@@ -90,16 +90,16 @@ ## 2.2.0 (2018-06-16)

- ✨ Migrated to BitBucket (to host repo + perform CI) and Codacy (for code quality audit)
- ✨ Dropped BitHound (RIP) and Travis
- Migrated to BitBucket (to host repo + perform CI) and Codacy (for code quality audit)
- Dropped BitHound (RIP) and Travis
## 2.1.0 (2018-05-25)
- ✨ Set up [Prettier](https://prettier.io) on a custom ESLint rule set.
- ✨ Remove `package.lock` and `.editorconfig`
- ✨ Wired Rollup to remove comments from non-dev builds. This means we can now leave the `console.log`s in the source code — there's no need to comment-out `console.log` statements or care about them not spilling into production. Now it's done automatically.
- ✨ Unit tests are pointing at ES modules build, which means that code coverage is correct now, without Babel functions being missed. This is important because now code coverage is real again and now there are no excuses not to perfect it.
- Set up [Prettier](https://prettier.io) on a custom ESLint rule set.
- Remove `package.lock` and `.editorconfig`
- Wired Rollup to remove comments from non-dev builds. This means we can now leave the `console.log`s in the source code — there's no need to comment-out `console.log` statements or care about them not spilling into production. Now it's done automatically.
- Unit tests are pointing at ES modules build, which means that code coverage is correct now, without Babel functions being missed. This is important because now code coverage is real again and now there are no excuses not to perfect it.
## 2.0.0 (2017-12-13)
- ✨ Rebased in ES Modules
- ✨ Set up Rollup. Now we serve three builds: CommonJS, UMD and ES Module.
- Rebased in ES Modules
- Set up Rollup. Now we serve three builds: CommonJS, UMD and ES Module.

@@ -117,2 +117,2 @@ ## 1.2.0 (2017-09-20)

- ✨ First public release
- First public release
/**
* @name util-array-object-or-both
* @fileoverview Validate and normalise user choice: array, object or both?
* @version 4.2.1
* @version 4.2.2
* @author Roy Revelt, Codsen Ltd

@@ -10,2 +10,2 @@ * @license MIT

import r from"lodash.includes";var s="4.2.1";var y=s,c={msg:"",optsVarName:"given variable"};function m(t,a){let o=["object","objects","obj","ob","o"],n=["array","arrays","arr","aray","arr","a"],i=["any","all","everything","both","either","each","whatever","whatevs","e"],e={...c,...a};if(e?.msg&&e.msg.length&&(e.msg=`${e.msg.trim()} `),e.optsVarName!=="given variable"&&(e.optsVarName=`variable "${e.optsVarName}"`),r(o,t.toLowerCase().trim()))return"object";if(r(n,t.toLowerCase().trim()))return"array";if(r(i,t.toLowerCase().trim()))return"any";throw new TypeError(`${e.msg}The ${e.optsVarName} was customised to an unrecognised value: ${t}. Please check it against the API documentation.`)}export{m as arrObjOrBoth,c as defaults,y as version};
import r from"lodash.includes";var s="4.2.2";var y=s,c={msg:"",optsVarName:"given variable"};function m(t,a){let o=["object","objects","obj","ob","o"],n=["array","arrays","arr","aray","arr","a"],i=["any","all","everything","both","either","each","whatever","whatevs","e"],e={...c,...a};if(e?.msg&&e.msg.length&&(e.msg=`${e.msg.trim()} `),e.optsVarName!=="given variable"&&(e.optsVarName=`variable "${e.optsVarName}"`),r(o,t.toLowerCase().trim()))return"object";if(r(n,t.toLowerCase().trim()))return"array";if(r(i,t.toLowerCase().trim()))return"any";throw new TypeError(`${e.msg}The ${e.optsVarName} was customised to an unrecognised value: ${t}. Please check it against the API documentation.`)}export{m as arrObjOrBoth,c as defaults,y as version};
/**
* @name util-array-object-or-both
* @fileoverview Validate and normalise user choice: array, object or both?
* @version 4.2.1
* @version 4.2.2
* @author Roy Revelt, Codsen Ltd

@@ -10,2 +10,2 @@ * @license MIT

"use strict";var utilArrayObjectOrBoth=(()=>{var V=Object.create;var o=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var $=Object.getOwnPropertyNames,g=Object.getOwnPropertySymbols,L=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable;var l=(r,t,e)=>t in r?o(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,p=(r,t)=>{for(var e in t||(t={}))h.call(t,e)&&l(r,e,t[e]);if(g)for(var e of g(t))P.call(t,e)&&l(r,e,t[e]);return r};var S=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports),k=(r,t)=>{for(var e in t)o(r,e,{get:t[e],enumerable:!0})},m=(r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of $(t))!h.call(r,s)&&s!==e&&o(r,s,{get:()=>t[s],enumerable:!(n=E(t,s))||n.enumerable});return r};var F=(r,t,e)=>(e=r!=null?V(L(r)):{},m(t||!r||!r.__esModule?o(e,"default",{value:r,enumerable:!0}):e,r)),M=r=>m(o({},"__esModule",{value:!0}),r);var N=S((Tr,A)=>{var j=1/0,w=9007199254740991,B=17976931348623157e292,O=0/0,C="[object Arguments]",R="[object Function]",D="[object GeneratorFunction]",G="[object String]",K="[object Symbol]",_=/^\s+|\s+$/g,X=/^[-+]0x[0-9a-f]+$/i,H=/^0b[01]+$/i,U=/^0o[0-7]+$/i,Y=/^(?:0|[1-9]\d*)$/,q=parseInt;function z(r,t){for(var e=-1,n=r?r.length:0,s=Array(n);++e<n;)s[e]=t(r[e],e,r);return s}function J(r,t,e,n){for(var s=r.length,i=e+(n?1:-1);n?i--:++i<s;)if(t(r[i],i,r))return i;return-1}function Q(r,t,e){if(t!==t)return J(r,W,e);for(var n=e-1,s=r.length;++n<s;)if(r[n]===t)return n;return-1}function W(r){return r!==r}function Z(r,t){for(var e=-1,n=Array(r);++e<r;)n[e]=t(e);return n}function v(r,t){return z(t,function(e){return r[e]})}function rr(r,t){return function(e){return r(t(e))}}var a=Object.prototype,f=a.hasOwnProperty,c=a.toString,tr=a.propertyIsEnumerable,er=rr(Object.keys,Object),nr=Math.max;function ir(r,t){var e=x(r)||ur(r)?Z(r.length,String):[],n=e.length,s=!!n;for(var i in r)(t||f.call(r,i))&&!(s&&(i=="length"||or(i,n)))&&e.push(i);return e}function sr(r){if(!ar(r))return er(r);var t=[];for(var e in Object(r))f.call(r,e)&&e!="constructor"&&t.push(e);return t}function or(r,t){return t=t==null?w:t,!!t&&(typeof r=="number"||Y.test(r))&&r>-1&&r%1==0&&r<t}function ar(r){var t=r&&r.constructor,e=typeof t=="function"&&t.prototype||a;return r===e}function cr(r,t,e,n){r=b(r)?r:jr(r),e=e&&!n?lr(e):0;var s=r.length;return e<0&&(e=nr(s+e,0)),br(r)?e<=s&&r.indexOf(t,e)>-1:!!s&&Q(r,t,e)>-1}function ur(r){return pr(r)&&f.call(r,"callee")&&(!tr.call(r,"callee")||c.call(r)==C)}var x=Array.isArray;function b(r){return r!=null&&fr(r.length)&&!yr(r)}function pr(r){return d(r)&&b(r)}function yr(r){var t=y(r)?c.call(r):"";return t==R||t==D}function fr(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=w}function y(r){var t=typeof r;return!!r&&(t=="object"||t=="function")}function d(r){return!!r&&typeof r=="object"}function br(r){return typeof r=="string"||!x(r)&&d(r)&&c.call(r)==G}function dr(r){return typeof r=="symbol"||d(r)&&c.call(r)==K}function gr(r){if(!r)return r===0?r:0;if(r=hr(r),r===j||r===-j){var t=r<0?-1:1;return t*B}return r===r?r:0}function lr(r){var t=gr(r),e=t%1;return t===t?e?t-e:t:0}function hr(r){if(typeof r=="number")return r;if(dr(r))return O;if(y(r)){var t=typeof r.valueOf=="function"?r.valueOf():r;r=y(t)?t+"":t}if(typeof r!="string")return r===0?r:+r;r=r.replace(_,"");var e=H.test(r);return e||U.test(r)?q(r.slice(2),e?2:8):X.test(r)?O:+r}function mr(r){return b(r)?ir(r):sr(r)}function jr(r){return r?v(r,mr(r)):[]}A.exports=cr});var Ar={};k(Ar,{arrObjOrBoth:()=>xr,defaults:()=>I,version:()=>wr});var u=F(N(),1);var T="4.2.1";var wr=T,I={msg:"",optsVarName:"given variable"};function xr(r,t){let e=["object","objects","obj","ob","o"],n=["array","arrays","arr","aray","arr","a"],s=["any","all","everything","both","either","each","whatever","whatevs","e"],i=p(p({},I),t);if((i==null?void 0:i.msg)&&i.msg.length&&(i.msg=`${i.msg.trim()} `),i.optsVarName!=="given variable"&&(i.optsVarName=`variable "${i.optsVarName}"`),(0,u.default)(e,r.toLowerCase().trim()))return"object";if((0,u.default)(n,r.toLowerCase().trim()))return"array";if((0,u.default)(s,r.toLowerCase().trim()))return"any";throw new TypeError(`${i.msg}The ${i.optsVarName} was customised to an unrecognised value: ${r}. Please check it against the API documentation.`)}return M(Ar);})();
"use strict";var utilArrayObjectOrBoth=(()=>{var V=Object.create;var o=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var $=Object.getOwnPropertyNames,g=Object.getOwnPropertySymbols,L=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable;var l=(r,t,e)=>t in r?o(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,p=(r,t)=>{for(var e in t||(t={}))h.call(t,e)&&l(r,e,t[e]);if(g)for(var e of g(t))P.call(t,e)&&l(r,e,t[e]);return r};var S=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports),k=(r,t)=>{for(var e in t)o(r,e,{get:t[e],enumerable:!0})},m=(r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of $(t))!h.call(r,s)&&s!==e&&o(r,s,{get:()=>t[s],enumerable:!(n=E(t,s))||n.enumerable});return r};var F=(r,t,e)=>(e=r!=null?V(L(r)):{},m(t||!r||!r.__esModule?o(e,"default",{value:r,enumerable:!0}):e,r)),M=r=>m(o({},"__esModule",{value:!0}),r);var N=S((Tr,A)=>{var j=1/0,w=9007199254740991,B=17976931348623157e292,O=0/0,C="[object Arguments]",R="[object Function]",D="[object GeneratorFunction]",G="[object String]",K="[object Symbol]",_=/^\s+|\s+$/g,X=/^[-+]0x[0-9a-f]+$/i,H=/^0b[01]+$/i,U=/^0o[0-7]+$/i,Y=/^(?:0|[1-9]\d*)$/,q=parseInt;function z(r,t){for(var e=-1,n=r?r.length:0,s=Array(n);++e<n;)s[e]=t(r[e],e,r);return s}function J(r,t,e,n){for(var s=r.length,i=e+(n?1:-1);n?i--:++i<s;)if(t(r[i],i,r))return i;return-1}function Q(r,t,e){if(t!==t)return J(r,W,e);for(var n=e-1,s=r.length;++n<s;)if(r[n]===t)return n;return-1}function W(r){return r!==r}function Z(r,t){for(var e=-1,n=Array(r);++e<r;)n[e]=t(e);return n}function v(r,t){return z(t,function(e){return r[e]})}function rr(r,t){return function(e){return r(t(e))}}var a=Object.prototype,f=a.hasOwnProperty,c=a.toString,tr=a.propertyIsEnumerable,er=rr(Object.keys,Object),nr=Math.max;function ir(r,t){var e=x(r)||ur(r)?Z(r.length,String):[],n=e.length,s=!!n;for(var i in r)(t||f.call(r,i))&&!(s&&(i=="length"||or(i,n)))&&e.push(i);return e}function sr(r){if(!ar(r))return er(r);var t=[];for(var e in Object(r))f.call(r,e)&&e!="constructor"&&t.push(e);return t}function or(r,t){return t=t==null?w:t,!!t&&(typeof r=="number"||Y.test(r))&&r>-1&&r%1==0&&r<t}function ar(r){var t=r&&r.constructor,e=typeof t=="function"&&t.prototype||a;return r===e}function cr(r,t,e,n){r=b(r)?r:jr(r),e=e&&!n?lr(e):0;var s=r.length;return e<0&&(e=nr(s+e,0)),br(r)?e<=s&&r.indexOf(t,e)>-1:!!s&&Q(r,t,e)>-1}function ur(r){return pr(r)&&f.call(r,"callee")&&(!tr.call(r,"callee")||c.call(r)==C)}var x=Array.isArray;function b(r){return r!=null&&fr(r.length)&&!yr(r)}function pr(r){return d(r)&&b(r)}function yr(r){var t=y(r)?c.call(r):"";return t==R||t==D}function fr(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=w}function y(r){var t=typeof r;return!!r&&(t=="object"||t=="function")}function d(r){return!!r&&typeof r=="object"}function br(r){return typeof r=="string"||!x(r)&&d(r)&&c.call(r)==G}function dr(r){return typeof r=="symbol"||d(r)&&c.call(r)==K}function gr(r){if(!r)return r===0?r:0;if(r=hr(r),r===j||r===-j){var t=r<0?-1:1;return t*B}return r===r?r:0}function lr(r){var t=gr(r),e=t%1;return t===t?e?t-e:t:0}function hr(r){if(typeof r=="number")return r;if(dr(r))return O;if(y(r)){var t=typeof r.valueOf=="function"?r.valueOf():r;r=y(t)?t+"":t}if(typeof r!="string")return r===0?r:+r;r=r.replace(_,"");var e=H.test(r);return e||U.test(r)?q(r.slice(2),e?2:8):X.test(r)?O:+r}function mr(r){return b(r)?ir(r):sr(r)}function jr(r){return r?v(r,mr(r)):[]}A.exports=cr});var Ar={};k(Ar,{arrObjOrBoth:()=>xr,defaults:()=>I,version:()=>wr});var u=F(N(),1);var T="4.2.2";var wr=T,I={msg:"",optsVarName:"given variable"};function xr(r,t){let e=["object","objects","obj","ob","o"],n=["array","arrays","arr","aray","arr","a"],s=["any","all","everything","both","either","each","whatever","whatevs","e"],i=p(p({},I),t);if((i==null?void 0:i.msg)&&i.msg.length&&(i.msg=`${i.msg.trim()} `),i.optsVarName!=="given variable"&&(i.optsVarName=`variable "${i.optsVarName}"`),(0,u.default)(e,r.toLowerCase().trim()))return"object";if((0,u.default)(n,r.toLowerCase().trim()))return"array";if((0,u.default)(s,r.toLowerCase().trim()))return"any";throw new TypeError(`${i.msg}The ${i.optsVarName} was customised to an unrecognised value: ${r}. Please check it against the API documentation.`)}return M(Ar);})();
{
"name": "util-array-object-or-both",
"version": "4.2.1",
"version": "4.2.2",
"description": "Validate and normalise user choice: array, object or both?",

@@ -5,0 +5,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc