angular-focus-caret
Advanced tools
Comparing version 1.0.1 to 2.0.0
@@ -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', |
@@ -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", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6811