Skip to content

Commit 68a28d5

Browse files
committed
Renamed distributions to lower case, updated externs and README
1 parent 38baa95 commit 68a28d5

16 files changed

+1557
-31
lines changed

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![Long.js - A Long class for representing a 64 bit two's-complement integer ](https://raw.github.com/dcodeIO/Long.js/master/Long.png)
1+
![Long.js - A Long class for representing a 64 bit two's-complement integer ](https://raw.github.com/dcodeIO/Long.js/master/long.png)
22
=======
33
A Long class for representing a 64 bit two's-complement integer value derived from the [Closure Library](https://github.com/google/closure-library)
44
for stand-alone use and extended with unsigned support.
@@ -229,7 +229,7 @@ Compares this Long's value with the specified's.
229229
| other | *!Long | number | string* | Other value
230230
| **@returns** | *number* | 0 if they are the same, 1 if the this is greater and -1 if the given one is greater
231231

232-
#### Long#div(divisor)
232+
#### Long#divide/div(divisor)
233233

234234
Returns this Long divided by the specified.
235235

@@ -238,7 +238,7 @@ Returns this Long divided by the specified.
238238
| divisor | *!Long | number | string* | Divisor
239239
| **@returns** | *!Long* | Quotient
240240

241-
#### Long#equals(other)
241+
#### Long#equals/eq(other)
242242

243243
Tests if this Long's value equals the specified's.
244244

@@ -287,7 +287,7 @@ Gets the number of bits needed to represent the absolute value of this Long.
287287
|-----------------|-----------------|---------------
288288
| **@returns** | *number* |
289289

290-
#### Long#greaterThan(other)
290+
#### Long#greaterThan/gt(other)
291291

292292
Tests if this Long's value is greater than the specified's.
293293

@@ -296,7 +296,7 @@ Tests if this Long's value is greater than the specified's.
296296
| other | *!Long | number | string* | Other value
297297
| **@returns** | *boolean* |
298298

299-
#### Long#greaterThanOrEqual(other)
299+
#### Long#greaterThanOrEqual/gte(other)
300300

301301
Tests if this Long's value is greater than or equal the specified's.
302302

@@ -345,7 +345,7 @@ Tests if this Long's value equals zero.
345345
|-----------------|-----------------|---------------
346346
| **@returns** | *boolean* |
347347

348-
#### Long#lessThan(other)
348+
#### Long#lessThan/lt(other)
349349

350350
Tests if this Long's value is less than the specified's.
351351

@@ -354,7 +354,7 @@ Tests if this Long's value is less than the specified's.
354354
| other | *!Long | number | string* | Other value
355355
| **@returns** | *boolean* |
356356

357-
#### Long#lessThanOrEqual(other)
357+
#### Long#lessThanOrEqual/lte(other)
358358

359359
Tests if this Long's value is less than or equal the specified's.
360360

@@ -363,7 +363,7 @@ Tests if this Long's value is less than or equal the specified's.
363363
| other | *!Long | number | string* | Other value
364364
| **@returns** | *boolean* |
365365

366-
#### Long#modulo(divisor)
366+
#### Long#modulo/mod(divisor)
367367

368368
Returns this Long modulo the specified.
369369

@@ -372,7 +372,7 @@ Returns this Long modulo the specified.
372372
| divisor | *!Long | number | string* | Divisor
373373
| **@returns** | *!Long* | Remainder
374374

375-
#### Long#multiply(multiplier)
375+
#### Long#multiply/mul(multiplier)
376376

377377
Returns the product of this and the specified Long.
378378

@@ -381,7 +381,7 @@ Returns the product of this and the specified Long.
381381
| multiplier | *!Long | number | string* | Multiplier
382382
| **@returns** | *!Long* | Product
383383

384-
#### Long#negate()
384+
#### Long#negate/neg()
385385

386386
Negates this Long's value.
387387

@@ -397,7 +397,7 @@ Returns the bitwise NOT of this Long.
397397
|-----------------|-----------------|---------------
398398
| **@returns** | *!Long* |
399399

400-
#### Long#notEquals(other)
400+
#### Long#notEquals/neq(other)
401401

402402
Tests if this Long's value differs from the specified's.
403403

@@ -415,7 +415,7 @@ Returns the bitwise OR of this Long and the specified.
415415
| other | *!Long | number | string* | Other Long
416416
| **@returns** | *!Long* |
417417

418-
#### Long#shiftLeft(numBits)
418+
#### Long#shiftLeft/shl(numBits)
419419

420420
Returns this Long with bits shifted to the left by the given amount.
421421

@@ -424,7 +424,7 @@ Returns this Long with bits shifted to the left by the given amount.
424424
| numBits | *number | !Long* | Number of bits
425425
| **@returns** | *!Long* | Shifted Long
426426

427-
#### Long#shiftRight(numBits)
427+
#### Long#shiftRight/shr(numBits)
428428

429429
Returns this Long with bits arithmetically shifted to the right by the given amount.
430430

@@ -433,7 +433,7 @@ Returns this Long with bits arithmetically shifted to the right by the given amo
433433
| numBits | *number | !Long* | Number of bits
434434
| **@returns** | *!Long* | Shifted Long
435435

436-
#### Long#shiftRightUnsigned(numBits)
436+
#### Long#shiftRightUnsigned/shru(numBits)
437437

438438
Returns this Long with bits logically shifted to the right by the given amount.
439439

@@ -442,7 +442,7 @@ Returns this Long with bits logically shifted to the right by the given amount.
442442
| numBits | *number | !Long* | Number of bits
443443
| **@returns** | *!Long* | Shifted Long
444444

445-
#### Long#subtract(subtrahend)
445+
#### Long#subtract/sub(subtrahend)
446446

447447
Returns the difference of this and the specified Long.
448448

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "long",
3-
"version": "2.4.0",
3+
"version": "3.0.0",
44
"author": "Daniel Wirtz <dcode@dcode.io>",
55
"description": "A Long class for representing a 64 bit two's-complement integer value.",
66
"main": "dist/Long.js",

dist/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
Distributions
22
=============
33

4-
* **[Long.js](https://raw.githubusercontent.com/dcodeIO/Long.js/master/dist/Long.js)**
4+
* **[long.js](https://raw.githubusercontent.com/dcodeIO/Long.js/master/dist/long.js)**
55
contains the commented source.
66

7-
* **[Long.min.js](https://raw.githubusercontent.com/dcodeIO/Long.js/master/dist/Long.min.js)**
7+
* **[long.min.js](https://raw.githubusercontent.com/dcodeIO/Long.js/master/dist/long.min.js)**
88
has been compiled with Closure Compiler using `--compilation_level=ADVANCED_OPTIMIZATIONS`.
99

10-
* **[Long.min.js.gz](https://raw.githubusercontent.com/dcodeIO/Long.js/master/dist/Long.min.js.gz)**
10+
* **[long.min.js.gz](https://raw.githubusercontent.com/dcodeIO/Long.js/master/dist/long.min.js.gz)**
1111
has also been gzipped using `-9`.
1212

13-
* **[Long.min.map](https://raw.githubusercontent.com/dcodeIO/Long.js/master/dist/Long.min.map)**
13+
* **[long.min.map](https://raw.githubusercontent.com/dcodeIO/Long.js/master/dist/long.min.map)**
1414
is the source map generated by Closure Compiler.
1515

1616
Also available as `long` on [npm](https://www.npmjs.org/package/long) and [bower](http://bower.io/search/?q=long).
File renamed without changes.
File renamed without changes.
Binary file not shown.

dist/Long.min.map renamed to dist/long.min.map

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

externs/Long.js

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,36 +198,72 @@ Long.prototype.isEven = function() {};
198198
*/
199199
Long.prototype.equals = function(other) {};
200200

201+
/**
202+
* @param {!Long|number|string} other
203+
* @return {boolean}
204+
*/
205+
Long.prototype.eq = function(other) {};
206+
201207
/**
202208
* @param {!Long|number|string} other
203209
* @return {boolean}
204210
*/
205211
Long.prototype.notEquals = function(other) {};
206212

213+
/**
214+
* @param {!Long|number|string} other
215+
* @return {boolean}
216+
*/
217+
Long.prototype.neq = function(other) {};
218+
207219
/**
208220
* @param {!Long|number|string} other
209221
* @return {boolean}
210222
*/
211223
Long.prototype.lessThan = function(other) {};
212224

225+
/**
226+
* @param {!Long|number|string} other
227+
* @return {boolean}
228+
*/
229+
Long.prototype.lt = function(other) {};
230+
213231
/**
214232
* @param {!Long|number|string} other
215233
* @return {boolean}
216234
*/
217235
Long.prototype.lessThanOrEqual = function(other) {};
218236

237+
/**
238+
* @param {!Long|number|string} other
239+
* @return {boolean}
240+
*/
241+
Long.prototype.lte = function(other) {};
242+
219243
/**
220244
* @param {!Long|number|string} other
221245
* @return {boolean}
222246
*/
223247
Long.prototype.greaterThan = function(other) {};
224248

249+
/**
250+
* @param {!Long|number|string} other
251+
* @return {boolean}
252+
*/
253+
Long.prototype.gt = function(other) {};
254+
225255
/**
226256
* @param {!Long|number|string} other
227257
* @return {boolean}
228258
*/
229259
Long.prototype.greaterThanOrEqual = function(other) {};
230260

261+
/**
262+
* @param {!Long|number|string} other
263+
* @return {boolean}
264+
*/
265+
Long.prototype.gte = function(other) {};
266+
231267
/**
232268
* @param {!Long|number|string} other
233269
* @return {number}
@@ -239,6 +275,11 @@ Long.prototype.compare = function(other) {};
239275
*/
240276
Long.prototype.negate = function() {};
241277

278+
/**
279+
* @return {!Long}
280+
*/
281+
Long.prototype.neg = function() {};
282+
242283
/**
243284
* @param {!Long|number|string} other
244285
* @return {!Long}
@@ -251,12 +292,30 @@ Long.prototype.add = function(other) {};
251292
*/
252293
Long.prototype.subtract = function(other) {};
253294

295+
/**
296+
* @param {!Long|number|string} other
297+
* @return {!Long}
298+
*/
299+
Long.prototype.sub = function(other) {};
300+
254301
/**
255302
* @param {!Long|number|string} other
256303
* @return {!Long}
257304
*/
258305
Long.prototype.multiply = function(other) {};
259306

307+
/**
308+
* @param {!Long|number|string} other
309+
* @return {!Long}
310+
*/
311+
Long.prototype.mul = function(other) {};
312+
313+
/**
314+
* @param {!Long|number|string} other
315+
* @return {!Long}
316+
*/
317+
Long.prototype.divide = function(other) {};
318+
260319
/**
261320
* @param {!Long|number|string} other
262321
* @return {!Long}
@@ -269,6 +328,12 @@ Long.prototype.div = function(other) {};
269328
*/
270329
Long.prototype.modulo = function(other) {};
271330

331+
/**
332+
* @param {!Long|number|string} other
333+
* @return {!Long}
334+
*/
335+
Long.prototype.mod = function(other) {};
336+
272337
/**
273338
* @return {!Long}
274339
*/
@@ -298,18 +363,36 @@ Long.prototype.xor = function(other) {};
298363
*/
299364
Long.prototype.shiftLeft = function(numBits) {};
300365

366+
/**
367+
* @param {number|!Long} numBits
368+
* @return {!Long}
369+
*/
370+
Long.prototype.shl = function(numBits) {};
371+
301372
/**
302373
* @param {number|!Long} numBits
303374
* @return {!Long}
304375
*/
305376
Long.prototype.shiftRight = function(numBits) {};
306377

378+
/**
379+
* @param {number|!Long} numBits
380+
* @return {!Long}
381+
*/
382+
Long.prototype.shr = function(numBits) {};
383+
307384
/**
308385
* @param {number|!Long} numBits
309386
* @return {!Long}
310387
*/
311388
Long.prototype.shiftRightUnsigned = function(numBits) {};
312389

390+
/**
391+
* @param {number|!Long} numBits
392+
* @return {!Long}
393+
*/
394+
Long.prototype.shru = function(numBits) {};
395+
313396
/**
314397
* @return {!Long}
315398
*/

0 commit comments

Comments
 (0)