Socket
Socket
Sign inDemoInstall

utils-extend

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

utils-extend

Extend nodejs util api, and it is light weight and simple


Version published
Weekly downloads
69K
decreased by-8.87%
Maintainers
1
Weekly downloads
 
Created
Source

utils-extend

Strengthen the ability of util. utils extend node util origin module

var util = require('utils-extend');

install

npm install utils-extend --save

API

util.extend

Deep clone soure object to target

var target = {};
var source = {
  k: 'v',
  k2: []
};
var source2 = {
  k3: { }  
};

util.extend(target, source, source2);

util.isObject

Check target is object, array and function return false.

util.isArray

Chck target is array

uitl.isArray = Array.isArray

util.isNumber

util.isDate

util.isRegExp

util.isFunction

util.isString

util.isUndefined

util.noop

Empty function

util.unique

Make array unique.

var arr = [4, 5, 5, 6];
var result = uitl.unique(arr);

util.path.isAbsolute

Return true is path isabsolute, otherwise return false.

util.path.isAbsolute('C:\\file\\path');          // windows
util.path.isAbsolute('/file/path');              // unix

util.path.unixifyPath

Normalize \ paths to / paths.

Keywords

FAQs

Package last updated on 03 Dec 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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