code
stringlengths
24
2.07M
docstring
stringlengths
25
85.3k
func_name
stringlengths
1
92
language
stringclasses
1 value
repo
stringlengths
5
64
path
stringlengths
4
172
url
stringlengths
44
218
license
stringclasses
7 values
function generateTransformOrigin(x, y) { return x + 'px ' + y + 'px'; }
Transform to string @param x @param y @returns {string}
generateTransformOrigin
javascript
be-fe/iSlider
src/js/plugins/zoompic.js
https://github.com/be-fe/iSlider/blob/master/src/js/plugins/zoompic.js
MIT
function getTouches(touches) { return Array.prototype.slice.call(touches).map(function (touch) { return { left: touch.pageX, top: touch.pageY }; }); }
Get touch pointer @param touches @returns {Array}
getTouches
javascript
be-fe/iSlider
src/js/plugins/zoompic.js
https://github.com/be-fe/iSlider/blob/master/src/js/plugins/zoompic.js
MIT
function calculateScale(start, end) { var startDistance = getDistance(start[0], start[1]); var endDistance = getDistance(end[0], end[1]); return endDistance / startDistance; }
Get scale @param start @param end @returns {number}
calculateScale
javascript
be-fe/iSlider
src/js/plugins/zoompic.js
https://github.com/be-fe/iSlider/blob/master/src/js/plugins/zoompic.js
MIT
function getComputedTranslate(obj) { var result = { translateX: 0, translateY: 0, translateZ: 0, scaleX: 1, scaleY: 1, offsetX: 0, offsetY: 0 }; var offsetX = 0, offsetY = 0; if (!global.getComputedStyle ...
Get computed translate @param obj @returns {{translateX: number, translateY: number, translateZ: number, scaleX: number, scaleY: number, offsetX: number, offsetY: number}}
getComputedTranslate
javascript
be-fe/iSlider
src/js/plugins/zoompic.js
https://github.com/be-fe/iSlider/blob/master/src/js/plugins/zoompic.js
MIT
function getCenter(a, b) { return { x: (a.x + b.x) / 2, y: (a.y + b.y) / 2 }; }
Get center point @param a @param b @returns {{x: number, y: number}}
getCenter
javascript
be-fe/iSlider
src/js/plugins/zoompic.js
https://github.com/be-fe/iSlider/blob/master/src/js/plugins/zoompic.js
MIT
function startHandler(evt) { startHandlerOriginal.call(this, evt); // must be a picture, only one picture!! var node = this.els[1].querySelector('img:first-child'); var device = this.deviceEvents; if (device.hasTouch && node !== null) { IN_SCALE_MODE = true; ...
Start event handle @param {object} evt
startHandler
javascript
be-fe/iSlider
src/js/plugins/zoompic.js
https://github.com/be-fe/iSlider/blob/master/src/js/plugins/zoompic.js
MIT
function moveHandler(evt) { if (IN_SCALE_MODE) { var result = 0; var node = zoomNode; var device = this.deviceEvents; if (device.hasTouch) { if (evt.targetTouches.length === 2) { node.style.webkitTransitionDuration = '0'; ...
Move event handle @param {object} evt @returns {number}
moveHandler
javascript
be-fe/iSlider
src/js/plugins/zoompic.js
https://github.com/be-fe/iSlider/blob/master/src/js/plugins/zoompic.js
MIT
function handleDoubleTap(evt) { var zoomFactor = zoomFactor || 2; var node = zoomNode; var pos = getPosition(node); currentScale = currentScale == 1 ? zoomFactor : 1; node.style.webkitTransform = generateTranslate(0, 0, 0, currentScale); if (currentScale != 1) node.style....
Double tao handle @param {object} evt
handleDoubleTap
javascript
be-fe/iSlider
src/js/plugins/zoompic.js
https://github.com/be-fe/iSlider/blob/master/src/js/plugins/zoompic.js
MIT
function getPosition(element) { var pos = {'left': 0, 'top': 0}; do { pos.top += element.offsetTop || 0; pos.left += element.offsetLeft || 0; element = element.offsetParent; } while (element); return pos; }
Get position @param element @returns {{left: number, top: number}}
getPosition
javascript
be-fe/iSlider
src/js/plugins/zoompic.js
https://github.com/be-fe/iSlider/blob/master/src/js/plugins/zoompic.js
MIT
function valueInViewScope(node, value, tag) { var min, max; var pos = getPosition(node); viewScope = { start: {left: pos.left, top: pos.top}, end: {left: pos.left + node.clientWidth, top: pos.top + node.clientHeight} }; var str = tag == 1 ? 'left' : 'top';...
Check target is in range @param node @param value @param tag @returns {boolean}
valueInViewScope
javascript
be-fe/iSlider
src/js/plugins/zoompic.js
https://github.com/be-fe/iSlider/blob/master/src/js/plugins/zoompic.js
MIT
function error(type) { throw new RangeError(errors[type]); }
A generic error utility function. @private @param {String} type The error type. @returns {Error} Throws a `RangeError` with the applicable error message.
error
javascript
amol-/dukpy
dukpy/jscore/punycode.js
https://github.com/amol-/dukpy/blob/master/dukpy/jscore/punycode.js
MIT
function map(array, fn) { var result = []; var length = array.length; while (length--) { result[length] = fn(array[length]); } return result; }
A generic `Array#map` utility function. @private @param {Array} array The array to iterate over. @param {Function} callback The function that gets called for every array item. @returns {Array} A new array of values returned by the callback function.
map
javascript
amol-/dukpy
dukpy/jscore/punycode.js
https://github.com/amol-/dukpy/blob/master/dukpy/jscore/punycode.js
MIT
function mapDomain(string, fn) { var parts = string.split('@'); var result = ''; if (parts.length > 1) { // In email addresses, only the domain name should be punycoded. Leave // the local part (i.e. everything up to `@`) intact. result = parts[0] + '@'; string = parts[1]; } // Avoid `split(regex)` for IE8...
A simple `Array#map`-like wrapper to work with domain name strings or email addresses. @private @param {String} domain The domain name or email address. @param {Function} callback The function that gets called for every character. @returns {Array} A new string of characters returned by the callback function.
mapDomain
javascript
amol-/dukpy
dukpy/jscore/punycode.js
https://github.com/amol-/dukpy/blob/master/dukpy/jscore/punycode.js
MIT
function ucs2decode(string) { var output = []; var counter = 0; var length = string.length; while (counter < length) { var value = string.charCodeAt(counter++); if (value >= 0xD800 && value <= 0xDBFF && counter < length) { // It's a high surrogate, and there is a next character. var extra = string.charCod...
Creates an array containing the numeric code points of each Unicode character in the string. While JavaScript uses UCS-2 internally, this function will convert a pair of surrogate halves (each of which UCS-2 exposes as separate characters) into a single code point, matching UTF-16. @see `punycode.ucs2.encode` @see <htt...
ucs2decode
javascript
amol-/dukpy
dukpy/jscore/punycode.js
https://github.com/amol-/dukpy/blob/master/dukpy/jscore/punycode.js
MIT
ucs2encode = function ucs2encode(array) { return String.fromCodePoint.apply(String, _toConsumableArray(array)); }
Creates a string based on an array of numeric code points. @see `punycode.ucs2.decode` @memberOf punycode.ucs2 @name encode @param {Array} codePoints The array of numeric code points. @returns {String} The new Unicode string (UCS-2).
ucs2encode
javascript
amol-/dukpy
dukpy/jscore/punycode.js
https://github.com/amol-/dukpy/blob/master/dukpy/jscore/punycode.js
MIT
basicToDigit = function basicToDigit(codePoint) { if (codePoint - 0x30 < 0x0A) { return codePoint - 0x16; } if (codePoint - 0x41 < 0x1A) { return codePoint - 0x41; } if (codePoint - 0x61 < 0x1A) { return codePoint - 0x61; } return base; }
Converts a basic code point into a digit/integer. @see `digitToBasic()` @private @param {Number} codePoint The basic numeric code point value. @returns {Number} The numeric value of a basic code point (for use in representing integers) in the range `0` to `base - 1`, or `base` if the code point does not represent a val...
basicToDigit
javascript
amol-/dukpy
dukpy/jscore/punycode.js
https://github.com/amol-/dukpy/blob/master/dukpy/jscore/punycode.js
MIT
digitToBasic = function digitToBasic(digit, flag) { // 0..25 map to ASCII a..z or A..Z // 26..35 map to ASCII 0..9 return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); }
Converts a digit/integer into a basic code point. @see `basicToDigit()` @private @param {Number} digit The numeric value of a basic code point. @returns {Number} The basic code point whose value (when used for representing integers) is `digit`, which needs to be in the range `0` to `base - 1`. If `flag` is non-zero, th...
digitToBasic
javascript
amol-/dukpy
dukpy/jscore/punycode.js
https://github.com/amol-/dukpy/blob/master/dukpy/jscore/punycode.js
MIT
adapt = function adapt(delta, numPoints, firstTime) { var k = 0; delta = firstTime ? floor(delta / damp) : delta >> 1; delta += floor(delta / numPoints); for (; /* no initialization */delta > baseMinusTMin * tMax >> 1; k += base) { delta = floor(delta / baseMinusTMin); } return floor(k + (baseMinusTMin + 1) * d...
Bias adaptation function as per section 3.4 of RFC 3492. https://tools.ietf.org/html/rfc3492#section-3.4 @private
adapt
javascript
amol-/dukpy
dukpy/jscore/punycode.js
https://github.com/amol-/dukpy/blob/master/dukpy/jscore/punycode.js
MIT
decode = function decode(input) { // Don't use UCS-2. var output = []; var inputLength = input.length; var i = 0; var n = initialN; var bias = initialBias; // Handle the basic code points: let `basic` be the number of input code // points before the last delimiter, or `0` if there is none, then copy // the fi...
Converts a Punycode string of ASCII-only symbols to a string of Unicode symbols. @memberOf punycode @param {String} input The Punycode string of ASCII-only symbols. @returns {String} The resulting string of Unicode symbols.
decode
javascript
amol-/dukpy
dukpy/jscore/punycode.js
https://github.com/amol-/dukpy/blob/master/dukpy/jscore/punycode.js
MIT
encode = function encode(input) { var output = []; // Convert the input in UCS-2 to an array of Unicode code points. input = ucs2decode(input); // Cache the length. var inputLength = input.length; // Initialize the state. var n = initialN; var delta = 0; var bias = initialBias; // Handle the basic code po...
Converts a string of Unicode symbols (e.g. a domain name label) to a Punycode string of ASCII-only symbols. @memberOf punycode @param {String} input The string of Unicode symbols. @returns {String} The resulting Punycode string of ASCII-only symbols.
encode
javascript
amol-/dukpy
dukpy/jscore/punycode.js
https://github.com/amol-/dukpy/blob/master/dukpy/jscore/punycode.js
MIT
toUnicode = function toUnicode(input) { return mapDomain(input, function (string) { return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string; }); }
Converts a Punycode string representing a domain name or an email address to Unicode. Only the Punycoded parts of the input will be converted, i.e. it doesn't matter if you call it on a string that has already been converted to Unicode. @memberOf punycode @param {String} input The Punycoded domain name or email address...
toUnicode
javascript
amol-/dukpy
dukpy/jscore/punycode.js
https://github.com/amol-/dukpy/blob/master/dukpy/jscore/punycode.js
MIT
toASCII = function toASCII(input) { return mapDomain(input, function (string) { return regexNonASCII.test(string) ? 'xn--' + encode(string) : string; }); }
Converts a Unicode string representing a domain name or an email address to Punycode. Only the non-ASCII parts of the domain name will be converted, i.e. it doesn't matter if you call it with a domain that's already in ASCII. @memberOf punycode @param {String} input The domain name or email address to convert, as a Uni...
toASCII
javascript
amol-/dukpy
dukpy/jscore/punycode.js
https://github.com/amol-/dukpy/blob/master/dukpy/jscore/punycode.js
MIT
function createFileMap(keyMapper) { var files = {}; return { get: get, set: set, contains: contains, remove: remove, forEachValue: forEachValueInMap, clear: clear }; function forEachValueInMap(f) { for (v...
Ternary values are defined such that x & y is False if either x or y is False. x & y is Maybe if either x or y is Maybe, but neither x or y is False. x & y is True if both x and y are True. x | y is False if both x and y are False. x | y is Maybe if either x or y is Maybe, but neither x or y is True. x | y is True if e...
createFileMap
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function forEachValueInMap(f) { for (var key in files) { f(key, files[key]); } }
Ternary values are defined such that x & y is False if either x or y is False. x & y is Maybe if either x or y is Maybe, but neither x or y is False. x & y is True if both x and y are True. x | y is False if both x and y are False. x | y is Maybe if either x or y is Maybe, but neither x or y is True. x | y is True if e...
forEachValueInMap
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function get(path) { return files[toKey(path)]; }
Ternary values are defined such that x & y is False if either x or y is False. x & y is Maybe if either x or y is Maybe, but neither x or y is False. x & y is True if both x and y are True. x | y is False if both x and y are False. x | y is Maybe if either x or y is Maybe, but neither x or y is True. x | y is True if e...
get
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function set(path, value) { files[toKey(path)] = value; }
Ternary values are defined such that x & y is False if either x or y is False. x & y is Maybe if either x or y is Maybe, but neither x or y is False. x & y is True if both x and y are True. x | y is False if both x and y are False. x | y is Maybe if either x or y is Maybe, but neither x or y is True. x | y is True if e...
set
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function contains(path) { return hasProperty(files, toKey(path)); }
Ternary values are defined such that x & y is False if either x or y is False. x & y is Maybe if either x or y is Maybe, but neither x or y is False. x & y is True if both x and y are True. x | y is False if both x and y are False. x | y is Maybe if either x or y is Maybe, but neither x or y is True. x | y is True if e...
contains
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function remove(path) { var key = toKey(path); delete files[key]; }
Ternary values are defined such that x & y is False if either x or y is False. x & y is Maybe if either x or y is Maybe, but neither x or y is False. x & y is True if both x and y are True. x | y is False if both x and y are False. x | y is Maybe if either x or y is Maybe, but neither x or y is True. x | y is True if e...
remove
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function clear() { files = {}; }
Ternary values are defined such that x & y is False if either x or y is False. x & y is Maybe if either x or y is Maybe, but neither x or y is False. x & y is True if both x and y are True. x | y is False if both x and y are False. x | y is Maybe if either x or y is Maybe, but neither x or y is True. x | y is True if e...
clear
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function toKey(path) { return keyMapper ? keyMapper(path) : path; }
Ternary values are defined such that x & y is False if either x or y is False. x & y is Maybe if either x or y is Maybe, but neither x or y is False. x & y is True if both x and y are True. x | y is False if both x and y are False. x | y is Maybe if either x or y is Maybe, but neither x or y is True. x | y is True if e...
toKey
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function toPath(fileName, basePath, getCanonicalFileName) { var nonCanonicalizedPath = isRootedDiskPath(fileName) ? normalizePath(fileName) : getNormalizedAbsolutePath(fileName, basePath); return getCanonicalFileName(nonCanonicalizedPath); }
Ternary values are defined such that x & y is False if either x or y is False. x & y is Maybe if either x or y is Maybe, but neither x or y is False. x & y is True if both x and y are True. x | y is False if both x and y are False. x | y is Maybe if either x or y is Maybe, but neither x or y is True. x | y is True if e...
toPath
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function contains(array, value) { if (array) { for (var _i = 0, array_1 = array; _i < array_1.length; _i++) { var v = array_1[_i]; if (v === value) { return true; } } } return false; }
Iterates through 'array' by index and performs the callback on each element of array until the callback returns a truthy value, then returns that value. If no such value is found, the callback is applied to each element of array and undefined is returned.
contains
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function indexOf(array, value) { if (array) { for (var i = 0, len = array.length; i < len; i++) { if (array[i] === value) { return i; } } } return -1; }
Iterates through 'array' by index and performs the callback on each element of array until the callback returns a truthy value, then returns that value. If no such value is found, the callback is applied to each element of array and undefined is returned.
indexOf
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function countWhere(array, predicate) { var count = 0; if (array) { for (var _i = 0, array_2 = array; _i < array_2.length; _i++) { var v = array_2[_i]; if (predicate(v)) { count++; } } } return co...
Iterates through 'array' by index and performs the callback on each element of array until the callback returns a truthy value, then returns that value. If no such value is found, the callback is applied to each element of array and undefined is returned.
countWhere
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function filter(array, f) { var result; if (array) { result = []; for (var _i = 0, array_3 = array; _i < array_3.length; _i++) { var item = array_3[_i]; if (f(item)) { result.push(item); } } }...
Iterates through 'array' by index and performs the callback on each element of array until the callback returns a truthy value, then returns that value. If no such value is found, the callback is applied to each element of array and undefined is returned.
filter
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function map(array, f) { var result; if (array) { result = []; for (var _i = 0, array_4 = array; _i < array_4.length; _i++) { var v = array_4[_i]; result.push(f(v)); } } return result; }
Iterates through 'array' by index and performs the callback on each element of array until the callback returns a truthy value, then returns that value. If no such value is found, the callback is applied to each element of array and undefined is returned.
map
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function concatenate(array1, array2) { if (!array2 || !array2.length) return array1; if (!array1 || !array1.length) return array2; return array1.concat(array2); }
Iterates through 'array' by index and performs the callback on each element of array until the callback returns a truthy value, then returns that value. If no such value is found, the callback is applied to each element of array and undefined is returned.
concatenate
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function deduplicate(array) { var result; if (array) { result = []; for (var _i = 0, array_5 = array; _i < array_5.length; _i++) { var item = array_5[_i]; if (!contains(result, item)) { result.push(item); } ...
Iterates through 'array' by index and performs the callback on each element of array until the callback returns a truthy value, then returns that value. If no such value is found, the callback is applied to each element of array and undefined is returned.
deduplicate
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function sum(array, prop) { var result = 0; for (var _i = 0, array_6 = array; _i < array_6.length; _i++) { var v = array_6[_i]; result += v[prop]; } return result; }
Iterates through 'array' by index and performs the callback on each element of array until the callback returns a truthy value, then returns that value. If no such value is found, the callback is applied to each element of array and undefined is returned.
sum
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function addRange(to, from) { if (to && from) { for (var _i = 0, from_1 = from; _i < from_1.length; _i++) { var v = from_1[_i]; to.push(v); } } }
Iterates through 'array' by index and performs the callback on each element of array until the callback returns a truthy value, then returns that value. If no such value is found, the callback is applied to each element of array and undefined is returned.
addRange
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function rangeEquals(array1, array2, pos, end) { while (pos < end) { if (array1[pos] !== array2[pos]) { return false; } pos++; } return true; }
Iterates through 'array' by index and performs the callback on each element of array until the callback returns a truthy value, then returns that value. If no such value is found, the callback is applied to each element of array and undefined is returned.
rangeEquals
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function lastOrUndefined(array) { if (array.length === 0) { return undefined; } return array[array.length - 1]; }
Returns the last element of an array if non-empty, undefined otherwise.
lastOrUndefined
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function reduceLeft(array, f, initial) { if (array) { var count = array.length; if (count > 0) { var pos = 0; var result = arguments.length <= 2 ? array[pos++] : initial; while (pos < count) { result = f(result, array[po...
Performs a binary search, finding the index at which 'value' occurs in 'array'. If no such index is found, returns the 2's-complement of first index at which number[index] exceeds number. @param array A sorted array whose first element must be no larger than number @param number The value to be searched for in the arra...
reduceLeft
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function reduceRight(array, f, initial) { if (array) { var pos = array.length - 1; if (pos >= 0) { var result = arguments.length <= 2 ? array[pos--] : initial; while (pos >= 0) { result = f(result, array[pos--]); } ...
Performs a binary search, finding the index at which 'value' occurs in 'array'. If no such index is found, returns the 2's-complement of first index at which number[index] exceeds number. @param array A sorted array whose first element must be no larger than number @param number The value to be searched for in the arra...
reduceRight
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function hasProperty(map, key) { return hasOwnProperty.call(map, key); }
Performs a binary search, finding the index at which 'value' occurs in 'array'. If no such index is found, returns the 2's-complement of first index at which number[index] exceeds number. @param array A sorted array whose first element must be no larger than number @param number The value to be searched for in the arra...
hasProperty
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getProperty(map, key) { return hasOwnProperty.call(map, key) ? map[key] : undefined; }
Performs a binary search, finding the index at which 'value' occurs in 'array'. If no such index is found, returns the 2's-complement of first index at which number[index] exceeds number. @param array A sorted array whose first element must be no larger than number @param number The value to be searched for in the arra...
getProperty
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isEmpty(map) { for (var id in map) { if (hasProperty(map, id)) { return false; } } return true; }
Performs a binary search, finding the index at which 'value' occurs in 'array'. If no such index is found, returns the 2's-complement of first index at which number[index] exceeds number. @param array A sorted array whose first element must be no larger than number @param number The value to be searched for in the arra...
isEmpty
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function clone(object) { var result = {}; for (var id in object) { result[id] = object[id]; } return result; }
Performs a binary search, finding the index at which 'value' occurs in 'array'. If no such index is found, returns the 2's-complement of first index at which number[index] exceeds number. @param array A sorted array whose first element must be no larger than number @param number The value to be searched for in the arra...
clone
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function extend(first, second) { var result = {}; for (var id in first) { result[id] = first[id]; } for (var id in second) { if (!hasProperty(result, id)) { result[id] = second[id]; } } return result; }
Performs a binary search, finding the index at which 'value' occurs in 'array'. If no such index is found, returns the 2's-complement of first index at which number[index] exceeds number. @param array A sorted array whose first element must be no larger than number @param number The value to be searched for in the arra...
extend
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function forEachValue(map, callback) { var result; for (var id in map) { if (result = callback(map[id])) break; } return result; }
Performs a binary search, finding the index at which 'value' occurs in 'array'. If no such index is found, returns the 2's-complement of first index at which number[index] exceeds number. @param array A sorted array whose first element must be no larger than number @param number The value to be searched for in the arra...
forEachValue
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function forEachKey(map, callback) { var result; for (var id in map) { if (result = callback(id)) break; } return result; }
Performs a binary search, finding the index at which 'value' occurs in 'array'. If no such index is found, returns the 2's-complement of first index at which number[index] exceeds number. @param array A sorted array whose first element must be no larger than number @param number The value to be searched for in the arra...
forEachKey
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function lookUp(map, key) { return hasProperty(map, key) ? map[key] : undefined; }
Performs a binary search, finding the index at which 'value' occurs in 'array'. If no such index is found, returns the 2's-complement of first index at which number[index] exceeds number. @param array A sorted array whose first element must be no larger than number @param number The value to be searched for in the arra...
lookUp
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function copyMap(source, target) { for (var p in source) { target[p] = source[p]; } }
Performs a binary search, finding the index at which 'value' occurs in 'array'. If no such index is found, returns the 2's-complement of first index at which number[index] exceeds number. @param array A sorted array whose first element must be no larger than number @param number The value to be searched for in the arra...
copyMap
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function memoize(callback) { var value; return function () { if (callback) { value = callback(); callback = undefined; } return value; }; }
Creates a map from the elements of an array. @param array the array of input elements. @param makeKey a function that produces a key for a given element. This function makes no effort to avoid collisions; if any two elements produce the same key with the given 'makeKey' function, then the element with the higher inde...
memoize
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function formatStringFromArgs(text, args, baseIndex) { baseIndex = baseIndex || 0; return text.replace(/\{(\d+)\}/g, function (match, index) { return args[+index + baseIndex]; }); }
Creates a map from the elements of an array. @param array the array of input elements. @param makeKey a function that produces a key for a given element. This function makes no effort to avoid collisions; if any two elements produce the same key with the given 'makeKey' function, then the element with the higher inde...
formatStringFromArgs
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getLocaleSpecificMessage(message) { return ts.localizedDiagnosticMessages && ts.localizedDiagnosticMessages[message.key] ? ts.localizedDiagnosticMessages[message.key] : message.message; }
Creates a map from the elements of an array. @param array the array of input elements. @param makeKey a function that produces a key for a given element. This function makes no effort to avoid collisions; if any two elements produce the same key with the given 'makeKey' function, then the element with the higher inde...
getLocaleSpecificMessage
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function createFileDiagnostic(file, start, length, message) { var end = start + length; Debug.assert(start >= 0, "start must be non-negative, is " + start); Debug.assert(length >= 0, "length must be non-negative, is " + length); if (file) { Debug.assert(start <= file.text.len...
Creates a map from the elements of an array. @param array the array of input elements. @param makeKey a function that produces a key for a given element. This function makes no effort to avoid collisions; if any two elements produce the same key with the given 'makeKey' function, then the element with the higher inde...
createFileDiagnostic
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function createCompilerDiagnostic(message) { var text = getLocaleSpecificMessage(message); if (arguments.length > 1) { text = formatStringFromArgs(text, arguments, 1); } return { file: undefined, start: undefined, length: undefined, ...
Creates a map from the elements of an array. @param array the array of input elements. @param makeKey a function that produces a key for a given element. This function makes no effort to avoid collisions; if any two elements produce the same key with the given 'makeKey' function, then the element with the higher inde...
createCompilerDiagnostic
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function chainDiagnosticMessages(details, message) { var text = getLocaleSpecificMessage(message); if (arguments.length > 2) { text = formatStringFromArgs(text, arguments, 2); } return { messageText: text, category: message.category, code: ...
Creates a map from the elements of an array. @param array the array of input elements. @param makeKey a function that produces a key for a given element. This function makes no effort to avoid collisions; if any two elements produce the same key with the given 'makeKey' function, then the element with the higher inde...
chainDiagnosticMessages
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function concatenateDiagnosticMessageChains(headChain, tailChain) { var lastChain = headChain; while (lastChain.next) { lastChain = lastChain.next; } lastChain.next = tailChain; return headChain; }
Creates a map from the elements of an array. @param array the array of input elements. @param makeKey a function that produces a key for a given element. This function makes no effort to avoid collisions; if any two elements produce the same key with the given 'makeKey' function, then the element with the higher inde...
concatenateDiagnosticMessageChains
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function compareValues(a, b) { if (a === b) return 0 /* EqualTo */; if (a === undefined) return -1 /* LessThan */; if (b === undefined) return 1 /* GreaterThan */; return a < b ? -1 /* LessThan */ : 1 /* GreaterThan */; }
Creates a map from the elements of an array. @param array the array of input elements. @param makeKey a function that produces a key for a given element. This function makes no effort to avoid collisions; if any two elements produce the same key with the given 'makeKey' function, then the element with the higher inde...
compareValues
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getDiagnosticFileName(diagnostic) { return diagnostic.file ? diagnostic.file.fileName : undefined; }
Creates a map from the elements of an array. @param array the array of input elements. @param makeKey a function that produces a key for a given element. This function makes no effort to avoid collisions; if any two elements produce the same key with the given 'makeKey' function, then the element with the higher inde...
getDiagnosticFileName
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function compareDiagnostics(d1, d2) { return compareValues(getDiagnosticFileName(d1), getDiagnosticFileName(d2)) || compareValues(d1.start, d2.start) || compareValues(d1.length, d2.length) || compareValues(d1.code, d2.code) || compareMessageText(d1.messageText, d2...
Creates a map from the elements of an array. @param array the array of input elements. @param makeKey a function that produces a key for a given element. This function makes no effort to avoid collisions; if any two elements produce the same key with the given 'makeKey' function, then the element with the higher inde...
compareDiagnostics
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function compareMessageText(text1, text2) { while (text1 && text2) { // We still have both chains. var string1 = typeof text1 === "string" ? text1 : text1.messageText; var string2 = typeof text2 === "string" ? text2 : text2.messageText; var res = compareValues(str...
Creates a map from the elements of an array. @param array the array of input elements. @param makeKey a function that produces a key for a given element. This function makes no effort to avoid collisions; if any two elements produce the same key with the given 'makeKey' function, then the element with the higher inde...
compareMessageText
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function sortAndDeduplicateDiagnostics(diagnostics) { return deduplicateSortedDiagnostics(diagnostics.sort(compareDiagnostics)); }
Creates a map from the elements of an array. @param array the array of input elements. @param makeKey a function that produces a key for a given element. This function makes no effort to avoid collisions; if any two elements produce the same key with the given 'makeKey' function, then the element with the higher inde...
sortAndDeduplicateDiagnostics
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function deduplicateSortedDiagnostics(diagnostics) { if (diagnostics.length < 2) { return diagnostics; } var newDiagnostics = [diagnostics[0]]; var previousDiagnostic = diagnostics[0]; for (var i = 1; i < diagnostics.length; i++) { var currentDiagnostic = ...
Creates a map from the elements of an array. @param array the array of input elements. @param makeKey a function that produces a key for a given element. This function makes no effort to avoid collisions; if any two elements produce the same key with the given 'makeKey' function, then the element with the higher inde...
deduplicateSortedDiagnostics
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function normalizeSlashes(path) { return path.replace(/\\/g, "/"); }
Creates a map from the elements of an array. @param array the array of input elements. @param makeKey a function that produces a key for a given element. This function makes no effort to avoid collisions; if any two elements produce the same key with the given 'makeKey' function, then the element with the higher inde...
normalizeSlashes
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getNormalizedParts(normalizedSlashedPath, rootLength) { var parts = normalizedSlashedPath.substr(rootLength).split(ts.directorySeparator); var normalized = []; for (var _i = 0, parts_1 = parts; _i < parts_1.length; _i++) { var part = parts_1[_i]; if (part !== "."...
Creates a map from the elements of an array. @param array the array of input elements. @param makeKey a function that produces a key for a given element. This function makes no effort to avoid collisions; if any two elements produce the same key with the given 'makeKey' function, then the element with the higher inde...
getNormalizedParts
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function normalizePath(path) { path = normalizeSlashes(path); var rootLength = getRootLength(path); var normalized = getNormalizedParts(path, rootLength); return path.substr(0, rootLength) + normalized.join(ts.directorySeparator); }
Creates a map from the elements of an array. @param array the array of input elements. @param makeKey a function that produces a key for a given element. This function makes no effort to avoid collisions; if any two elements produce the same key with the given 'makeKey' function, then the element with the higher inde...
normalizePath
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getDirectoryPath(path) { return path.substr(0, Math.max(getRootLength(path), path.lastIndexOf(ts.directorySeparator))); }
Creates a map from the elements of an array. @param array the array of input elements. @param makeKey a function that produces a key for a given element. This function makes no effort to avoid collisions; if any two elements produce the same key with the given 'makeKey' function, then the element with the higher inde...
getDirectoryPath
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isUrl(path) { return path && !isRootedDiskPath(path) && path.indexOf("://") !== -1; }
Creates a map from the elements of an array. @param array the array of input elements. @param makeKey a function that produces a key for a given element. This function makes no effort to avoid collisions; if any two elements produce the same key with the given 'makeKey' function, then the element with the higher inde...
isUrl
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isRootedDiskPath(path) { return getRootLength(path) !== 0; }
Creates a map from the elements of an array. @param array the array of input elements. @param makeKey a function that produces a key for a given element. This function makes no effort to avoid collisions; if any two elements produce the same key with the given 'makeKey' function, then the element with the higher inde...
isRootedDiskPath
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function normalizedPathComponents(path, rootLength) { var normalizedParts = getNormalizedParts(path, rootLength); return [path.substr(0, rootLength)].concat(normalizedParts); }
Creates a map from the elements of an array. @param array the array of input elements. @param makeKey a function that produces a key for a given element. This function makes no effort to avoid collisions; if any two elements produce the same key with the given 'makeKey' function, then the element with the higher inde...
normalizedPathComponents
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getNormalizedPathComponents(path, currentDirectory) { path = normalizeSlashes(path); var rootLength = getRootLength(path); if (rootLength === 0) { // If the path is not rooted it is relative to current directory path = combinePaths(normalizeSlashes(currentDirecto...
Creates a map from the elements of an array. @param array the array of input elements. @param makeKey a function that produces a key for a given element. This function makes no effort to avoid collisions; if any two elements produce the same key with the given 'makeKey' function, then the element with the higher inde...
getNormalizedPathComponents
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getNormalizedAbsolutePath(fileName, currentDirectory) { return getNormalizedPathFromPathComponents(getNormalizedPathComponents(fileName, currentDirectory)); }
Creates a map from the elements of an array. @param array the array of input elements. @param makeKey a function that produces a key for a given element. This function makes no effort to avoid collisions; if any two elements produce the same key with the given 'makeKey' function, then the element with the higher inde...
getNormalizedAbsolutePath
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getNormalizedPathFromPathComponents(pathComponents) { if (pathComponents && pathComponents.length) { return pathComponents[0] + pathComponents.slice(1).join(ts.directorySeparator); } }
Creates a map from the elements of an array. @param array the array of input elements. @param makeKey a function that produces a key for a given element. This function makes no effort to avoid collisions; if any two elements produce the same key with the given 'makeKey' function, then the element with the higher inde...
getNormalizedPathFromPathComponents
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getNormalizedPathComponentsOfUrl(url) { // Get root length of http://www.website.com/folder1/foler2/ // In this example the root is: http://www.website.com/ // normalized path components should be ["http://www.website.com/", "folder1", "folder2"] var urlLength = url.length; ...
Creates a map from the elements of an array. @param array the array of input elements. @param makeKey a function that produces a key for a given element. This function makes no effort to avoid collisions; if any two elements produce the same key with the given 'makeKey' function, then the element with the higher inde...
getNormalizedPathComponentsOfUrl
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getNormalizedPathOrUrlComponents(pathOrUrl, currentDirectory) { if (isUrl(pathOrUrl)) { return getNormalizedPathComponentsOfUrl(pathOrUrl); } else { return getNormalizedPathComponents(pathOrUrl, currentDirectory); } }
Creates a map from the elements of an array. @param array the array of input elements. @param makeKey a function that produces a key for a given element. This function makes no effort to avoid collisions; if any two elements produce the same key with the given 'makeKey' function, then the element with the higher inde...
getNormalizedPathOrUrlComponents
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getRelativePathToDirectoryOrUrl(directoryPathOrUrl, relativeOrAbsolutePath, currentDirectory, getCanonicalFileName, isAbsolutePathAnUrl) { var pathComponents = getNormalizedPathOrUrlComponents(relativeOrAbsolutePath, currentDirectory); var directoryComponents = getNormalizedPathOrUrlComponents(...
Creates a map from the elements of an array. @param array the array of input elements. @param makeKey a function that produces a key for a given element. This function makes no effort to avoid collisions; if any two elements produce the same key with the given 'makeKey' function, then the element with the higher inde...
getRelativePathToDirectoryOrUrl
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getBaseFileName(path) { if (!path) { return undefined; } var i = path.lastIndexOf(ts.directorySeparator); return i < 0 ? path : path.substring(i + 1); }
Creates a map from the elements of an array. @param array the array of input elements. @param makeKey a function that produces a key for a given element. This function makes no effort to avoid collisions; if any two elements produce the same key with the given 'makeKey' function, then the element with the higher inde...
getBaseFileName
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function combinePaths(path1, path2) { if (!(path1 && path1.length)) return path2; if (!(path2 && path2.length)) return path1; if (getRootLength(path2) !== 0) return path2; if (path1.charAt(path1.length - 1) === ts.directorySeparator) return...
Creates a map from the elements of an array. @param array the array of input elements. @param makeKey a function that produces a key for a given element. This function makes no effort to avoid collisions; if any two elements produce the same key with the given 'makeKey' function, then the element with the higher inde...
combinePaths
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function fileExtensionIs(path, extension) { var pathLen = path.length; var extLen = extension.length; return pathLen > extLen && path.substr(pathLen - extLen, extLen) === extension; }
Creates a map from the elements of an array. @param array the array of input elements. @param makeKey a function that produces a key for a given element. This function makes no effort to avoid collisions; if any two elements produce the same key with the given 'makeKey' function, then the element with the higher inde...
fileExtensionIs
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isSupportedSourceFileName(fileName) { if (!fileName) { return false; } for (var _i = 0, supportedExtensions_1 = ts.supportedExtensions; _i < supportedExtensions_1.length; _i++) { var extension = supportedExtensions_1[_i]; if (fileExtensionIs(fileName,...
List of supported extensions in order of file resolution precedence.
isSupportedSourceFileName
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function removeFileExtension(path) { for (var _i = 0, extensionsToRemove_1 = extensionsToRemove; _i < extensionsToRemove_1.length; _i++) { var ext = extensionsToRemove_1[_i]; if (fileExtensionIs(path, ext)) { return path.substr(0, path.length - ext.length); } ...
List of supported extensions in order of file resolution precedence.
removeFileExtension
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function Symbol(flags, name) { this.flags = flags; this.name = name; this.declarations = undefined; }
List of supported extensions in order of file resolution precedence.
Symbol
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function Type(checker, flags) { this.flags = flags; }
List of supported extensions in order of file resolution precedence.
Type
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function Node(kind, pos, end) { this.kind = kind; this.pos = pos; this.end = end; this.flags = 0 /* None */; this.parent = undefined; }
List of supported extensions in order of file resolution precedence.
Node
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function shouldAssert(level) { return currentAssertionLevel >= level; }
List of supported extensions in order of file resolution precedence.
shouldAssert
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function assert(expression, message, verboseDebugInfo) { if (!expression) { var verboseDebugString = ""; if (verboseDebugInfo) { verboseDebugString = "\r\nVerbose Debug Information: " + verboseDebugInfo(); } debugger; ...
List of supported extensions in order of file resolution precedence.
assert
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function fail(message) { Debug.assert(false, message); }
List of supported extensions in order of file resolution precedence.
fail
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function copyListRemovingItem(item, list) { var copiedList = []; for (var _i = 0, list_1 = list; _i < list_1.length; _i++) { var e = list_1[_i]; if (e !== item) { copiedList.push(e); } } return copiedList; }
List of supported extensions in order of file resolution precedence.
copyListRemovingItem
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getWScriptSystem() { var fso = new ActiveXObject("Scripting.FileSystemObject"); var fileStream = new ActiveXObject("ADODB.Stream"); fileStream.Type = 2 /*text*/; var binaryStream = new ActiveXObject("ADODB.Stream"); binaryStream.Type = 1 /*binary*/; ...
List of supported extensions in order of file resolution precedence.
getWScriptSystem
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function readFile(fileName, encoding) { if (!fso.FileExists(fileName)) { return undefined; } fileStream.Open(); try { if (encoding) { fileStream.Charset = encoding; fil...
List of supported extensions in order of file resolution precedence.
readFile
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function writeFile(fileName, data, writeByteOrderMark) { fileStream.Open(); binaryStream.Open(); try { // Write characters in UTF-8 encoding fileStream.Charset = "utf-8"; fileStream.WriteText(data); ...
List of supported extensions in order of file resolution precedence.
writeFile
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getCanonicalPath(path) { return path.toLowerCase(); }
List of supported extensions in order of file resolution precedence.
getCanonicalPath
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getNames(collection) { var result = []; for (var e = new Enumerator(collection); !e.atEnd(); e.moveNext()) { result.push(e.item().Name); } return result.sort(); }
List of supported extensions in order of file resolution precedence.
getNames
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function readDirectory(path, extension, exclude) { var result = []; exclude = ts.map(exclude, function (s) { return getCanonicalPath(ts.combinePaths(path, s)); }); visitDirectory(path); return result; function visitDirectory(path) { ...
List of supported extensions in order of file resolution precedence.
readDirectory
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function visitDirectory(path) { var folder = fso.GetFolder(path || "."); var files = getNames(folder.files); for (var _i = 0, files_1 = files; _i < files_1.length; _i++) { var current = files_1[_i]; var name_1 = ...
List of supported extensions in order of file resolution precedence.
visitDirectory
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getNodeSystem() { var _fs = require("fs"); var _path = require("path"); var _os = require("os"); var _tty = require("tty"); // average async stat takes about 30 microseconds // set chunk size to do 30 files in < 1 millisecond f...
List of supported extensions in order of file resolution precedence.
getNodeSystem
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getModifiedTime(fileName) { return _fs.statSync(fileName).mtime; }
List of supported extensions in order of file resolution precedence.
getModifiedTime
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT