Skip to content

Commit 38533da

Browse files
committed
Update function names and Typescript declarations
1 parent 7aa46da commit 38533da

File tree

4 files changed

+169
-20
lines changed

4 files changed

+169
-20
lines changed

lib/node_modules/@stdlib/assert/docs/types/index.d.ts

Lines changed: 150 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ import hasWebAssemblySupport = require( '@stdlib/assert/has-wasm-support' );
6363
import hasWeakMapSupport = require( '@stdlib/assert/has-weakmap-support' );
6464
import hasWeakSetSupport = require( '@stdlib/assert/has-weakset-support' );
6565
import instanceOf = require( '@stdlib/assert/instance-of' );
66+
import isAbsoluteHttpURI = require( '@stdlib/assert/is-absolute-http-uri' );
6667
import isAbsolutePath = require( '@stdlib/assert/is-absolute-path' );
68+
import isAbsoluteURI = require( '@stdlib/assert/is-absolute-uri' );
6769
import isAccessorProperty = require( '@stdlib/assert/is-accessor-property' );
6870
import isAccessorPropertyIn = require( '@stdlib/assert/is-accessor-property-in' );
6971
import isAlphagram = require( '@stdlib/assert/is-alphagram' );
@@ -159,6 +161,7 @@ import isIteratorLike = require( '@stdlib/assert/is-iterator-like' );
159161
import isJSON = require( '@stdlib/assert/is-json' );
160162
import isLeapYear = require( '@stdlib/assert/is-leap-year' );
161163
import IS_LITTLE_ENDIAN = require( '@stdlib/assert/is-little-endian' );
164+
import isLocalhost = require( '@stdlib/assert/is-localhost' );
162165
import isLowercase = require( '@stdlib/assert/is-lowercase' );
163166
import isMatrixLike = require( '@stdlib/assert/is-matrix-like' );
164167
import isMethod = require( '@stdlib/assert/is-method' );
@@ -218,6 +221,7 @@ import isPrimitiveArray = require( '@stdlib/assert/is-primitive-array' );
218221
import isPRNGLike = require( '@stdlib/assert/is-prng-like' );
219222
import isProbability = require( '@stdlib/assert/is-probability' );
220223
import isProbabilityArray = require( '@stdlib/assert/is-probability-array' );
224+
import isPropertyKey = require( '@stdlib/assert/is-property-key' );
221225
import isPrototypeOf = require( '@stdlib/assert/is-prototype-of' );
222226
import isRangeError = require( '@stdlib/assert/is-range-error' );
223227
import isReadOnlyProperty = require( '@stdlib/assert/is-read-only-property' );
@@ -230,6 +234,7 @@ import isReferenceError = require( '@stdlib/assert/is-reference-error' );
230234
import isRegExp = require( '@stdlib/assert/is-regexp' );
231235
import isRegExpString = require( '@stdlib/assert/is-regexp-string' );
232236
import isRelativePath = require( '@stdlib/assert/is-relative-path' );
237+
import isRelativeURI = require( '@stdlib/assert/is-relative-uri' );
233238
import isSafeInteger = require( '@stdlib/assert/is-safe-integer' );
234239
import isSafeIntegerArray = require( '@stdlib/assert/is-safe-integer-array' );
235240
import isSameValue = require( '@stdlib/assert/is-same-value' );
@@ -946,6 +951,38 @@ interface Namespace {
946951
*/
947952
instanceOf: typeof instanceOf;
948953

954+
/**
955+
* Tests whether a value is an absolute HTTP(S) URI.
956+
*
957+
* @param value - value to test
958+
* @returns boolean indicating whether a value is an absolute HTTP(S) URI
959+
*
960+
* @example
961+
* var bool = ns.isAbsoluteHttpURI( 'http://example.com/' );
962+
* // returns true
963+
*
964+
* @example
965+
* var bool = ns.isAbsoluteHttpURI( 'https://example.com/docs#heading' );
966+
* // returns true
967+
*
968+
* @example
969+
* var bool = ns.isAbsoluteHttpURI( 'ftp://example.com' );
970+
* // returns false
971+
*
972+
* @example
973+
* var bool = ns.isAbsoluteHttpURI( '/dashboard' );
974+
* // returns false
975+
*
976+
* @example
977+
* var bool = ns.isAbsoluteHttpURI( './png.json' );
978+
* // returns false
979+
*
980+
* @example
981+
* var bool = ns.isAbsoluteHttpURI( null );
982+
* // returns false
983+
*/
984+
isAbsoluteHttpURI: typeof isAbsoluteHttpURI;
985+
949986
/**
950987
* Tests if a value is an absolute path.
951988
*
@@ -985,6 +1022,34 @@ interface Namespace {
9851022
*/
9861023
isAbsolutePath: typeof isAbsolutePath;
9871024

1025+
/**
1026+
* Tests whether a value is an absolute URI.
1027+
*
1028+
* @param value - value to test
1029+
* @returns boolean indicating whether a value is an absolute URI
1030+
*
1031+
* @example
1032+
* var bool = ns.isAbsoluteURI( 'http://example.com/' );
1033+
* // returns true
1034+
*
1035+
* @example
1036+
* var bool = ns.isAbsoluteURI( 'https://example.com/docs#heading' );
1037+
* // returns true
1038+
*
1039+
* @example
1040+
* var bool = ns.isAbsoluteURI( '/dashboard' );
1041+
* // returns false
1042+
*
1043+
* @example
1044+
* var bool = ns.isAbsoluteURI( './png.json' );
1045+
* // returns false
1046+
*
1047+
* @example
1048+
* var bool = ns.isAbsoluteURI( null );
1049+
* // returns false
1050+
*/
1051+
isAbsoluteURI: typeof isAbsoluteURI;
1052+
9881053
/**
9891054
* Tests if an object's own property has an accessor descriptor.
9901055
*
@@ -1294,7 +1359,7 @@ interface Namespace {
12941359
* function beep() {
12951360
* return 'beep';
12961361
* }
1297-
1362+
*
12981363
* var bool = ns.isArrowFunction( beep );
12991364
* // returns false
13001365
*/
@@ -3173,6 +3238,38 @@ interface Namespace {
31733238
*/
31743239
IS_LITTLE_ENDIAN: typeof IS_LITTLE_ENDIAN;
31753240

3241+
/**
3242+
* Tests whether a value is a localhost hostname.
3243+
*
3244+
* @param value - value to test
3245+
* @returns boolean indicating whether value is a localhost hostname
3246+
*
3247+
* @example
3248+
* var bool = ns.isLocalhost( 'localhost' );
3249+
* // returns true
3250+
*
3251+
* @example
3252+
* var bool = ns.isLocalhost( '127.0.0.1' );
3253+
* // returns true
3254+
*
3255+
* @example
3256+
* var bool = ns.isLocalhost( '[::1]' );
3257+
* // returns true
3258+
*
3259+
* @example
3260+
* var bool = ns.isLocalhost( 'wikipedia.org' );
3261+
* // returns false
3262+
*
3263+
* @example
3264+
* var bool = ns.isLocalhost( 'stdlib.io' );
3265+
* // returns false
3266+
*
3267+
* @example
3268+
* var bool = ns.isLocalhost( null );
3269+
* // returns false
3270+
*/
3271+
isLocalhost: typeof isLocalhost;
3272+
31763273
/**
31773274
* Tests if a value is a lowercase string.
31783275
*
@@ -4636,6 +4733,34 @@ interface Namespace {
46364733
*/
46374734
isProbabilityArray: typeof isProbabilityArray;
46384735

4736+
/**
4737+
* Tests whether a value is a property key.
4738+
*
4739+
* ## Notes
4740+
*
4741+
* - A property key is either a string, symbol, or a nonnegative integer.
4742+
*
4743+
* @param value - value to test
4744+
* @returns boolean indicating whether value is a property key
4745+
*
4746+
* @example
4747+
* var bool = ns.isPropertyKey( 'beep' );
4748+
* // returns true
4749+
*
4750+
* @example
4751+
* var bool = ns.isPropertyKey( 37 );
4752+
* // returns true
4753+
*
4754+
* @example
4755+
* var bool = ns.isPropertyKey( {} );
4756+
* // returns false
4757+
*
4758+
* @example
4759+
* var bool = ns.isPropertyKey( [] );
4760+
* // returns false
4761+
*/
4762+
isPropertyKey: typeof isPropertyKey;
4763+
46394764
/**
46404765
* Tests if an object's prototype chain contains a provided prototype.
46414766
*
@@ -4978,6 +5103,30 @@ interface Namespace {
49785103
*/
49795104
isRelativePath: typeof isRelativePath;
49805105

5106+
/**
5107+
* Tests whether a value is a relative URI.
5108+
*
5109+
* @param value - value to test
5110+
* @returns boolean indicating whether a value is a relative URI
5111+
*
5112+
* @example
5113+
* var bool = ns.isRelativeURI( './beep/boop' );
5114+
* // returns true
5115+
*
5116+
* @example
5117+
* var bool = ns.isRelativeURI( '/dashboard/admin' );
5118+
* // returns true
5119+
*
5120+
* @example
5121+
* var bool = ns.isRelativeURI( 'http://wikipedia.org' );
5122+
* // returns false
5123+
*
5124+
* @example
5125+
* var bool = ns.isRelativeURI( null );
5126+
* // returns false
5127+
*/
5128+
isRelativeURI: typeof isRelativeURI;
5129+
49815130
/**
49825131
* Tests if a value is a safe integer.
49835132
*

lib/node_modules/@stdlib/assert/is-arrow-function/docs/types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
* function beep() {
3434
* return 'beep';
3535
* }
36-
36+
*
3737
* var bool = isArrowFunction( beep );
3838
* // returns false
3939
*/

lib/node_modules/@stdlib/string/docs/types/index.d.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import fromCodePoint = require( '@stdlib/string/from-code-point' );
3131
import kebabcase = require( '@stdlib/string/kebabcase' );
3232
import lpad = require( '@stdlib/string/left-pad' );
3333
import ltrim = require( '@stdlib/string/left-trim' );
34-
import leftTrimN = require( '@stdlib/string/left-trim-n' );
34+
import ltrimN = require( '@stdlib/string/left-trim-n' );
3535
import lowercase = require( '@stdlib/string/lowercase' );
3636
import nextGraphemeClusterBreak = require( '@stdlib/string/next-grapheme-cluster-break' );
3737
import numGraphemeClusters = require( '@stdlib/string/num-grapheme-clusters' );
@@ -49,7 +49,7 @@ import replace = require( '@stdlib/string/replace' );
4949
import reverseString = require( '@stdlib/string/reverse' );
5050
import rpad = require( '@stdlib/string/right-pad' );
5151
import rtrim = require( '@stdlib/string/right-trim' );
52-
import rightTrimN = require( '@stdlib/string/right-trim-n' );
52+
import rtrimN = require( '@stdlib/string/right-trim-n' );
5353
import snakecase = require( '@stdlib/string/snakecase' );
5454
import splitGraphemeClusters = require( '@stdlib/string/split-grapheme-clusters' );
5555
import startcase = require( '@stdlib/string/startcase' );
@@ -294,7 +294,7 @@ interface Namespace {
294294
ltrim: typeof ltrim;
295295

296296
/**
297-
* Trims `n` whitespace characters from the beginning of a string.
297+
* Trims `n` characters from the beginning of a string.
298298
*
299299
* @param str - input string
300300
* @param n - number of characters to trim
@@ -303,25 +303,25 @@ interface Namespace {
303303
*
304304
* @example
305305
* var str = ' abc ';
306-
* var out = ns.leftTrimN( str, 2 );
306+
* var out = ns.ltrimN( str, 2 );
307307
* // returns ' abc '
308308
*
309309
* @example
310310
* var str = ' abc ';
311-
* var out = ns.leftTrimN( str, str.length );
311+
* var out = ns.ltrimN( str, str.length );
312312
* // returns 'abc '
313313
*
314314
* @example
315315
* var str = '~~abc!~~';
316-
* var out = ns.leftTrimN( str, str.length, [ '~', '!' ] );
316+
* var out = ns.ltrimN( str, str.length, [ '~', '!' ] );
317317
* // returns 'abc!~~'
318318
*
319319
* @example
320320
* var str = '🤖👨🏼‍🎨🤖👨🏼‍🎨🤖👨🏼‍🎨';
321-
* var out = ns.leftTrimN( str, str.length, '👨🏼‍🎨🤖' );
321+
* var out = ns.ltrimN( str, str.length, '👨🏼‍🎨🤖' );
322322
* // returns ''
323323
*/
324-
leftTrimN: typeof leftTrimN;
324+
ltrimN: typeof ltrimN;
325325

326326
/**
327327
* Converts a string to lowercase.
@@ -735,7 +735,7 @@ interface Namespace {
735735
rtrim: typeof rtrim;
736736

737737
/**
738-
* Trims `n` whitespace characters from the end of a string.
738+
* Trims `n` characters from the end of a string.
739739
*
740740
* @param str - input string
741741
* @param n - number of characters to trim
@@ -744,25 +744,25 @@ interface Namespace {
744744
*
745745
* @example
746746
* var str = ' abc ';
747-
* var out = ns.rightTrimN( str, 2 );
747+
* var out = ns.rtrimN( str, 2 );
748748
* // returns ' abc '
749749
*
750750
* @example
751751
* var str = ' abc ';
752-
* var out = ns.rightTrimN( str, str.length );
752+
* var out = ns.rtrimN( str, str.length );
753753
* // returns ' abc'
754754
*
755755
* @example
756756
* var str = '~~abc!~~';
757-
* var out = ns.rightTrimN( str, str.length, [ '~', '!' ] );
757+
* var out = ns.rtrimN( str, str.length, [ '~', '!' ] );
758758
* // returns '~~abc'
759759
*
760760
* @example
761761
* var str = '🤖👨🏼‍🎨🤖👨🏼‍🎨🤖👨🏼‍🎨';
762-
* var out = ns.rightTrimN( str, str.length, '👨🏼‍🎨🤖' );
762+
* var out = ns.rtrimN( str, str.length, '👨🏼‍🎨🤖' );
763763
* // returns ''
764764
*/
765-
rightTrimN: typeof rightTrimN;
765+
rtrimN: typeof rtrimN;
766766

767767
/**
768768
* Converts a string to snake case.

lib/node_modules/@stdlib/string/lib/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,13 +131,13 @@ setReadOnly( string, 'lpad', require( '@stdlib/string/left-pad' ) );
131131
setReadOnly( string, 'ltrim', require( '@stdlib/string/left-trim' ) );
132132

133133
/**
134-
* @name leftTrimN
134+
* @name ltrimN
135135
* @memberof string
136136
* @readonly
137137
* @type {Function}
138138
* @see {@link module:@stdlib/string/left-trim-n}
139139
*/
140-
setReadOnly( string, 'leftTrimN', require( '@stdlib/string/left-trim-n' ) );
140+
setReadOnly( string, 'ltrimN', require( '@stdlib/string/left-trim-n' ) );
141141

142142
/**
143143
* @name lowercase
@@ -293,13 +293,13 @@ setReadOnly( string, 'rpad', require( '@stdlib/string/right-pad' ) );
293293
setReadOnly( string, 'rtrim', require( '@stdlib/string/right-trim' ) );
294294

295295
/**
296-
* @name rightTrimN
296+
* @name rtrimN
297297
* @memberof string
298298
* @readonly
299299
* @type {Function}
300300
* @see {@link module:@stdlib/string/right-trim-n}
301301
*/
302-
setReadOnly( string, 'rightTrimN', require( '@stdlib/string/right-trim-n' ) );
302+
setReadOnly( string, 'rtrimN', require( '@stdlib/string/right-trim-n' ) );
303303

304304
/**
305305
* @name snakecase

0 commit comments

Comments
 (0)