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

setify

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

setify - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

8

index.js

@@ -1,7 +0,5 @@

var unsupportedTypes = ['number', 'email', 'time', 'color', 'month', 'range', 'date'];
var naturalSelection = require('natural-selection');
module.exports = function(element, value){
var canSet = element.setSelectionRange &&
!~unsupportedTypes.indexOf(element.type) &&
element === document.activeElement;
var canSet = naturalSelection(element) && element === document.activeElement;

@@ -17,2 +15,2 @@ if (canSet) {

}
};
};
{
"name": "setify",
"version": "1.0.2",
"version": "1.0.3",
"description": "Set an input value without losing cursor position",

@@ -13,3 +13,3 @@ "main": "index.js",

"type": "git",
"url": "https://github.com/matthewLarner/setify.git"
"url": "https://github.com/MatthewLarner/setify.git"
},

@@ -23,5 +23,8 @@ "keywords": [

"bugs": {
"url": "https://github.com/matthewLarner/setify/issues"
"url": "https://github.com/MatthewLarner/setify/issues"
},
"homepage": "https://github.com/matthewLarner/setify"
"homepage": "https://github.com/MatthewLarner/setify",
"dependencies": {
"natural-selection": "^1.0.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