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

utility

Package Overview
Dependencies
Maintainers
2
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

utility - npm Package Compare versions

Comparing version 0.1.11 to 0.1.12

5

History.md
0.1.12 / 2014-04-03
==================
* support var map = util.map({a: 1})
0.1.11 / 2014-03-15

@@ -3,0 +8,0 @@ ==================

@@ -472,1 +472,18 @@ /*!

};
/**
* generate a real map object, no constructor, no __proto__
* @param {Object} [obj], init object, optional
* @return {Object}
*/
exports.map = function (obj) {
var map = Object.create(null);
if (!obj) {
return map;
}
for (var key in obj) {
map[key] = obj[key];
}
return map;
};

2

LICENSE.txt
This software is licensed under the MIT License.
Copyright (C) 2012 - 2013 fengmk2 <fengmk2@gmail.com>
Copyright (C) 2012 - 2014 fengmk2 <fengmk2@gmail.com> and other contributors

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

{
"name": "utility",
"version": "0.1.11",
"version": "0.1.12",
"description": "A collection of useful utilities.",

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

@@ -117,2 +117,17 @@ utility [![Build Status](https://secure.travis-ci.org/fengmk2/utility.png)](http://travis-ci.org/fengmk2/utility) [![Coverage Status](https://coveralls.io/repos/fengmk2/utility/badge.png)](https://coveralls.io/r/fengmk2/utility)

### map
Create a `real` map in javascript.
```js
var map = utils.map({a: 1});
// should.not.exist(map.constractor);
// should.not.exist(map.__proto__);
// should.not.exist(map.toString);
// should not exist any property
console.log(map); // {a: 1}
```
## benchmark

@@ -179,3 +194,3 @@

Copyright (c) 2012 - 2013 fengmk2 &lt;fengmk2@gmail.com&gt;
Copyright (c) 2012 - 2014 fengmk2 &lt;fengmk2@gmail.com&gt; and other contributors

@@ -182,0 +197,0 @@ Permission is hereby granted, free of charge, to any person obtaining

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