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

@untool/core

Package Overview
Dependencies
Maintainers
4
Versions
93
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@untool/core - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

# [1.2.0](https://github.com/untool/untool/compare/v1.1.0...v1.2.0) (2019-02-27)
### Features
* **core:** introduce validation helpers ([c931a20](https://github.com/untool/untool/commit/c931a20))
# [1.1.0](https://github.com/untool/untool/compare/v1.0.0...v1.1.0) (2019-02-14)

@@ -8,0 +19,0 @@

4

lib/loader.js

@@ -42,4 +42,4 @@ 'use strict';

if (config.mixins) {
config.mixins = config.mixins.map(
(mixin) => (mixin.startsWith('.') ? join(directory, mixin) : mixin)
config.mixins = config.mixins.map((mixin) =>
mixin.startsWith('.') ? join(directory, mixin) : mixin
);

@@ -46,0 +46,0 @@ }

@@ -8,2 +8,30 @@ 'use strict';

exports.invariant = (condition, message) => {
if (condition) return;
throw new Error(`Invariant violation: ${message}`);
};
exports.validate = (strategy, checkArgs = () => {}, checkResult = () => {}) =>
Object.defineProperty(
(functions, ...initialArgs) =>
strategy(
functions.map((fn) => (...callArgs) => {
checkArgs(callArgs, initialArgs);
const result = fn(...callArgs);
if (result && typeof result.then === 'function') {
return result.then((result) => {
checkResult(result, true, callArgs, initialArgs);
return result;
});
} else {
checkResult(result, false, callArgs, initialArgs);
return result;
}
}),
...initialArgs
),
'name',
{ value: strategy.name }
);
exports.merge = (...args) =>

@@ -10,0 +38,0 @@ mergeWith({}, ...args, (objValue, srcValue, key) => {

{
"name": "@untool/core",
"version": "1.1.0",
"version": "1.2.0",
"description": "untool core",

@@ -35,3 +35,3 @@ "repository": {

},
"gitHead": "e92a4e17440f172b7211c57d7bbf9badd34ec8b3"
"gitHead": "0576dcfa7e743599b9f020024e1f479cdd7044b9"
}
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