Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

# minor spelling corrections #782

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions dist/jquery.mask.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@
el
.on('keydown.mask', function(e) {
el.data('mask-keycode', e.keyCode || e.which);
el.data('mask-previus-value', el.val());
el.data('mask-previus-caret-pos', p.getCaret());
el.data('mask-previous-value', el.val());
el.data('mask-previous-caret-pos', p.getCaret());
p.maskDigitPosMapOld = p.maskDigitPosMap;
})
.on($.jMaskGlobals.useInput ? 'input.mask' : 'keyup.mask', p.behaviour)
.on($.jMaskGlobals.useInput ? 'input.mask' : 'keyup.mask', p.behavior)
.on('paste.mask drop.mask', function() {
setTimeout(function() {
el.keydown().keyup();
Expand All @@ -118,7 +118,7 @@
el.data('changed', false);
})
// it's very important that this callback remains in this position
// otherwhise oldValue it's going to work buggy
// otherwise oldValue it's going to work buggy
.on('blur.mask', function() {
oldValue = p.val();
})
Expand Down Expand Up @@ -191,7 +191,7 @@
var newVal = p.getMasked(),
caretPosNew = p.getCaret();
if (oldVal !== newVal) {
var caretPosOld = el.data('mask-previus-caret-pos') || 0,
var caretPosOld = el.data('mask-previous-caret-pos') || 0,
newValL = newVal.length,
oldValL = oldVal.length,
maskDigitsBeforeCaret = 0,
Expand Down Expand Up @@ -246,7 +246,7 @@
}
return caretPosNew;
},
behaviour: function(e) {
behavior: function(e) {
e = e || window.event;
p.invalid = [];

Expand All @@ -255,7 +255,7 @@
if ($.inArray(keyCode, jMask.byPassKeys) === -1) {
var newVal = p.getMasked(),
caretPos = p.getCaret(),
oldVal = el.data('mask-previus-value') || '';
oldVal = el.data('mask-previous-value') || '';

// this is a compensation to devices/browsers that don't compensate
// caret positioning the right way
Expand Down Expand Up @@ -358,10 +358,10 @@
}

var newVal = buf.join('');
p.mapMaskdigitPositions(newVal, maskDigitPosArr, valLen);
p.mapMaskDigitPositions(newVal, maskDigitPosArr, valLen);
return newVal;
},
mapMaskdigitPositions: function(newVal, maskDigitPosArr, valLen) {
mapMaskDigitPositions: function(newVal, maskDigitPosArr, valLen) {
var maskDiff = options.reverse ? newVal.length - valLen : 0;
p.maskDigitPosMap = {};
for (var i = 0; i < maskDigitPosArr.length; i++) {
Expand Down
10 changes: 5 additions & 5 deletions dist/jquery.mask.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions src/jquery.mask.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@
el
.on('keydown.mask', function(e) {
el.data('mask-keycode', e.keyCode || e.which);
el.data('mask-previus-value', el.val());
el.data('mask-previus-caret-pos', p.getCaret());
el.data('mask-previous-value', el.val());
el.data('mask-previous-caret-pos', p.getCaret());
p.maskDigitPosMapOld = p.maskDigitPosMap;
})
.on($.jMaskGlobals.useInput ? 'input.mask' : 'keyup.mask', p.behaviour)
.on($.jMaskGlobals.useInput ? 'input.mask' : 'keyup.mask', p.behavior)
.on('paste.mask drop.mask', function() {
setTimeout(function() {
el.keydown().keyup();
Expand All @@ -118,7 +118,7 @@
el.data('changed', false);
})
// it's very important that this callback remains in this position
// otherwhise oldValue it's going to work buggy
// otherwise oldValue it's going to work buggy
.on('blur.mask', function() {
oldValue = p.val();
})
Expand Down Expand Up @@ -191,7 +191,7 @@
var newVal = p.getMasked(),
caretPosNew = p.getCaret();
if (oldVal !== newVal) {
var caretPosOld = el.data('mask-previus-caret-pos') || 0,
var caretPosOld = el.data('mask-previous-caret-pos') || 0,
newValL = newVal.length,
oldValL = oldVal.length,
maskDigitsBeforeCaret = 0,
Expand Down Expand Up @@ -246,7 +246,7 @@
}
return caretPosNew;
},
behaviour: function(e) {
behavior: function(e) {
e = e || window.event;
p.invalid = [];

Expand All @@ -255,7 +255,7 @@
if ($.inArray(keyCode, jMask.byPassKeys) === -1) {
var newVal = p.getMasked(),
caretPos = p.getCaret(),
oldVal = el.data('mask-previus-value') || '';
oldVal = el.data('mask-previous-value') || '';

// this is a compensation to devices/browsers that don't compensate
// caret positioning the right way
Expand Down Expand Up @@ -358,10 +358,10 @@
}

var newVal = buf.join('');
p.mapMaskdigitPositions(newVal, maskDigitPosArr, valLen);
p.mapMaskDigitPositions(newVal, maskDigitPosArr, valLen);
return newVal;
},
mapMaskdigitPositions: function(newVal, maskDigitPosArr, valLen) {
mapMaskDigitPositions: function(newVal, maskDigitPosArr, valLen) {
var maskDiff = options.reverse ? newVal.length - valLen : 0;
p.maskDigitPosMap = {};
for (var i = 0; i < maskDigitPosArr.length; i++) {
Expand Down
10 changes: 5 additions & 5 deletions test/sinon-1.10.3.js
Original file line number Diff line number Diff line change
Expand Up @@ -1685,7 +1685,7 @@ var sinon = (function (formatio) {

var original = this;
var fake = this._create();
fake.matchingAguments = args;
fake.matchingArguments = args;
fake.parent = this;
push.call(this.fakes, fake);

Expand All @@ -1709,7 +1709,7 @@ var sinon = (function (formatio) {
},

matches: function (args, strict) {
var margs = this.matchingAguments;
var margs = this.matchingArguments;

if (margs.length <= args.length &&
sinon.deepEqual(margs, args.slice(0, margs.length))) {
Expand Down Expand Up @@ -2255,10 +2255,10 @@ var sinon = (function (formatio) {
}

function getDefaultBehavior(stub) {
return stub.defaultBehavior || getParentBehaviour(stub) || sinon.behavior.create(stub);
return stub.defaultBehavior || getParentBehavior(stub) || sinon.behavior.create(stub);
}

function getParentBehaviour(stub) {
function getParentBehavior(stub) {
return (stub.parent && getCurrentBehavior(stub.parent));
}

Expand Down Expand Up @@ -4050,7 +4050,7 @@ if (typeof module !== 'undefined' && module.exports) {
/**
* The Sinon "server" mimics a web server that receives requests from
* sinon.FakeXMLHttpRequest and provides an API to respond to those requests,
* both synchronously and asynchronously. To respond synchronuously, canned
* both synchronously and asynchronously. To respond synchronously, canned
* answers have to be provided upfront.
*
* @author Christian Johansen ([email protected])
Expand Down
10 changes: 5 additions & 5 deletions test/zepto/zepto.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ var Zepto = (function() {
// `$.zepto.fragment` takes a html string and an optional tag name
// to generate DOM nodes nodes from the given html string.
// The generated DOM nodes are returned as an array.
// This function can be overriden in plugins for example to make
// This function can be overridden in plugins for example to make
// it compatible with browsers that don't support the DOM fully.
zepto.fragment = function(html, name, properties) {
var dom, nodes, container
Expand Down Expand Up @@ -151,7 +151,7 @@ var Zepto = (function() {
// `$.zepto.Z` swaps out the prototype of the given `dom` array
// of nodes with `$.fn` and thus supplying all the Zepto functions
// to the array. Note that `__proto__` is not supported on Internet
// Explorer. This method can be overriden in plugins.
// Explorer. This method can be overridden in plugins.
zepto.Z = function(dom, selector) {
dom = dom || []
dom.__proto__ = $.fn
Expand All @@ -160,15 +160,15 @@ var Zepto = (function() {
}

// `$.zepto.isZ` should return `true` if the given object is a Zepto
// collection. This method can be overriden in plugins.
// collection. This method can be overridden in plugins.
zepto.isZ = function(object) {
return object instanceof zepto.Z
}

// `$.zepto.init` is Zepto's counterpart to jQuery's `$.fn.init` and
// takes a CSS selector and an optional context (and handles various
// special cases).
// This method can be overriden in plugins.
// This method can be overridden in plugins.
zepto.init = function(selector, context) {
var dom
// If nothing given, return an empty Zepto collection
Expand Down Expand Up @@ -244,7 +244,7 @@ var Zepto = (function() {

// `$.zepto.qsa` is Zepto's CSS selector implementation which
// uses `document.querySelectorAll` and optimizes for some special cases, like `#id`.
// This method can be overriden in plugins.
// This method can be overridden in plugins.
zepto.qsa = function(element, selector){
var found,
maybeID = selector[0] == '#',
Expand Down