Socket
Socket
Sign inDemoInstall

didi

Package Overview
Dependencies
0
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.0 to 2.0.1

5

dist/didi.umd.js

@@ -56,2 +56,7 @@ (function (global, factory) {

// may parse class without constructor
if (!match) {
return [];
}
return match[1] && match[1].split(',').map(function (arg) {

@@ -58,0 +63,0 @@ match = arg.match(FN_ARG);

2

dist/didi.umd.prod.js

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

!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(t.didi={})}(this,function(t){"use strict";var n=/^class /;function e(t){return"[object Array]"===Object.prototype.toString.call(t)}function r(){var t=Array.prototype.slice.call(arguments);1===t.length&&e(t[0])&&(t=t[0]);var n=t.pop();return n.$inject=t,n}var o=/constructor\s*[^(]*\(\s*([^)]*)\)/m,i=/^function\s*[^(]*\(\s*([^)]*)\)/m,c=/\/\*([^*]*)\*\//m;function u(t){if("function"!=typeof t)throw new Error('Cannot annotate "'+t+'". Expected a function!');var e=t.toString().match(function(t){return n.test(t.toString())}(t)?o:i);return e[1]&&e[1].split(",").map(function(t){return(e=t.match(c))?e[1].trim():t.trim()})||[]}function f(){var t=[];this.factory=function(n,e){return t.push([n,"factory",e]),this},this.value=function(n,e){return t.push([n,"value",e]),this},this.type=function(n,e){return t.push([n,"type",e]),this},this.forEach=function(n){t.forEach(n)}}var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function s(t){if(Array.isArray(t)){for(var n=0,e=Array(t.length);n<t.length;n++)e[n]=t[n];return e}return Array.from(t)}t.annotate=r,t.Module=f,t.Injector=function t(n,o){o=o||{get:function(t,n){if(i.push(t),!1===n)return null;throw h('No provider for "'+t+'"!')}};var i=[],c=this._providers=Object.create(o._providers||null),p=this._instances=Object.create(null),l=p.injector=this,h=function(t){var n=i.join(" -> ");return i.length=0,new Error(n?t+" (Resolving: "+n+")":t)},y=function t(n,e){if(!c[n]&&-1!==n.indexOf(".")){for(var r=n.split("."),u=t(r.shift());r.length;)u=u[r.shift()];return u}if(Object.hasOwnProperty.call(p,n))return p[n];if(Object.hasOwnProperty.call(c,n)){if(-1!==i.indexOf(n))throw i.push(n),h("Cannot resolve circular dependency!");return i.push(n),p[n]=c[n][0](c[n][1]),i.pop(),p[n]}return o.get(n,e)},d=function(t){if("function"!=typeof t){if(!e(t))throw new Error('Cannot invoke "'+t+'". Expected a function!');t=r(t.slice())}return{fn:t,dependencies:(t.$inject&&t.$inject||u(t)).map(function(t){return y(t)})}},v=function(t){var n=d(t),e=n.dependencies,r=n.fn;return new(Function.prototype.bind.apply(r,[null].concat(s(e))))},b=function(t,n){var e=d(t),r=e.dependencies,o=e.fn;return o.call.apply(o,[n].concat(s(r)))},m=function(t){return r(function(n){return t.get(n)})},j={factory:b,type:v,value:function(t){return t}};n.forEach(function(n){function o(t,n){return"value"!==t&&e(n)&&(n=r(n.slice())),n}if(n instanceof f)n.forEach(function(t){var n=t[0],e=t[1],r=t[2];c[n]=[j[e],o(e,r),e]});else if("object"===(void 0===n?"undefined":a(n)))if(n.__exports__){var i=Object.keys(n).reduce(function(t,e){return"__"!==e.substring(0,2)&&(t[e]=n[e]),t},Object.create(null)),u=new t((n.__modules__||[]).concat([i]),l),s=r(function(t){return u.get(t)});n.__exports__.forEach(function(t){c[t]=[s,t,"private",u]})}else Object.keys(n).forEach(function(t){if("private"!==n[t][2]){var e=n[t][0],r=n[t][1];c[t]=[j[e],o(e,r),e]}else c[t]=n[t]})}),this.get=y,this.invoke=b,this.instantiate=v,this.createChild=function(n,e){if(e&&e.length){var r,o,i,u,f=Object.create(null),a=Object.create(null),s=[],p=[],h=[];for(var y in c)r=c[y],-1!==e.indexOf(y)&&("private"===r[2]?-1===(o=s.indexOf(r[3]))?(i=r[3].createChild([],e),u=m(i),s.push(r[3]),p.push(i),h.push(u),f[y]=[u,y,"private",i]):f[y]=[h[o],y,"private",p[o]]:f[y]=[r[2],r[1]],a[y]=!0),"factory"!==r[2]&&"type"!==r[2]||!r[1].$scope||e.forEach(function(t){-1!==r[1].$scope.indexOf(t)&&(f[y]=[r[2],r[1]],a[t]=!0)});e.forEach(function(t){if(!a[t])throw new Error('No provider for "'+t+'". Cannot use provider from the parent!')}),n.unshift(f)}return new t(n,l)}},Object.defineProperty(t,"__esModule",{value:!0})});
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(t.didi={})}(this,function(t){"use strict";var n=/^class /;function e(t){return"[object Array]"===Object.prototype.toString.call(t)}function r(){var t=Array.prototype.slice.call(arguments);1===t.length&&e(t[0])&&(t=t[0]);var n=t.pop();return n.$inject=t,n}var o=/constructor\s*[^(]*\(\s*([^)]*)\)/m,i=/^function\s*[^(]*\(\s*([^)]*)\)/m,c=/\/\*([^*]*)\*\//m;function u(t){if("function"!=typeof t)throw new Error('Cannot annotate "'+t+'". Expected a function!');var e=t.toString().match(function(t){return n.test(t.toString())}(t)?o:i);return e&&e[1]&&e[1].split(",").map(function(t){return(e=t.match(c))?e[1].trim():t.trim()})||[]}function f(){var t=[];this.factory=function(n,e){return t.push([n,"factory",e]),this},this.value=function(n,e){return t.push([n,"value",e]),this},this.type=function(n,e){return t.push([n,"type",e]),this},this.forEach=function(n){t.forEach(n)}}var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function s(t){if(Array.isArray(t)){for(var n=0,e=Array(t.length);n<t.length;n++)e[n]=t[n];return e}return Array.from(t)}t.annotate=r,t.Module=f,t.Injector=function t(n,o){o=o||{get:function(t,n){if(i.push(t),!1===n)return null;throw h('No provider for "'+t+'"!')}};var i=[],c=this._providers=Object.create(o._providers||null),p=this._instances=Object.create(null),l=p.injector=this,h=function(t){var n=i.join(" -> ");return i.length=0,new Error(n?t+" (Resolving: "+n+")":t)},y=function t(n,e){if(!c[n]&&-1!==n.indexOf(".")){for(var r=n.split("."),u=t(r.shift());r.length;)u=u[r.shift()];return u}if(Object.hasOwnProperty.call(p,n))return p[n];if(Object.hasOwnProperty.call(c,n)){if(-1!==i.indexOf(n))throw i.push(n),h("Cannot resolve circular dependency!");return i.push(n),p[n]=c[n][0](c[n][1]),i.pop(),p[n]}return o.get(n,e)},d=function(t){if("function"!=typeof t){if(!e(t))throw new Error('Cannot invoke "'+t+'". Expected a function!');t=r(t.slice())}return{fn:t,dependencies:(t.$inject&&t.$inject||u(t)).map(function(t){return y(t)})}},v=function(t){var n=d(t),e=n.dependencies,r=n.fn;return new(Function.prototype.bind.apply(r,[null].concat(s(e))))},b=function(t,n){var e=d(t),r=e.dependencies,o=e.fn;return o.call.apply(o,[n].concat(s(r)))},m=function(t){return r(function(n){return t.get(n)})},j={factory:b,type:v,value:function(t){return t}};n.forEach(function(n){function o(t,n){return"value"!==t&&e(n)&&(n=r(n.slice())),n}if(n instanceof f)n.forEach(function(t){var n=t[0],e=t[1],r=t[2];c[n]=[j[e],o(e,r),e]});else if("object"===(void 0===n?"undefined":a(n)))if(n.__exports__){var i=Object.keys(n).reduce(function(t,e){return"__"!==e.substring(0,2)&&(t[e]=n[e]),t},Object.create(null)),u=new t((n.__modules__||[]).concat([i]),l),s=r(function(t){return u.get(t)});n.__exports__.forEach(function(t){c[t]=[s,t,"private",u]})}else Object.keys(n).forEach(function(t){if("private"!==n[t][2]){var e=n[t][0],r=n[t][1];c[t]=[j[e],o(e,r),e]}else c[t]=n[t]})}),this.get=y,this.invoke=b,this.instantiate=v,this.createChild=function(n,e){if(e&&e.length){var r,o,i,u,f=Object.create(null),a=Object.create(null),s=[],p=[],h=[];for(var y in c)r=c[y],-1!==e.indexOf(y)&&("private"===r[2]?-1===(o=s.indexOf(r[3]))?(i=r[3].createChild([],e),u=m(i),s.push(r[3]),p.push(i),h.push(u),f[y]=[u,y,"private",i]):f[y]=[h[o],y,"private",p[o]]:f[y]=[r[2],r[1]],a[y]=!0),"factory"!==r[2]&&"type"!==r[2]||!r[1].$scope||e.forEach(function(t){-1!==r[1].$scope.indexOf(t)&&(f[y]=[r[2],r[1]],a[t]=!0)});e.forEach(function(t){if(!a[t])throw new Error('No provider for "'+t+'". Cannot use provider from the parent!')}),n.unshift(f)}return new t(n,l)}},Object.defineProperty(t,"__esModule",{value:!0})});

@@ -55,2 +55,7 @@ 'use strict';

// may parse class without constructor
if (!match) {
return [];
}
return match[1] && match[1].split(',').map(function(arg) {

@@ -57,0 +62,0 @@ match = arg.match(FN_ARG);

@@ -47,2 +47,7 @@ import {

// may parse class without constructor
if (!match) {
return [];
}
return match[1] && match[1].split(',').map(function(arg) {

@@ -49,0 +54,0 @@ match = arg.match(FN_ARG);

{
"name": "didi",
"version": "2.0.0",
"version": "2.0.1",
"description": "Dependency Injection for JavaScript",

@@ -5,0 +5,0 @@ "main": "dist/index.cjs.js",

Sorry, the diff of this file is not supported yet

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