Skip to content

Commit

Permalink
v1.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
thadeu committed Aug 7, 2023
1 parent 4b4f06b commit 41f9156
Show file tree
Hide file tree
Showing 13 changed files with 598 additions and 385 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = false
insert_final_newline = false
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"tabWidth": 2,
"useTabs": false,
"semi": false,
"singleQuote": true
}
2 changes: 1 addition & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.mjs
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
import r from"lodash.get";import e from"lodash.set";import t from"lodash.isarray";import a from"lodash.isplainobject";function n(r,e){(null==e||e>r.length)&&(e=r.length);for(var t=0,a=new Array(e);t<e;t++)a[t]=r[t];return a}var o=/*#__PURE__*/function(){function o(r){this.data=void 0,this.data=r}var i=o.prototype;return i.replaceValue=function(t,a,o,i){var c=String(a).match(/{{.*?}}/g);if(c)for(var l,u=function(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(t)return(t=t.call(r)).next.bind(t);if(Array.isArray(r)||(t=function(r,e){if(r){if("string"==typeof r)return n(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?n(r,e):void 0}}(r))){t&&(r=t);var a=0;return function(){return a>=r.length?{done:!0}:{done:!1,value:r[a++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(c.reverse());!(l=u()).done;){var s=l.value,f=s.replace(/[{}]/g,""),p=r(i,t),v=r(o,f),d=v;["string"].includes(typeof v)&&(d=p.replace(new RegExp(s),v)),e(i,t,d)}},i.recursiveReplace=function(r,e){for(var n=this,o=0,i=Object.keys(e);o<i.length;o++){var c=i[o],l=e[c];a(l)?this.recursiveReplace(r,l):t(l)?l.map(function(e){return n.recursiveReplace(r,e)}):this.replaceValue(c,l,r,e)}return e},i.try=function(r){var e=JSON.parse(r);return this.recursiveReplace(this.data,e),e},o}();export{o as default};
import r from"lodash.get";import e from"lodash.set";import t from"lodash.isarray";import a from"lodash.isplainobject";function n(r,e){(null==e||e>r.length)&&(e=r.length);for(var t=0,a=new Array(e);t<e;t++)a[t]=r[t];return a}var o=/*#__PURE__*/function(){function o(r){this.data=void 0,this.data=r}var i=o.prototype;return i.replaceValue=function(t,a,o,i){var c=String(a).match(/{{.*?}}/g);if(c)for(var l,u=function(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(t)return(t=t.call(r)).next.bind(t);if(Array.isArray(r)||(t=function(r,e){if(r){if("string"==typeof r)return n(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?n(r,e):void 0}}(r))){t&&(r=t);var a=0;return function(){return a>=r.length?{done:!0}:{done:!1,value:r[a++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(c.reverse());!(l=u()).done;){var s=l.value,f=s.replace(/[{}]/g,""),p=r(i,t),v=r(o,f),d=v;["string"].includes(typeof v)&&(d=p.replace(s,v)),e(i,t,d)}},i.recursiveReplace=function(r,e){for(var n=this,o=0,i=Object.keys(e);o<i.length;o++){var c=i[o],l=e[c];a(l)?this.recursiveReplace(r,l):t(l)?l.map(function(e){return n.recursiveReplace(r,e)}):this.replaceValue(c,l,r,e)}return e},i.try=function(r){var e=JSON.parse(r);return this.recursiveReplace(this.data,e),e},o}();export{o as default};
//# sourceMappingURL=index.mjs.map
2 changes: 1 addition & 1 deletion dist/index.mjs.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.modern.mjs
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
import e from"lodash.get";import r from"lodash.set";import t from"lodash.isarray";import a from"lodash.isplainobject";class s{constructor(e){this.data=void 0,this.data=e}replaceValue(t,a,s,l){let i=String(a).match(/{{.*?}}/g);if(i)for(let a of i.reverse()){let i=a.replace(/[{}]/g,""),o=e(l,t),c=e(s,i),p=c;["string"].includes(typeof c)&&(p=o.replace(new RegExp(a),c)),r(l,t,p)}}recursiveReplace(e,r){for(let s of Object.keys(r)){let l=r[s];a(l)?this.recursiveReplace(e,l):t(l)?l.map(r=>this.recursiveReplace(e,r)):this.replaceValue(s,l,e,r)}return r}try(e){let r=JSON.parse(e);return this.recursiveReplace(this.data,r),r}}export{s as default};
import e from"lodash.get";import r from"lodash.set";import t from"lodash.isarray";import a from"lodash.isplainobject";class s{constructor(e){this.data=void 0,this.data=e}replaceValue(t,a,s,l){let i=String(a).match(/{{.*?}}/g);if(i)for(let a of i.reverse()){let i=a.replace(/[{}]/g,""),o=e(l,t),c=e(s,i),p=c;["string"].includes(typeof c)&&(p=o.replace(a,c)),r(l,t,p)}}recursiveReplace(e,r){for(let s of Object.keys(r)){let l=r[s];a(l)?this.recursiveReplace(e,l):t(l)?l.map(r=>this.recursiveReplace(e,r)):this.replaceValue(s,l,e,r)}return r}try(e){let r=JSON.parse(e);return this.recursiveReplace(this.data,r),r}}export{s as default};
//# sourceMappingURL=index.modern.mjs.map
Loading

0 comments on commit 41f9156

Please sign in to comment.