Socket
Socket
Sign inDemoInstall

umap

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

umap - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

9

cjs/index.js
'use strict';
module.exports = _ => ({
get: _.get.bind(_),
// About: get: _.get.bind(_)
// It looks like WebKit/Safari didn't optimize bind at all,
// so that using bind slows it down by 60%.
// Firefox and Chrome are just fine in both cases,
// so let's use the approach that works fast everywhere 👍
get(key) {
return _.get(key);
},
set(key, value) {

@@ -5,0 +12,0 @@ _.set(key, value);

2

es.js

@@ -1,1 +0,1 @@

var umap=function(t){"use strict";return t.default=t=>({get:t.get.bind(t),set:(e,u)=>(t.set(e,u),u)}),t}({}).default;
var umap=function(t){"use strict";return t.default=t=>({get:e=>t.get(e),set:(e,u)=>(t.set(e,u),u)}),t}({}).default;
export default _ => ({
get: _.get.bind(_),
// About: get: _.get.bind(_)
// It looks like WebKit/Safari didn't optimize bind at all,
// so that using bind slows it down by 60%.
// Firefox and Chrome are just fine in both cases,
// so let's use the approach that works fast everywhere 👍
get(key) {
return _.get(key);
},
set(key, value) {

@@ -4,0 +11,0 @@ _.set(key, value);

@@ -6,3 +6,10 @@ var umap = (function (exports) {

return {
get: _.get.bind(_),
// About: get: _.get.bind(_)
// It looks like WebKit/Safari didn't optimize bind at all,
// so that using bind slows it down by 60%.
// Firefox and Chrome are just fine in both cases,
// so let's use the approach that works fast everywhere 👍
get: function get(key) {
return _.get(key);
},
set: function set(key, value) {

@@ -9,0 +16,0 @@ _.set(key, value);

@@ -1,1 +0,1 @@

var umap=function(t){"use strict";return t.default=function(e){return{get:e.get.bind(e),set:function(t,n){return e.set(t,n),n}}},t}({}).default;
var umap=function(t){"use strict";return t.default=function(u){return{get:function(t){return u.get(t)},set:function(t,n){return u.set(t,n),n}}},t}({}).default;
{
"name": "umap",
"version": "1.0.0",
"version": "1.0.1",
"description": "The smallest, yet handy, Map and WeakMap utility ever",

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

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