time-to-botec

Benchmark sampling in different programming languages
Log | Files | Refs | README

index.js (9936B)


      1 /**
      2 * @license Apache-2.0
      3 *
      4 * Copyright (c) 2018 The Stdlib Authors.
      5 *
      6 * Licensed under the Apache License, Version 2.0 (the "License");
      7 * you may not use this file except in compliance with the License.
      8 * You may obtain a copy of the License at
      9 *
     10 *    http://www.apache.org/licenses/LICENSE-2.0
     11 *
     12 * Unless required by applicable law or agreed to in writing, software
     13 * distributed under the License is distributed on an "AS IS" BASIS,
     14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     15 * See the License for the specific language governing permissions and
     16 * limitations under the License.
     17 */
     18 
     19 'use strict';
     20 
     21 /*
     22 * When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.
     23 */
     24 
     25 /*
     26 * The following modules are intentionally not exported: tools
     27 */
     28 
     29 // MODULES //
     30 
     31 var setReadOnly = require( '@stdlib/utils/define-read-only-property' );
     32 
     33 
     34 // MAIN //
     35 
     36 /**
     37 * Top-level namespace.
     38 *
     39 * @namespace string
     40 */
     41 var string = {};
     42 
     43 /**
     44 * @name acronym
     45 * @memberof string
     46 * @readonly
     47 * @type {Function}
     48 * @see {@link module:@stdlib/string/acronym}
     49 */
     50 setReadOnly( string, 'acronym', require( './../acronym' ) );
     51 
     52 /**
     53 * @name base
     54 * @memberof string
     55 * @readonly
     56 * @type {Function}
     57 * @see {@link module:@stdlib/string/base}
     58 */
     59 setReadOnly( string, 'base', require( './../base' ) );
     60 
     61 /**
     62 * @name camelcase
     63 * @memberof string
     64 * @readonly
     65 * @type {Function}
     66 * @see {@link module:@stdlib/string/camelcase}
     67 */
     68 setReadOnly( string, 'camelcase', require( './../camelcase' ) );
     69 
     70 /**
     71 * @name capitalize
     72 * @memberof string
     73 * @readonly
     74 * @type {Function}
     75 * @see {@link module:@stdlib/string/capitalize}
     76 */
     77 setReadOnly( string, 'capitalize', require( './../capitalize' ) );
     78 
     79 /**
     80 * @name codePointAt
     81 * @memberof string
     82 * @readonly
     83 * @type {Function}
     84 * @see {@link module:@stdlib/string/code-point-at}
     85 */
     86 setReadOnly( string, 'codePointAt', require( './../code-point-at' ) );
     87 
     88 /**
     89 * @name constantcase
     90 * @memberof string
     91 * @readonly
     92 * @type {Function}
     93 * @see {@link module:@stdlib/string/constantcase}
     94 */
     95 setReadOnly( string, 'constantcase', require( './../constantcase' ) );
     96 
     97 /**
     98 * @name endsWith
     99 * @memberof string
    100 * @readonly
    101 * @type {Function}
    102 * @see {@link module:@stdlib/string/ends-with}
    103 */
    104 setReadOnly( string, 'endsWith', require( './../ends-with' ) );
    105 
    106 /**
    107 * @name format
    108 * @memberof string
    109 * @readonly
    110 * @type {Function}
    111 * @see {@link module:@stdlib/string/format}
    112 */
    113 setReadOnly( string, 'format', require( './../format' ) );
    114 
    115 /**
    116 * @name fromCodePoint
    117 * @memberof string
    118 * @readonly
    119 * @type {Function}
    120 * @see {@link module:@stdlib/string/from-code-point}
    121 */
    122 setReadOnly( string, 'fromCodePoint', require( './../from-code-point' ) );
    123 
    124 /**
    125 * @name kebabcase
    126 * @memberof string
    127 * @readonly
    128 * @type {Function}
    129 * @see {@link module:@stdlib/string/kebabcase}
    130 */
    131 setReadOnly( string, 'kebabcase', require( './../kebabcase' ) );
    132 
    133 /**
    134 * @name lpad
    135 * @memberof string
    136 * @readonly
    137 * @type {Function}
    138 * @see {@link module:@stdlib/string/left-pad}
    139 */
    140 setReadOnly( string, 'lpad', require( './../left-pad' ) );
    141 
    142 /**
    143 * @name ltrim
    144 * @memberof string
    145 * @readonly
    146 * @type {Function}
    147 * @see {@link module:@stdlib/string/left-trim}
    148 */
    149 setReadOnly( string, 'ltrim', require( './../left-trim' ) );
    150 
    151 /**
    152 * @name ltrimN
    153 * @memberof string
    154 * @readonly
    155 * @type {Function}
    156 * @see {@link module:@stdlib/string/left-trim-n}
    157 */
    158 setReadOnly( string, 'ltrimN', require( './../left-trim-n' ) );
    159 
    160 /**
    161 * @name lowercase
    162 * @memberof string
    163 * @readonly
    164 * @type {Function}
    165 * @see {@link module:@stdlib/string/lowercase}
    166 */
    167 setReadOnly( string, 'lowercase', require( './../lowercase' ) );
    168 
    169 /**
    170 * @name nextGraphemeClusterBreak
    171 * @memberof string
    172 * @readonly
    173 * @type {Function}
    174 * @see {@link module:@stdlib/string/next-grapheme-cluster-break}
    175 */
    176 setReadOnly( string, 'nextGraphemeClusterBreak', require( './../next-grapheme-cluster-break' ) );
    177 
    178 /**
    179 * @name numGraphemeClusters
    180 * @memberof string
    181 * @readonly
    182 * @type {Function}
    183 * @see {@link module:@stdlib/string/num-grapheme-clusters}
    184 */
    185 setReadOnly( string, 'numGraphemeClusters', require( './../num-grapheme-clusters' ) );
    186 
    187 /**
    188 * @name pad
    189 * @memberof string
    190 * @readonly
    191 * @type {Function}
    192 * @see {@link module:@stdlib/string/pad}
    193 */
    194 setReadOnly( string, 'pad', require( './../pad' ) );
    195 
    196 /**
    197 * @name pascalcase
    198 * @memberof string
    199 * @readonly
    200 * @type {Function}
    201 * @see {@link module:@stdlib/string/pascalcase}
    202 */
    203 setReadOnly( string, 'pascalcase', require( './../pascalcase' ) );
    204 
    205 /**
    206 * @name percentEncode
    207 * @memberof string
    208 * @readonly
    209 * @type {Function}
    210 * @see {@link module:@stdlib/string/percent-encode}
    211 */
    212 setReadOnly( string, 'percentEncode', require( './../percent-encode' ) );
    213 
    214 /**
    215 * @name prevGraphemeClusterBreak
    216 * @memberof string
    217 * @readonly
    218 * @type {Function}
    219 * @see {@link module:@stdlib/string/prev-grapheme-cluster-break}
    220 */
    221 setReadOnly( string, 'prevGraphemeClusterBreak', require( './../prev-grapheme-cluster-break' ) );
    222 
    223 /**
    224 * @name removeFirst
    225 * @memberof string
    226 * @readonly
    227 * @type {Function}
    228 * @see {@link module:@stdlib/string/remove-first}
    229 */
    230 setReadOnly( string, 'removeFirst', require( './../remove-first' ) );
    231 
    232 /**
    233 * @name removeLast
    234 * @memberof string
    235 * @readonly
    236 * @type {Function}
    237 * @see {@link module:@stdlib/string/remove-last}
    238 */
    239 setReadOnly( string, 'removeLast', require( './../remove-last' ) );
    240 
    241 /**
    242 * @name removePunctuation
    243 * @memberof string
    244 * @readonly
    245 * @type {Function}
    246 * @see {@link module:@stdlib/string/remove-punctuation}
    247 */
    248 setReadOnly( string, 'removePunctuation', require( './../remove-punctuation' ) );
    249 
    250 /**
    251 * @name removeUTF8BOM
    252 * @memberof string
    253 * @readonly
    254 * @type {Function}
    255 * @see {@link module:@stdlib/string/remove-utf8-bom}
    256 */
    257 setReadOnly( string, 'removeUTF8BOM', require( './../remove-utf8-bom' ) );
    258 
    259 /**
    260 * @name removeWords
    261 * @memberof string
    262 * @readonly
    263 * @type {Function}
    264 * @see {@link module:@stdlib/string/remove-words}
    265 */
    266 setReadOnly( string, 'removeWords', require( './../remove-words' ) );
    267 
    268 /**
    269 * @name repeat
    270 * @memberof string
    271 * @readonly
    272 * @type {Function}
    273 * @see {@link module:@stdlib/string/repeat}
    274 */
    275 setReadOnly( string, 'repeat', require( './../repeat' ) );
    276 
    277 /**
    278 * @name replace
    279 * @memberof string
    280 * @readonly
    281 * @type {Function}
    282 * @see {@link module:@stdlib/string/replace}
    283 */
    284 setReadOnly( string, 'replace', require( './../replace' ) );
    285 
    286 /**
    287 * @name reverseString
    288 * @memberof string
    289 * @readonly
    290 * @type {Function}
    291 * @see {@link module:@stdlib/string/reverse}
    292 */
    293 setReadOnly( string, 'reverseString', require( './../reverse' ) );
    294 
    295 /**
    296 * @name rpad
    297 * @memberof string
    298 * @readonly
    299 * @type {Function}
    300 * @see {@link module:@stdlib/string/right-pad}
    301 */
    302 setReadOnly( string, 'rpad', require( './../right-pad' ) );
    303 
    304 /**
    305 * @name rtrim
    306 * @memberof string
    307 * @readonly
    308 * @type {Function}
    309 * @see {@link module:@stdlib/string/right-trim}
    310 */
    311 setReadOnly( string, 'rtrim', require( './../right-trim' ) );
    312 
    313 /**
    314 * @name rtrimN
    315 * @memberof string
    316 * @readonly
    317 * @type {Function}
    318 * @see {@link module:@stdlib/string/right-trim-n}
    319 */
    320 setReadOnly( string, 'rtrimN', require( './../right-trim-n' ) );
    321 
    322 /**
    323 * @name snakecase
    324 * @memberof string
    325 * @readonly
    326 * @type {Function}
    327 * @see {@link module:@stdlib/string/snakecase}
    328 */
    329 setReadOnly( string, 'snakecase', require( './../snakecase' ) );
    330 
    331 /**
    332 * @name splitGraphemeClusters
    333 * @memberof string
    334 * @readonly
    335 * @type {Function}
    336 * @see {@link module:@stdlib/string/split-grapheme-clusters}
    337 */
    338 setReadOnly( string, 'splitGraphemeClusters', require( './../split-grapheme-clusters' ) );
    339 
    340 /**
    341 * @name startcase
    342 * @memberof string
    343 * @readonly
    344 * @type {Function}
    345 * @see {@link module:@stdlib/string/startcase}
    346 */
    347 setReadOnly( string, 'startcase', require( './../startcase' ) );
    348 
    349 /**
    350 * @name startsWith
    351 * @memberof string
    352 * @readonly
    353 * @type {Function}
    354 * @see {@link module:@stdlib/string/starts-with}
    355 */
    356 setReadOnly( string, 'startsWith', require( './../starts-with' ) );
    357 
    358 /**
    359 * @name substringAfter
    360 * @memberof string
    361 * @readonly
    362 * @type {Function}
    363 * @see {@link module:@stdlib/string/substring-after}
    364 */
    365 setReadOnly( string, 'substringAfter', require( './../substring-after' ) );
    366 
    367 /**
    368 * @name substringAfterLast
    369 * @memberof string
    370 * @readonly
    371 * @type {Function}
    372 * @see {@link module:@stdlib/string/substring-after-last}
    373 */
    374 setReadOnly( string, 'substringAfterLast', require( './../substring-after-last' ) );
    375 
    376 /**
    377 * @name substringBefore
    378 * @memberof string
    379 * @readonly
    380 * @type {Function}
    381 * @see {@link module:@stdlib/string/substring-before}
    382 */
    383 setReadOnly( string, 'substringBefore', require( './../substring-before' ) );
    384 
    385 /**
    386 * @name substringBeforeLast
    387 * @memberof string
    388 * @readonly
    389 * @type {Function}
    390 * @see {@link module:@stdlib/string/substring-before-last}
    391 */
    392 setReadOnly( string, 'substringBeforeLast', require( './../substring-before-last' ) );
    393 
    394 /**
    395 * @name trim
    396 * @memberof string
    397 * @readonly
    398 * @type {Function}
    399 * @see {@link module:@stdlib/string/trim}
    400 */
    401 setReadOnly( string, 'trim', require( './../trim' ) );
    402 
    403 /**
    404 * @name truncate
    405 * @memberof string
    406 * @readonly
    407 * @type {Function}
    408 * @see {@link module:@stdlib/string/truncate}
    409 */
    410 setReadOnly( string, 'truncate', require( './../truncate' ) );
    411 
    412 /**
    413 * @name truncateMiddle
    414 * @memberof string
    415 * @readonly
    416 * @type {Function}
    417 * @see {@link module:@stdlib/string/truncate-middle}
    418 */
    419 setReadOnly( string, 'truncateMiddle', require( './../truncate-middle' ) );
    420 
    421 /**
    422 * @name uncapitalize
    423 * @memberof string
    424 * @readonly
    425 * @type {Function}
    426 * @see {@link module:@stdlib/string/uncapitalize}
    427 */
    428 setReadOnly( string, 'uncapitalize', require( './../uncapitalize' ) );
    429 
    430 /**
    431 * @name uppercase
    432 * @memberof string
    433 * @readonly
    434 * @type {Function}
    435 * @see {@link module:@stdlib/string/uppercase}
    436 */
    437 setReadOnly( string, 'uppercase', require( './../uppercase' ) );
    438 
    439 /**
    440 * @name utf16ToUTF8Array
    441 * @memberof string
    442 * @readonly
    443 * @type {Function}
    444 * @see {@link module:@stdlib/string/utf16-to-utf8-array}
    445 */
    446 setReadOnly( string, 'utf16ToUTF8Array', require( './../utf16-to-utf8-array' ) );
    447 
    448 
    449 // EXPORTS //
    450 
    451 module.exports = string;