Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

injection-js

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

injection-js - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

2

injection.bundle.js

@@ -796,3 +796,3 @@ (function (global, factory) {

*/
var DELEGATE_CTOR = /^function\s+\S+\(\)\s*{\s*("use strict";)?\s*(return\s+)?\S+\.apply\(this,\s*arguments\)/;
var DELEGATE_CTOR = /^function\s+\S+\(\)\s*{[\s\S]+\.apply\(this,\s*arguments\)/;
var ReflectionCapabilities = (function () {

@@ -799,0 +799,0 @@ function ReflectionCapabilities(reflect) {

{
"name": "injection-js",
"version": "2.0.0",
"version": "2.0.1",
"description": "Dependency Injection library for JavaScript and TypeScript",

@@ -5,0 +5,0 @@ "main": "injection.bundle.js",

@@ -21,3 +21,3 @@ [![Build Status](https://travis-ci.org/mgechev/injection-js.svg?branch=master)](https://travis-ci.org/mgechev/injection-js)

import 'reflect-metadata';
import { ReflectiveInjector, Injectable } from 'injection-js';
import { ReflectiveInjector, Injectable, Injector } from 'injection-js';

@@ -31,2 +31,17 @@ class Http {}

@Injectable()
class Service2 {
constructor(private injector: Injector) {}
getService(): void {
console.log(this.injector.get(Service) instanceof Service);
}
createChildInjector(): void {
const childInjector = ReflectiveInjector.resolveAndCreate([
Service
], this.injector);
}
}
const injector = ReflectiveInjector.resolveAndCreate([

@@ -33,0 +48,0 @@ Service,

@@ -13,3 +13,3 @@ /**

*/
export var DELEGATE_CTOR = /^function\s+\S+\(\)\s*{\s*("use strict";)?\s*(return\s+)?\S+\.apply\(this,\s*arguments\)/;
export var DELEGATE_CTOR = /^function\s+\S+\(\)\s*{[\s\S]+\.apply\(this,\s*arguments\)/;
export var ReflectionCapabilities = (function () {

@@ -16,0 +16,0 @@ function ReflectionCapabilities(reflect) {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc