New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

assured

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

assured - npm Package Compare versions

Comparing version 1.0.6 to 1.0.7

12

lib/index.js
"use strict";
var _promise = require("babel-runtime/core-js/promise");
var _promise2 = _interopRequireDefault(_promise);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var noop = require("noop6"),

@@ -23,11 +29,10 @@ sliced = require("sliced");

module.exports = function assured(fn, p) {
p = p || Promise;
p = p || _promise2.default;
fn = fn || noop;
var res = function res(err) {
fn.apply(res, arguments);
if (err) {
fn(err);
res.assuredReject(err);
} else {
fn.apply(res, arguments);
res.assuredResolve.apply(res, sliced(arguments, 1));

@@ -44,3 +49,4 @@ }

res._ = new p(res.resolver);
res._.catch(noop);
return res;
};

@@ -13,3 +13,3 @@ {

"license": "MIT",
"version": "1.0.6",
"version": "1.0.7",
"main": "lib/index.js",

@@ -16,0 +16,0 @@ "scripts": {

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

<!-- Please do not edit this file. Edit the `blah` field in the `package.json` instead. If in doubt, open an issue. -->

@@ -70,2 +71,4 @@ # assured

## :question: Get Help

@@ -77,3 +80,3 @@

2. For bug reports and feature requests, open issues. :bug:
3. For direct and quick help from me, you can [use Codementor](https://www.codementor.io/johnnyb). :rocket:
3. For direct and quick help, you can [use Codementor](https://www.codementor.io/johnnyb). :rocket:

@@ -88,2 +91,3 @@

#### Params
- **Function** `fn`: The callback function to proxy.

@@ -90,0 +94,0 @@ - **Promise** `p`: A custom promise constructor (default: the built-in `Promise`).

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