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

@teleology/fp

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@teleology/fp - npm Package Compare versions

Comparing version 1.0.2 to 1.0.4

lib/clean.js

12

lib/index.js

@@ -113,2 +113,14 @@ "use strict";

});
});
var _clean = require("./clean");
Object.keys(_clean).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _clean[key];
}
});
});

4

lib/toss.js

@@ -10,5 +10,3 @@ "use strict";

const e = new Error(msg || 'An unknown error occured');
Object.assign(e, {
properties
});
Object.assign(e, properties);
throw e;

@@ -15,0 +13,0 @@ };

{
"name": "@teleology/fp",
"version": "1.0.2",
"version": "1.0.4",
"description": "A small collection of functional programming utils",

@@ -5,0 +5,0 @@ "repository": "git@github.com:icarus-sullivan/teleology-fp.git",

@@ -76,7 +76,8 @@ # @teleology/fp

toss('An error occured')({ code: 103, reason: 'Entity already exists' });
toss('An error occured')({ code: 403, reason: 'Entity already exists' });
// Error: An error occured
// ...
// at internal/main/run_main_module.js:17:47 {
// properties: { code: 103, reason: 'Entity already exists' }
// code: 403,
// reason: 'Entity already exists'
// }

@@ -161,5 +162,29 @@ ```

## clean
Recursively removes empty values. An empty value is: `null, empty string, undefined, an empty array or object`.
Example:
```javascript
const { clean } = require('@teleology/fp');
clean({
a: null,
b: '',
c: undefined,
d: {},
e: [],
f: 'hello',
nested: { will: { be: { removed: {} } } },
}); // { f: 'hello' }
```
----
## Changelog
**1.0.4**
- Adding a clean function to remove empty values
**1.0.1**

@@ -166,0 +191,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