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

pcutils

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pcutils - npm Package Compare versions

Comparing version 2.0.1 to 3.0.0

2

lib/utils.js

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

/* global Promise */
const Promise = require('bluebird');
const request = require('request');

@@ -4,0 +2,0 @@ const _ = require('lodash');

2

LICENSE.md
The MIT License (MIT)
Copyright (c) 2013 PetroCloud
Copyright (c) 2013-2022 PetroCloud LLC

@@ -5,0 +5,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of

{
"name": "pcutils",
"description": "PetroCloud Utils",
"version": "2.0.1",
"version": "3.0.0",
"author": "Petrocloud",

@@ -9,26 +9,21 @@ "license": "MIT",

"scripts": {
"test": "istanbul cover _mocha test/**/*.js",
"test": "nyc --reporter=lcov npm run testdev",
"lint": "eslint --format codeframe '**/*.js'",
"testdev": "mocha --bail"
},
"engines": {
"node": ">=8"
"node": ">=v12.22.9"
},
"dependencies": {
"bluebird": "3.5.1",
"lodash": "4.17.4",
"request": "2.83.0"
"lodash": "4.17.21",
"request": "2.88.2"
},
"devDependencies": {
"chai": "4.1.2",
"chai": "4.3.4",
"chai-as-promised": "7.1.1",
"eslint": "4.14.0",
"eslint-plugin-chai-friendly": "^0.4.1",
"grunt": "1.0.1",
"grunt-contrib-watch": "1.0.0",
"grunt-coveralls": "1.0.1",
"grunt-mocha-istanbul": "5.0.2",
"grunt-mocha-test": "0.13.3",
"gruntify-eslint": "4.0.0",
"istanbul": "1.1.0-alpha.1",
"mocha": "4.1.0"
"eslint": "8.6.0",
"eslint-formatter-codeframe": "7.32.1",
"eslint-plugin-chai-friendly": "0.7.2",
"mocha": "9.1.3",
"nyc": "15.1.0"
},

@@ -35,0 +30,0 @@ "directories": {

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

# PetroCloud Utils (pcutils)
# Twenty20 Solutions Utils (pcutils)

@@ -6,4 +6,3 @@ ---

[![npm version](https://badge.fury.io/js/pcutils.svg)](https://badge.fury.io/js/pcutils)
[![Build Status](https://travis-ci.org/PetroCloud/pcutils.svg?branch=master)](https://travis-ci.org/PetroCloud/pcutils)
[![Coverage Status](https://coveralls.io/repos/github/PetroCloud/pcutils/badge.svg)](https://coveralls.io/github/PetroCloud/pcutils)
[![Build Status](https://github.com/twenty20solutions/pcutils/actions/workflows/ci.yml/badge.svg)](https://github.com/twenty20solutions/pcutils/actions/workflows/ci.yml)

@@ -24,3 +23,3 @@ ---

- `options` request options. See [`request` options documentation](https://github.com/request/request#requestoptions-callback)
- returns a Bluebird promise that is resolved with the `request` response
- returns a promise that is resolved with the `request` response
object, unless `options.returnBody` is set to `true`, in that case, it resolves

@@ -48,3 +47,3 @@ the promise with the body content.

body if true, or the response object response if false.
- returns a Bluebird promise that is resolved with the `request` response
- returns a promise that is resolved with the `request` response
body, unless `returnBody` is set to `false`, in that case, it resolves

@@ -60,3 +59,3 @@ the promise with the response object.

### Function `getJSON(url, timeout)`
### Function `getJSON(url, timeout, returnBody = true)`

@@ -72,3 +71,3 @@ Get a JSON object from an endpoint as an HTTP GET

body if true, or the response object response if false.
- returns a Bluebird promise that is resolved with the `request` response
- returns a promise that is resolved with the `request` response
body, unless `returnBody` is set to `false`, in that case, it resolves

@@ -84,26 +83,8 @@ the promise with the response object.

### `promisifier(function)`
Takes a function as a parameter and returns a promise that resolves when the
function returns a value or rejects if an exception ocurrs
- `function` is the function to promisify
- returns a Bluebird promise with the result of the call to the function or an
error if one is thrown
### `objectToString(object, showHidden, depth)`
Takes an object or an array and returns the 'deep' representation of it.
- `object` is the object subject to be converted
- `showHidden` (defaults to false) makes the function show hidden attributes
- `depth` (defaults to null, that is, infinite depth) tells how deep to go in
the nesting chain, when converting the object as a string.
- returns a String that resembles the object, based on the parameters passed
## License
**[MIT](./LICENSE)**
© 2014-2016
[Petrocloud](http://petrocloud.com)
© 2014-2022
[Twenty20 Solutions](http://www.twenty20solutions.com)
This module is free and open-source under the MIT License.
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