Comparing version 1.0.4 to 1.1.0
@@ -1,2 +0,2 @@ | ||
export default function e(r,t){t=t||{};for(var n=Object.prototype.toString.call(r).slice(8,-1),l=Math.abs(t.min||5),c=t.char&&t.char.length?t.char[0]:"*",i=t.includeType?" ["+n+"]":"",a="";a.length<7;)a+=c;for(var u="";u.length<l;)u+=c;if("Object"===n)return Object.keys(r).reduce(function(n,l){var c;return Object.assign(n,((c={})[l]=e(r[l],t),c))},{});if("Array"===n)return r.map(function(r){return e(r,t)});if("String"===n)return r.length<l?u+i:r[0]+r.slice(1,-1).replace(/./g,c)+r.slice(-1)+i;if("Number"===n){var o=r<0,g=Math.abs(r).toString();return g.length<l?(o?"-"+u.slice(1):u)+i:(o?"-":"")+g[0]+g.slice(1,-1).replace(/[^\.]/g,c)+g.slice(-1)+i}return"Boolean"===n?(l<8?a:u)+i:"Null"===n?null:void 0} | ||
function t(t){return void 0===t}function r(t){return null===t}function e(t){return"Boolean"===Object.prototype.toString.call(t).slice(8,-1)}function n(t){return"Number"===Object.prototype.toString.call(t).slice(8,-1)&&!isNaN(t)}function c(t){return"String"===Object.prototype.toString.call(t).slice(8,-1)}function i(t){return Array.isArray(t)&&t.every(u)}function o(t){return"Object"===Object.prototype.toString.call(t).slice(8,-1)&&Object.keys(t).every(function(r){return u(t[r])})}function u(u){return[t,r,e,n,c,i,o].some(function(t){return t(u)})}var l=function u(l,a){void 0===a&&(a={});for(var f=Object.prototype.toString.call(l).slice(8,-1),s=Math.abs(a.min||5),g=a.char&&a.char.length?a.char[0]:"*",p=a.includeType?" ["+f+"]":"",b="";b.length<7;)b+=g;for(var y="";y.length<s;)y+=g;if(!t(l)){if(r(l))return null;if(e(l))return(s<8?b:y)+p;if(n(l)){var h=l<0,v=Math.abs(l).toString();return v.length<s?(h?"-"+y.slice(1):y)+p:(h?"-":"")+v[0]+v.slice(1,-1).replace(/[^\.]/g,g)+v.slice(-1)+p}return o(l)?Object.keys(l).reduce(function(t,r){var e;return Object.assign(t,((e={})[r]=u(l[r],a),e))},{}):i(l)?l.map(function(t){return u(t,a)}):c(l)?l.length<s?y+p:l[0]+l.slice(1,-1).replace(/./g,g)+l.slice(-1)+p:void 0}};export default l; | ||
//# sourceMappingURL=rdct.es.js.map |
@@ -1,2 +0,2 @@ | ||
module.exports=function e(r,t){t=t||{};for(var n=Object.prototype.toString.call(r).slice(8,-1),l=Math.abs(t.min||5),c=t.char&&t.char.length?t.char[0]:"*",i=t.includeType?" ["+n+"]":"",a="";a.length<7;)a+=c;for(var u="";u.length<l;)u+=c;if("Object"===n)return Object.keys(r).reduce(function(n,l){var c;return Object.assign(n,((c={})[l]=e(r[l],t),c))},{});if("Array"===n)return r.map(function(r){return e(r,t)});if("String"===n)return r.length<l?u+i:r[0]+r.slice(1,-1).replace(/./g,c)+r.slice(-1)+i;if("Number"===n){var o=r<0,s=Math.abs(r).toString();return s.length<l?(o?"-"+u.slice(1):u)+i:(o?"-":"")+s[0]+s.slice(1,-1).replace(/[^\.]/g,c)+s.slice(-1)+i}return"Boolean"===n?(l<8?a:u)+i:"Null"===n?null:void 0}; | ||
function t(t){return void 0===t}function e(t){return null===t}function r(t){return"Boolean"===Object.prototype.toString.call(t).slice(8,-1)}function n(t){return"Number"===Object.prototype.toString.call(t).slice(8,-1)&&!isNaN(t)}function c(t){return"String"===Object.prototype.toString.call(t).slice(8,-1)}function i(t){return Array.isArray(t)&&t.every(u)}function o(t){return"Object"===Object.prototype.toString.call(t).slice(8,-1)&&Object.keys(t).every(function(e){return u(t[e])})}function u(u){return[t,e,r,n,c,i,o].some(function(t){return t(u)})}module.exports=function u(l,a){void 0===a&&(a={});for(var s=Object.prototype.toString.call(l).slice(8,-1),f=Math.abs(a.min||5),g=a.char&&a.char.length?a.char[0]:"*",p=a.includeType?" ["+s+"]":"",b="";b.length<7;)b+=g;for(var y="";y.length<f;)y+=g;if(!t(l)){if(e(l))return null;if(r(l))return(f<8?b:y)+p;if(n(l)){var h=l<0,j=Math.abs(l).toString();return j.length<f?(h?"-"+y.slice(1):y)+p:(h?"-":"")+j[0]+j.slice(1,-1).replace(/[^\.]/g,g)+j.slice(-1)+p}return o(l)?Object.keys(l).reduce(function(t,e){var r;return Object.assign(t,((r={})[e]=u(l[e],a),r))},{}):i(l)?l.map(function(t){return u(t,a)}):c(l)?l.length<f?y+p:l[0]+l.slice(1,-1).replace(/./g,g)+l.slice(-1)+p:void 0}}; | ||
//# sourceMappingURL=rdct.js.map |
@@ -1,2 +0,2 @@ | ||
export default function e(r,t){t=t||{};for(var n=Object.prototype.toString.call(r).slice(8,-1),l=Math.abs(t.min||5),c=t.char&&t.char.length?t.char[0]:"*",i=t.includeType?" ["+n+"]":"",a="";a.length<7;)a+=c;for(var u="";u.length<l;)u+=c;if("Object"===n)return Object.keys(r).reduce(function(n,l){var c;return Object.assign(n,((c={})[l]=e(r[l],t),c))},{});if("Array"===n)return r.map(function(r){return e(r,t)});if("String"===n)return r.length<l?u+i:r[0]+r.slice(1,-1).replace(/./g,c)+r.slice(-1)+i;if("Number"===n){var o=r<0,g=Math.abs(r).toString();return g.length<l?(o?"-"+u.slice(1):u)+i:(o?"-":"")+g[0]+g.slice(1,-1).replace(/[^\.]/g,c)+g.slice(-1)+i}return"Boolean"===n?(l<8?a:u)+i:"Null"===n?null:void 0} | ||
function t(t){return void 0===t}function e(t){return null===t}function r(t){return"Boolean"===Object.prototype.toString.call(t).slice(8,-1)}function n(t){return"Number"===Object.prototype.toString.call(t).slice(8,-1)&&!isNaN(t)}function c(t){return"String"===Object.prototype.toString.call(t).slice(8,-1)}function l(t){return Array.isArray(t)&&t.every(o)}function i(t){return"Object"===Object.prototype.toString.call(t).slice(8,-1)&&Object.keys(t).every(e=>o(t[e]))}function o(o){return[t,e,r,n,c,l,i].some(t=>t(o))}const u=(o,s={})=>{const a=Object.prototype.toString.call(o).slice(8,-1),f=Math.abs(s.min||5),g=s.char&&s.char.length?s.char[0]:"*",p=s.includeType?` [${a}]`:"";let b="";for(;b.length<7;)b+=g;let y="";for(;y.length<f;)y+=g;if(!t(o)){if(e(o))return null;if(r(o))return(f<8?b:y)+p;if(n(o)){const t=o<0;let e=Math.abs(o).toString();return e.length<f?(t?"-"+y.slice(1):y)+p:(t?"-":"")+e[0]+e.slice(1,-1).replace(/[^\.]/g,g)+e.slice(-1)+p}return i(o)?Object.keys(o).reduce((t,e)=>Object.assign(t,{[e]:u(o[e],s)}),{}):l(o)?o.map(t=>u(t,s)):c(o)?o.length<f?y+p:o[0]+o.slice(1,-1).replace(/./g,g)+o.slice(-1)+p:void 0}};export default u; | ||
//# sourceMappingURL=rdct.modern.js.map |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).rdct=t()}(this,function(){return function e(t,n){n=n||{};for(var r=Object.prototype.toString.call(t).slice(8,-1),i=Math.abs(n.min||5),c=n.char&&n.char.length?n.char[0]:"*",l=n.includeType?" ["+r+"]":"",o="";o.length<7;)o+=c;for(var u="";u.length<i;)u+=c;if("Object"===r)return Object.keys(t).reduce(function(r,i){var c;return Object.assign(r,((c={})[i]=e(t[i],n),c))},{});if("Array"===r)return t.map(function(t){return e(t,n)});if("String"===r)return t.length<i?u+l:t[0]+t.slice(1,-1).replace(/./g,c)+t.slice(-1)+l;if("Number"===r){var f=t<0,a=Math.abs(t).toString();return a.length<i?(f?"-"+u.slice(1):u)+l:(f?"-":"")+a[0]+a.slice(1,-1).replace(/[^\.]/g,c)+a.slice(-1)+l}return"Boolean"===r?(i<8?o:u)+l:"Null"===r?null:void 0}}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e||self).rdct=t()}(this,function(){function e(e){return void 0===e}function t(e){return null===e}function n(e){return"Boolean"===Object.prototype.toString.call(e).slice(8,-1)}function r(e){return"Number"===Object.prototype.toString.call(e).slice(8,-1)&&!isNaN(e)}function i(e){return"String"===Object.prototype.toString.call(e).slice(8,-1)}function o(e){return Array.isArray(e)&&e.every(u)}function c(e){return"Object"===Object.prototype.toString.call(e).slice(8,-1)&&Object.keys(e).every(function(t){return u(e[t])})}function u(u){return[e,t,n,r,i,o,c].some(function(e){return e(u)})}return function u(l,f){void 0===f&&(f={});for(var a=Object.prototype.toString.call(l).slice(8,-1),s=Math.abs(f.min||5),p=f.char&&f.char.length?f.char[0]:"*",g=f.includeType?" ["+a+"]":"",d="";d.length<7;)d+=p;for(var y="";y.length<s;)y+=p;if(!e(l)){if(t(l))return null;if(n(l))return(s<8?d:y)+g;if(r(l)){var b=l<0,h=Math.abs(l).toString();return h.length<s?(b?"-"+y.slice(1):y)+g:(b?"-":"")+h[0]+h.slice(1,-1).replace(/[^\.]/g,p)+h.slice(-1)+g}return c(l)?Object.keys(l).reduce(function(e,t){var n;return Object.assign(e,((n={})[t]=u(l[t],f),n))},{}):o(l)?l.map(function(e){return u(e,f)}):i(l)?l.length<s?y+g:l[0]+l.slice(1,-1).replace(/./g,p)+l.slice(-1)+g:void 0}}}); | ||
//# sourceMappingURL=rdct.umd.js.map |
{ | ||
"name": "rdct", | ||
"version": "1.0.4", | ||
"version": "1.1.0", | ||
"description": "Deeply redact all the things", | ||
@@ -8,2 +8,3 @@ "main": "dist/rdct.js", | ||
"module": "dist/rdct.es.js", | ||
"source": "src/index.ts", | ||
"scripts": { | ||
@@ -13,5 +14,4 @@ "dev": "microbundle watch", | ||
"precommit": "lint-staged", | ||
"prepare": "npm run build", | ||
"pretest": "npm run build", | ||
"test": "mocha" | ||
"prepare": "microbundle", | ||
"test": "jest" | ||
}, | ||
@@ -25,15 +25,19 @@ "keywords": [ | ||
"files": [ | ||
"index.js", | ||
"dist" | ||
], | ||
"author": "Brian Wendt <brian@wendtcode.com> (https://bwendt.com)", | ||
"author": "Brian Wendt <brian@wendtcode.com> (https://brianwendt.com)", | ||
"license": "MIT", | ||
"repository": "wendtcode/rdct", | ||
"publishConfig": { | ||
"registry": "https://registry.npmjs.org/" | ||
}, | ||
"devDependencies": { | ||
"chai": "^4.2.0", | ||
"@types/jest": "^26.0.23", | ||
"husky": "^4.2.3", | ||
"jest": "^26.6.3", | ||
"lint-staged": "^10.0.8", | ||
"microbundle": "^0.12.0-next.7", | ||
"mocha": "^7.1.1", | ||
"prettier": "^1.19.1" | ||
"microbundle": "^0.13.0", | ||
"prettier": "^1.19.1", | ||
"ts-jest": "^26.5.5", | ||
"typescript": "^4.2.4" | ||
}, | ||
@@ -40,0 +44,0 @@ "eslintConfig": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29825
8
37