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

@makerdao/services-core

Package Overview
Dependencies
Maintainers
17
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@makerdao/services-core - npm Package Compare versions

Comparing version 0.9.4 to 0.9.5

2

dist/ServiceManager.js

@@ -119,3 +119,3 @@ 'use strict';

value: function isValidService(service) {
return service !== null && (typeof service === 'undefined' ? 'undefined' : (0, _typeof3.default)(service)) === 'object' && typeof service.manager === 'function' && service.manager() instanceof ServiceManager;
return service !== null && (typeof service === 'undefined' ? 'undefined' : (0, _typeof3.default)(service)) === 'object' && typeof service.manager === 'function';
}

@@ -122,0 +122,0 @@

{
"name": "@makerdao/services-core",
"description": "Dependency injection framework",
"version": "0.9.4",
"version": "0.9.5",
"license": "MIT",
"main": "dist/index.js",
"scripts": {
"prepublishOnly": "babel -d dist src"
"prepublishOnly": "babel -d dist src",
"test": "jest"
},

@@ -10,0 +11,0 @@ "devDependencies": {

# @makerdao/services-core
A dependency injection framework extracted from [dai.js](https://github.com/makerdao/dai.js).
A dependency injection framework extracted from [dai.js](https://github.com/makerdao/dai.js).
### Usage
### TODO
TODO: finish this example.
- [ ] bring [ServiceProvider](https://github.com/makerdao/dai.js/blob/dev/src/config/ServiceProvider.js) over
- [ ] create full usage example
### Usage (TODO)
```js

@@ -10,0 +13,0 @@ class MyService extends PrivateService {

@@ -57,4 +57,3 @@ import ServiceManagerBase from './ServiceManagerBase';

typeof service === 'object' &&
typeof service.manager === 'function' &&
service.manager() instanceof ServiceManager
typeof service.manager === 'function'
);

@@ -61,0 +60,0 @@ }

@@ -9,3 +9,3 @@ import ServiceManager, {

test('should only mark objects with a method manager() returning a ServiceManager as valid', () => {
test('should only mark objects with a manager() method as valid', () => {
expect(

@@ -16,4 +16,3 @@ ServiceManager.isValidService({ manager: () => new ServiceManager(name) })

expect(ServiceManager.isValidService({ manager: true })).toBe(false);
expect(ServiceManager.isValidService({ manager: () => true })).toBe(false);
expect(ServiceManager.isValidService({ manager: () => ({}) })).toBe(false);
expect(ServiceManager.isValidService({ manager: () => ({}) })).toBe(true);
});

@@ -20,0 +19,0 @@

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