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

type-util

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

type-util - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

2

package.json
{
"name": "type-util",
"version": "0.0.4",
"version": "0.0.5",
"description": "This module provides the functionality to perfrom the basic operations on strings, arrays, and objects.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -49,3 +49,3 @@ # type-util

###isObject(data)
returns if data is a string
returns if data is an object
```javascript

@@ -78,12 +78,12 @@ var util = require('type-util');

var util = require('type-util');
console.log(lengthOf({a:'b',c:'d',e:{f:{g:'h'}}}));
console.log(lengthOf([5,6,4,8,9,77,84,90,7]));
console.log(lengthOf('this is a string'));
console.log(util.lengthOf({a:'b',c:'d',e:{f:{g:'h'}}}));
console.log(util.lengthOf([5,6,4,8,9,77,84,90,7]));
console.log(util.lengthOf('this is a string'));
```
###find(data)
###find(data, key)
returns if a string, property, or key is found in data.
```javascript
var util = require('type-util');
console.log(find({a:'b',c:'d',e:{f:{g:'h'}}},'g'));
console.log(find({a:'b',c:'d',e:{f:{g:['i','j','h']}}},'h'));
console.log(util.find({a:'b',c:'d',e:{f:{g:'h'}}},'g'));
console.log(util.find({a:'b',c:'d',e:{f:{g:['i','j','h']}}},'h'));
```

@@ -94,3 +94,3 @@ ###maxKey(data)

var util = require('type-util');
console.log(maxKey({a:2,c:5,d:9));
console.log(util.maxKey({a:2,c:5,d:9));
```

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