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

input-autogrow

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

input-autogrow - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

index.html

7

bower.json
{
"name": "input-autogrow",
"version": "1.0.0",
"description": "jQuery autogrow plugin for inputs",
"version": "1.0.1",
"description": "Autogrow plugin for inputs",
"main": "dist/input-autogrow.min.js",

@@ -18,2 +18,3 @@ "directories": {

"jquery",
"zepto",
"javascript",

@@ -23,3 +24,3 @@ "js"

"author": "Weston Ganger",
"license": "GNU GPL",
"license": "MIT",
"bugs": {

@@ -26,0 +27,0 @@ "url": "https://github.com/westonganger/input-autogrow/issues"

/*
* input-autogrow - jQuery autogrow plugin for inputs
* @version v1.0.0
* input-autogrow - Autogrow plugin for inputs
* @version v1.0.1
* @link http://github.com/westonganger/input-autogrow
* @license GNU GPL
* @license MIT
*/
!function(t){var a="oninput"in document.createElement("input")?"input":"keydown";t.fn.inputAutogrow=function(i){if(i&&("destroy"===i||t(this).data("autogrow-span"))&&(this.each(function(){var i=t(this);i.off(a+".autogrow autogrow change");var n=i.data("autogrow-span");n.remove(),i.data("autogrow-span","")}),"destroy"===i))return input.data("original-width",""),this;if(t(this).data("original-width"))var n=t(this).data("original-width");else{var n=t(this).width();t(this).data("original-width",n)}var o=t.extend({maxWidth:t(this).parent().width(),minWidth:n,trailingSpace:0},i);return this.each(function(){var n=t(this),e=" ",r=i&&"trailingSpace"in i?o.trailingSpace:parseInt(n.css("fontSize")),s=t("<span/>").css({position:"absolute",top:-9999,left:-9999,width:"auto",fontSize:n.css("fontSize"),fontFamily:n.css("fontFamily"),fontWeight:n.css("fontWeight"),letterSpacing:n.css("letterSpacing"),textTransform:n.css("textTransform"),whiteSpace:"nowrap",ariaHidden:!0}).appendTo("body"),h=function(t){if(e!==(e=n.val())||"autogrow"===t.type){e||(e=n.attr("placeholder")||""),s.html(e.replace(/&/g,"&amp;").replace(/\s/g,"&nbsp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"));var a=s.width()+r,i="function"==typeof o.maxWidth?o.maxWidth():o.maxWidth;a>i?a=i:a<o.minWidth&&(a=o.minWidth),a!=n.width()&&n.width(a)}};n.data("autogrow-span",s),n.off(a+".autogrow autogrow change").on(a+".autogrow autogrow change",h),h()}),this}}(jQuery);
!function(t){var a="oninput"in document.createElement("input")?"input":"keydown";t.fn.inputAutogrow=function(i){if(i&&("destroy"===i||t(this).data("autogrow-span"))&&(this.each(function(){var i=t(this);i.off(a+".autogrow autogrow change");var n=i.data("autogrow-span");n.remove(),i.data("autogrow-span","")}),"destroy"===i))return input.data("original-width",""),this;if(t(this).data("original-width"))var n=t(this).data("original-width");else{var n=t(this).width();t(this).data("original-width",n)}var o=t.extend({maxWidth:t(this).parent().width(),minWidth:n,trailingSpace:0},i);return this.each(function(){var n=t(this),e=" ",r=i&&"trailingSpace"in i?o.trailingSpace:parseInt(n.css("fontSize")),s=t("<span/>").css({position:"absolute",top:-9999,left:-9999,width:"auto",fontSize:n.css("fontSize"),fontFamily:n.css("fontFamily"),fontWeight:n.css("fontWeight"),letterSpacing:n.css("letterSpacing"),textTransform:n.css("textTransform"),whiteSpace:"nowrap",ariaHidden:!0}).appendTo("body"),h=function(t){if(e!==(e=n.val())||"autogrow"===t.type){e||(e=n.attr("placeholder")||""),s.html(e.replace(/&/g,"&amp;").replace(/\s/g,"&nbsp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"));var a=s.width()+r,i="function"==typeof o.maxWidth?o.maxWidth():o.maxWidth;a>i?a=i:a<o.minWidth&&(a=o.minWidth),a!=n.width()&&n.width(a)}};n.data("autogrow-span",s),n.off(a+".autogrow autogrow change").on(a+".autogrow autogrow change",h),h()}),this}}(window.jQuery||window.Zepto||window.$);
{
"name": "input-autogrow",
"version": "1.0.0",
"description": "jQuery autogrow plugin for inputs",
"version": "1.0.1",
"description": "Autogrow plugin for inputs",
"main": "dist/input-autogrow.min.js",

@@ -18,2 +18,3 @@ "directories": {

"jquery",
"zepto",
"javascript",

@@ -23,3 +24,3 @@ "js"

"author": "Weston Ganger",
"license": "GNU GPL",
"license": "MIT",
"bugs": {

@@ -30,3 +31,2 @@ "url": "https://github.com/westonganger/input-autogrow/issues"

"dependencies": {
"jquery": ">=1.0"
},

@@ -33,0 +33,0 @@ "devDependencies": {

# input-autogrow
<a href='https://ko-fi.com/A5071NK' target='_blank'><img height='32' style='border:0px;height:32px;' src='https://az743702.vo.msecnd.net/cdn/kofi1.png?v=a' border='0' alt='Buy Me a Coffee' /></a>
`input-autogrow` is a jQuery plugin for autogrowing inputs. This plugin is different from others because most usually target `textarea` tags, this library is instead targeted at `input` tags.
`input-autogrow` is a plugin for autogrowing inputs. This plugin is different from others because most usually target `textarea` tags, this library is instead targeted at `input` tags.
Requires a DOM library such as jQuery, Zepto, or any that support $.fn extending.
# Install

@@ -10,7 +12,7 @@

```
yarn add chosen-material-theme
yarn add input-autogrow
npm install chosen-material-theme
npm install input-autogrow
bower install chosen-material-theme
bower install input-autogrow
```

@@ -17,0 +19,0 @@

/*
* input-autogrow - jQuery autogrow plugin for inputs
* @version v1.0.0
* input-autogrow - Autogrow plugin for inputs
* @version v1.0.1
* @link http://github.com/westonganger/input-autogrow
* @license GNU GPL
* @license MIT
*/

@@ -85,4 +85,5 @@

});
return this;
}
}(jQuery));
};
}(window.jQuery || window.Zepto || window.$));

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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