@onflow/util-template
Advanced tools
Comparing version 1.0.0-alpha.0 to 1.0.0-alpha.1
# @onflow/util-template | ||
## 1.0.0-alpha.1 | ||
### Patch Changes | ||
- [#1164](https://github.com/onflow/fcl-js/pull/1164) [`11229868`](https://github.com/onflow/fcl-js/commit/11229868cf916d204901f8bb3f76ee234e9152a8) Thanks [@justinbarry](https://github.com/justinbarry)! - No longer minify released source code. | ||
## 1.0.0-alpha.0 | ||
@@ -4,0 +10,0 @@ |
@@ -1,2 +0,62 @@ | ||
function n(t,e,o){if(void 0===t&&(t=[]),void 0===e&&(e=[]),void 0===o&&(o=[]),!t.length&&!e.length)return o;if(!t.length)return o;if(!e.length)return[].concat(o,[t[0]]);var r=t[0],i=t.slice(1),a=e[0],u=e.slice(1);return void 0!==r&&o.push(r),void 0!==a&&o.push(a),n(i,u,o)}function t(n){return function(e){return"function"==typeof e?(console.warn("\n %cFCL/SDK Deprecation Notice\n ============================\n\n Interopolation of functions into template literals will not be a thing in future versions of the Flow-JS-SDK or FCL.\n You can learn more (including a guide on common transition paths) here: https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0001-deprecate-params\n\n ============================\n ","font-weight:bold;font-family:monospace;"),t(n)(e(n))):String(e)}}exports.interleave=n,exports.template=function(e){for(var o=arguments.length,r=new Array(o>1?o-1:0),i=1;i<o;i++)r[i-1]=arguments[i];return"string"==typeof e?function(){return e}:Array.isArray(e)?function(o){return n(e,r.map(t(o))).join("").trim()}:e}; | ||
function interleave(a, b, c) { | ||
if (a === void 0) { | ||
a = []; | ||
} | ||
if (b === void 0) { | ||
b = []; | ||
} | ||
if (c === void 0) { | ||
c = []; | ||
} | ||
if (!a.length && !b.length) return c; | ||
if (!a.length) return c; | ||
if (!b.length) return [].concat(c, [a[0]]); | ||
var _a = a, | ||
aHead = _a[0], | ||
aRest = _a.slice(1); | ||
var _b = b, | ||
bHead = _b[0], | ||
bRest = _b.slice(1); | ||
if (aHead !== undefined) c.push(aHead); | ||
if (bHead !== undefined) c.push(bHead); | ||
return interleave(aRest, bRest, c); | ||
} | ||
function recApply(d) { | ||
return function (arg1) { | ||
if (typeof arg1 === "function") { | ||
console.warn("\n %cFCL/SDK Deprecation Notice\n ============================\n\n Interopolation of functions into template literals will not be a thing in future versions of the Flow-JS-SDK or FCL.\n You can learn more (including a guide on common transition paths) here: https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0001-deprecate-params\n\n ============================\n ", "font-weight:bold;font-family:monospace;"); | ||
return recApply(d)(arg1(d)); | ||
} | ||
return String(arg1); | ||
}; | ||
} | ||
function template(head) { | ||
for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { | ||
rest[_key - 1] = arguments[_key]; | ||
} | ||
if (typeof head === "string") return function () { | ||
return head; | ||
}; | ||
if (Array.isArray(head)) { | ||
return function (d) { | ||
return interleave(head, rest.map(recApply(d))).join("").trim(); | ||
}; | ||
} | ||
return head; | ||
} | ||
exports.interleave = interleave; | ||
exports.template = template; | ||
//# sourceMappingURL=template.js.map |
@@ -1,2 +0,61 @@ | ||
function n(t,o,r){if(void 0===t&&(t=[]),void 0===o&&(o=[]),void 0===r&&(r=[]),!t.length&&!o.length)return r;if(!t.length)return r;if(!o.length)return[].concat(r,[t[0]]);var e=t[0],i=t.slice(1),a=o[0],u=o.slice(1);return void 0!==e&&r.push(e),void 0!==a&&r.push(a),n(i,u,r)}function t(n){return function(o){return"function"==typeof o?(console.warn("\n %cFCL/SDK Deprecation Notice\n ============================\n\n Interopolation of functions into template literals will not be a thing in future versions of the Flow-JS-SDK or FCL.\n You can learn more (including a guide on common transition paths) here: https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0001-deprecate-params\n\n ============================\n ","font-weight:bold;font-family:monospace;"),t(n)(o(n))):String(o)}}function o(o){for(var r=arguments.length,e=new Array(r>1?r-1:0),i=1;i<r;i++)e[i-1]=arguments[i];return"string"==typeof o?function(){return o}:Array.isArray(o)?function(r){return n(o,e.map(t(r))).join("").trim()}:o}export{n as interleave,o as template}; | ||
function interleave(a, b, c) { | ||
if (a === void 0) { | ||
a = []; | ||
} | ||
if (b === void 0) { | ||
b = []; | ||
} | ||
if (c === void 0) { | ||
c = []; | ||
} | ||
if (!a.length && !b.length) return c; | ||
if (!a.length) return c; | ||
if (!b.length) return [].concat(c, [a[0]]); | ||
var _a = a, | ||
aHead = _a[0], | ||
aRest = _a.slice(1); | ||
var _b = b, | ||
bHead = _b[0], | ||
bRest = _b.slice(1); | ||
if (aHead !== undefined) c.push(aHead); | ||
if (bHead !== undefined) c.push(bHead); | ||
return interleave(aRest, bRest, c); | ||
} | ||
function recApply(d) { | ||
return function (arg1) { | ||
if (typeof arg1 === "function") { | ||
console.warn("\n %cFCL/SDK Deprecation Notice\n ============================\n\n Interopolation of functions into template literals will not be a thing in future versions of the Flow-JS-SDK or FCL.\n You can learn more (including a guide on common transition paths) here: https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0001-deprecate-params\n\n ============================\n ", "font-weight:bold;font-family:monospace;"); | ||
return recApply(d)(arg1(d)); | ||
} | ||
return String(arg1); | ||
}; | ||
} | ||
function template(head) { | ||
for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { | ||
rest[_key - 1] = arguments[_key]; | ||
} | ||
if (typeof head === "string") return function () { | ||
return head; | ||
}; | ||
if (Array.isArray(head)) { | ||
return function (d) { | ||
return interleave(head, rest.map(recApply(d))).join("").trim(); | ||
}; | ||
} | ||
return head; | ||
} | ||
export { interleave, template }; | ||
//# sourceMappingURL=template.modern.js.map |
@@ -1,2 +0,61 @@ | ||
function n(t,o,r){if(void 0===t&&(t=[]),void 0===o&&(o=[]),void 0===r&&(r=[]),!t.length&&!o.length)return r;if(!t.length)return r;if(!o.length)return[].concat(r,[t[0]]);var e=t[0],i=t.slice(1),a=o[0],u=o.slice(1);return void 0!==e&&r.push(e),void 0!==a&&r.push(a),n(i,u,r)}function t(n){return function(o){return"function"==typeof o?(console.warn("\n %cFCL/SDK Deprecation Notice\n ============================\n\n Interopolation of functions into template literals will not be a thing in future versions of the Flow-JS-SDK or FCL.\n You can learn more (including a guide on common transition paths) here: https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0001-deprecate-params\n\n ============================\n ","font-weight:bold;font-family:monospace;"),t(n)(o(n))):String(o)}}function o(o){for(var r=arguments.length,e=new Array(r>1?r-1:0),i=1;i<r;i++)e[i-1]=arguments[i];return"string"==typeof o?function(){return o}:Array.isArray(o)?function(r){return n(o,e.map(t(r))).join("").trim()}:o}export{n as interleave,o as template}; | ||
function interleave(a, b, c) { | ||
if (a === void 0) { | ||
a = []; | ||
} | ||
if (b === void 0) { | ||
b = []; | ||
} | ||
if (c === void 0) { | ||
c = []; | ||
} | ||
if (!a.length && !b.length) return c; | ||
if (!a.length) return c; | ||
if (!b.length) return [].concat(c, [a[0]]); | ||
var _a = a, | ||
aHead = _a[0], | ||
aRest = _a.slice(1); | ||
var _b = b, | ||
bHead = _b[0], | ||
bRest = _b.slice(1); | ||
if (aHead !== undefined) c.push(aHead); | ||
if (bHead !== undefined) c.push(bHead); | ||
return interleave(aRest, bRest, c); | ||
} | ||
function recApply(d) { | ||
return function (arg1) { | ||
if (typeof arg1 === "function") { | ||
console.warn("\n %cFCL/SDK Deprecation Notice\n ============================\n\n Interopolation of functions into template literals will not be a thing in future versions of the Flow-JS-SDK or FCL.\n You can learn more (including a guide on common transition paths) here: https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0001-deprecate-params\n\n ============================\n ", "font-weight:bold;font-family:monospace;"); | ||
return recApply(d)(arg1(d)); | ||
} | ||
return String(arg1); | ||
}; | ||
} | ||
function template(head) { | ||
for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { | ||
rest[_key - 1] = arguments[_key]; | ||
} | ||
if (typeof head === "string") return function () { | ||
return head; | ||
}; | ||
if (Array.isArray(head)) { | ||
return function (d) { | ||
return interleave(head, rest.map(recApply(d))).join("").trim(); | ||
}; | ||
} | ||
return head; | ||
} | ||
export { interleave, template }; | ||
//# sourceMappingURL=template.module.js.map |
@@ -1,2 +0,69 @@ | ||
!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((n=n||self).utilTemplate={})}(this,function(n){function e(n,t,o){if(void 0===n&&(n=[]),void 0===t&&(t=[]),void 0===o&&(o=[]),!n.length&&!t.length)return o;if(!n.length)return o;if(!t.length)return[].concat(o,[n[0]]);var i=n[0],r=n.slice(1),f=t[0],u=t.slice(1);return void 0!==i&&o.push(i),void 0!==f&&o.push(f),e(r,u,o)}function t(n){return function(e){return"function"==typeof e?(console.warn("\n %cFCL/SDK Deprecation Notice\n ============================\n\n Interopolation of functions into template literals will not be a thing in future versions of the Flow-JS-SDK or FCL.\n You can learn more (including a guide on common transition paths) here: https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0001-deprecate-params\n\n ============================\n ","font-weight:bold;font-family:monospace;"),t(n)(e(n))):String(e)}}n.interleave=e,n.template=function(n){for(var o=arguments.length,i=new Array(o>1?o-1:0),r=1;r<o;r++)i[r-1]=arguments[r];return"string"==typeof n?function(){return n}:Array.isArray(n)?function(o){return e(n,i.map(t(o))).join("").trim()}:n}}); | ||
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : | ||
typeof define === 'function' && define.amd ? define(['exports'], factory) : | ||
(global = global || self, factory(global.utilTemplate = {})); | ||
}(this, (function (exports) { | ||
function interleave(a, b, c) { | ||
if (a === void 0) { | ||
a = []; | ||
} | ||
if (b === void 0) { | ||
b = []; | ||
} | ||
if (c === void 0) { | ||
c = []; | ||
} | ||
if (!a.length && !b.length) return c; | ||
if (!a.length) return c; | ||
if (!b.length) return [].concat(c, [a[0]]); | ||
var _a = a, | ||
aHead = _a[0], | ||
aRest = _a.slice(1); | ||
var _b = b, | ||
bHead = _b[0], | ||
bRest = _b.slice(1); | ||
if (aHead !== undefined) c.push(aHead); | ||
if (bHead !== undefined) c.push(bHead); | ||
return interleave(aRest, bRest, c); | ||
} | ||
function recApply(d) { | ||
return function (arg1) { | ||
if (typeof arg1 === "function") { | ||
console.warn("\n %cFCL/SDK Deprecation Notice\n ============================\n\n Interopolation of functions into template literals will not be a thing in future versions of the Flow-JS-SDK or FCL.\n You can learn more (including a guide on common transition paths) here: https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0001-deprecate-params\n\n ============================\n ", "font-weight:bold;font-family:monospace;"); | ||
return recApply(d)(arg1(d)); | ||
} | ||
return String(arg1); | ||
}; | ||
} | ||
function template(head) { | ||
for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { | ||
rest[_key - 1] = arguments[_key]; | ||
} | ||
if (typeof head === "string") return function () { | ||
return head; | ||
}; | ||
if (Array.isArray(head)) { | ||
return function (d) { | ||
return interleave(head, rest.map(recApply(d))).join("").trim(); | ||
}; | ||
} | ||
return head; | ||
} | ||
exports.interleave = interleave; | ||
exports.template = template; | ||
}))); | ||
//# sourceMappingURL=template.umd.js.map |
{ | ||
"name": "@onflow/util-template", | ||
"version": "1.0.0-alpha.0", | ||
"version": "1.0.0-alpha.1", | ||
"description": "Template Literal used for Cadence Interop", | ||
@@ -32,3 +32,3 @@ "license": "Apache-2.0", | ||
"test": "jest", | ||
"build": "microbundle", | ||
"build": "microbundle --no-compress", | ||
"test:watch": "jest --watch", | ||
@@ -35,0 +35,0 @@ "start": "microbundle watch" |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
28612
327
0