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

angular-focus-caret

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-focus-caret - npm Package Compare versions

Comparing version 1.0.1 to 2.0.0

5

focusCaret.js

@@ -11,3 +11,3 @@ /* globals angular, define, module */

// export CommonJS
else if ((typeof module === 'object') && module.exports) {
else if ((typeof exports === 'object') && module.exports) {
module.exports = createModule();

@@ -39,5 +39,6 @@ }

* content. Otherwise specify an integer offset.
* @ngInject
*/
function focusCaretDirective($timeout) {
'ngInject';
return {

@@ -44,0 +45,0 @@ restrict: 'A',

2

focusCaret.min.js

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

!function(){function e(){return angular.module("focus-caret",[]).directive("focusCaret",t),"focus-caret"}function t(e){function t(t,n){function o(){e.cancel(f),f=e(c,0)}function c(){var e=t.focusCaret(),n="number"!=typeof e?NaN:0>e?Math.ceil(e):Math.floor(e),o="string"==typeof i.value?i.value.length:0,c=isNaN(n)?o:0>n?Math.max(0,o+n):Math.min(o,n);i.setSelectionRange(c,c)}function u(){e.cancel(f),n.off("focus",o)}var f,i=n[0];n.on("focus",o),t.$on("$destroy",u)}return{restrict:"A",scope:{focusCaret:"&"},link:t}}"function"==typeof define&&define.amd?define(function(){return e()}):"object"==typeof module&&module.exports?module.exports=e():e(),t.$inject=["$timeout"]}();
!function(){function e(){return angular.module("focus-caret",[]).directive("focusCaret",t),"focus-caret"}function t(e){"ngInject";function t(t,n){function o(){e.cancel(f),f=e(c,0)}function c(){var e=t.focusCaret(),n="number"!=typeof e?NaN:0>e?Math.ceil(e):Math.floor(e),o="string"==typeof r.value?r.value.length:0,c=isNaN(n)?o:0>n?Math.max(0,o+n):Math.min(o,n);r.setSelectionRange(c,c)}function u(){e.cancel(f),n.off("focus",o)}var f,r=n[0];n.on("focus",o),t.$on("$destroy",u)}return{restrict:"A",scope:{focusCaret:"&"},link:t}}t.$inject=["$timeout"],"function"==typeof define&&define.amd?define(function(){return e()}):"object"==typeof exports&&module.exports?module.exports=e():e()}();
{
"name": "angular-focus-caret",
"version": "1.0.1",
"version": "2.0.0",
"description": "Angular 1.x directive to set a caret position whenever an element receives focus",

@@ -24,2 +24,5 @@ "main": "./focusCaret.js",

"homepage": "https://github.com/bholloway/angular-focus-caret#readme",
"scripts": {
"build": "gulp"
},
"devDependencies": {

@@ -26,0 +29,0 @@ "gulp": "^3.9.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