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

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 - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

.npmignore

22

index.js

@@ -13,3 +13,3 @@ /**

return toString.call(value) === '[object ' + item + ']';
}
};
});

@@ -81,4 +81,22 @@

return result;
}
};
exports.escape = function(value) {
return String(value)
.replace(/&/g, '&')
.replace(/"/g, '"')
.replace(/'/g, ''')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;');
};
exports.unescape = function(value) {
return String(value)
.replace(/&amp;/g, '&')
.replace(/&quot;/g, '"')
.replace(/&#39;/g, "'")
.replace(/&lt;/g, '<')
.replace(/&gt;/g, '>');
};
exports.hrtime = function(time) {

@@ -85,0 +103,0 @@ if (time) {

4

package.json
{
"name": "utils-extend",
"version": "1.0.5",
"version": "1.0.6",
"description": "Extend nodejs util api, and it is light weight and simple",

@@ -23,2 +23,4 @@ "main": "index.js",

"devDependencies": {
"grunt": "^0.4.5",
"grunt-contrib-jshint": "^0.10.0",
"mocha": "^2.0.1"

@@ -25,0 +27,0 @@ },

## utils-extend
Strengthen the ability of util. utils extend node util origin module
Extend nodejs util api, and it is light weight and simple
```

@@ -57,2 +57,12 @@ var util = require('utils-extend');

### util.escape
Escapes a string for insertion into HTML, replacing &, <, >, ", `, and ' characters.
```js
var html = '<div></div>'
var result = util.escape('<div></div>')
```
### util.unescape
The opposite of escape
### util.path.isAbsolute

@@ -59,0 +69,0 @@ Return true is path isabsolute, otherwise return false.

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