Socket
Socket
Sign inDemoInstall

@wulechuan/apply-one-stage-one-method-pattern

Package Overview
Dependencies
0
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.6 to 1.0.7

2

build/wulechuan-one-method-one-stage-pattern-builder.min.js

@@ -1,1 +0,1 @@

function WulechuanApplyOneStageOneMethodProgrammingPatternTo(e){function a(e){return Array.isArray(e)&&e.length>1}function n(a,n,o){if("function"!=typeof a)throw TypeError('A so-called stage is basically a function, with some associated aliases just for conveniences, which not only does some demonded work but also exposes subsequence stages and hides past stages for a given stages operator. Among them, the demonded work is provided by you developer via the first argument, So, when defining a stage, the first argument must be a function, \nwhile the provided value was of type "'+typeof a+'".');2===arguments.length&&(o=n,n=!1),t(o);var r=m.length;o.stageIndex=r,o.usingLanguage="";var i={actionAliases:o,allowsToSkip:n,action:function(){if(c)return r===m.length-1?void 0:e;w=r;var n=a.apply(e,arguments);return s(),r===m.length-1?n:e}};return m.push(i),i}function t(e){var n=!1;if(!e||"object"!=typeof e)throw TypeError("The action aliases argument must be an object, containing at least one alias which is marked as in a specified language.");for(var t in e){var o=e[t];o&&"string"==typeof o&&(e[t]=[o],o=e[t]),a(o)&&(n=!0,!T[t]&&(b.push(t),T[t]=!0))}if(!n)throw TypeError("At least one alias is required for a stage action to publish as a method.")}function o(e,n){var t=e[n];if(a(t))return e.usingLanguage=n,t;var o,r=!1;for(o in e)if(t=e[o],a(t)){r=!0,e.usingLanguage=o;break}if(!r)throw ReferenceError("No valid aliases in any language for stage "+e.stageIndex+"!");return console.warn("For stage",e.stageIndex,', none of the aliases is in the preferred language ("'+n+'").','\nInstead, aliases in "'+o+'" are exposed as methods.'),t}function r(e){if(!e)throw TypeError("Must specify the natural language to use.");h=e,g()}function i(){m[0].action.apply(e,arguments)}function s(){u(),m[w].action.apply(e,arguments),0===w&&f(1)}function u(){for(var a=0;a<=w;a++)for(var n=m[a].actionAliases,t=n[n.usingLanguage],o=0;o<t.length;o++){var r=t[o];delete e[r]}}function g(){m.length<1||h&&(y[v]=i,l(0,1))}function f(e){var a,n=m.length;for(a=e;a<m.length-1;a++)if(!m[a].allowsToSkip){n=a+1;break}l(e,n)}function l(a,n){for(var t=a;t<n;t++)for(var r=m[t],i=r.action,s=o(r.actionAliases,h),u=0;u<s.length;u++){var g=s[u];e[g]=i}}var c,h,d="addStage",p="setPreferredNaturalLanguageTo",v="startFromFirstStage",y=this,m=[],w=NaN,b=[],T={};y[d]=function(e,a,t){c=!1,n(e,a,t),y[d]=n,y[p]=r,g()},y[p]=r,y.stop=function(){c=!0,console.error("The process is stopped at stage",w)}}
function WulechuanApplyOneStageOneMethodProgrammingPatternTo(e){function a(e){return Array.isArray(e)&&e.length>1}function n(a,n,o){if("function"!=typeof a)throw TypeError('A so-called stage is basically a function, with some associated aliases just for conveniences, which not only does some demonded work but also exposes subsequence stages and hides past stages for a given stages operator. Among them, the demonded work is provided by you developer via the first argument, So, when defining a stage, the first argument must be a function, \nwhile the provided value was of type "'+typeof a+'".');2===arguments.length&&(o=n,n=!1),t(o);var r=m.length;o.stageIndex=r,o.usingLanguage="";var i={actionAliases:o,allowsToSkip:n,action:function(){if(c)return r===m.length-1?void 0:e;w=r;var n=a.apply(e,arguments);return s(),r===m.length-1?n:e}};return m.push(i),i}function t(e){var n=!1;if(!e||"object"!=typeof e)throw TypeError("The action aliases argument must be an object, containing at least one alias which is marked as in a specified language.");for(var t in e){var o=e[t];o&&"string"==typeof o&&(e[t]=[o],o=e[t]),a(o)&&(n=!0,!T[t]&&(b.push(t),T[t]=!0))}if(!n)throw TypeError("At least one alias is required for a stage action to publish as a method.")}function o(e,n){var t=e[n];if(a(t))return e.usingLanguage=n,t;var o,r=!1;for(o in e)if(t=e[o],a(t)){r=!0,e.usingLanguage=o;break}if(!r)throw ReferenceError("No valid aliases in any language for stage "+e.stageIndex+"!");return console.warn("For stage",e.stageIndex,', none of the aliases is in the preferred language ("'+n+'").','\nInstead, aliases in "'+o+'" are exposed as methods.'),t}function r(e){if(!e)throw TypeError("Must specify the natural language to use.");h=e,g()}function i(){m[0].action.apply(e,arguments)}function s(){u(),m[w].action.apply(e,arguments),0===w&&l(1)}function u(){for(var a=0;a<=w;a++)for(var n=m[a].actionAliases,t=n[n.usingLanguage],o=0;o<t.length;o++){var r=t[o];delete e[r]}}function g(){m.length<1||h&&(y[v]=i,f(0,1))}function l(e){var a,n=m.length;for(a=e;a<m.length-1;a++)if(!m[a].allowsToSkip){n=a+1;break}f(e,n)}function f(a,n){for(var t=a;t<n;t++)for(var r=m[t],i=r.action,s=o(r.actionAliases,h),u=0;u<s.length;u++){var g=s[u];e[g]=i}}var c,h,p="addStage",d="setPreferredNaturalLanguageTo",v="startFromFirstStage",y=this,m=[],w=NaN,b=[],T={};y[p]=function(e,a,t){c=!1,n(e,a,t),y[p]=n,y[d]=r,g()},y[d]=r,y.stop=function(){c=!0,console.error("The process is stopped at stage",w)}}module.exports=WulechuanApplyOneStageOneMethodProgrammingPatternTo;
{
"name": "@wulechuan/apply-one-stage-one-method-pattern",
"version": "1.0.6",
"version": "1.0.7",
"description": "凡由本类构建的实例对象,可用于将本人设计的一种程序设计模式应用至另一“受体”对象。“受体”因而被改造,其各个所涉及之方法函数均被依次对应于各自的所谓“执行阶段”,亦可称“步骤”,每个方法函数对应一个步骤。自此时起,仅第一个步骤所对应的方法函数被公开(或称“曝露”),其余后续步骤之方法函数均被隐藏,直至各自前导执行阶段完成,这些方法函数才会陆续公开。",

@@ -5,0 +5,0 @@ "main": "build/wulechuan-one-method-one-stage-pattern-builder.min.js",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc