@stdlib/string-kebabcase 0.0.3 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +0 -304
- package/NOTICE +1 -1
- package/README.md +22 -106
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +7 -0
- package/docs/types/index.d.ts +1 -1
- package/lib/index.js +2 -2
- package/lib/main.js +5 -17
- package/package.json +8 -23
- package/bin/cli +0 -108
- package/docs/repl.txt +0 -23
- package/docs/types/test.ts +0 -44
- package/docs/usage.txt +0 -8
- package/etc/cli_opts.json +0 -17
package/LICENSE
CHANGED
|
@@ -175,307 +175,3 @@
|
|
|
175
175
|
of your accepting any such warranty or additional liability.
|
|
176
176
|
|
|
177
177
|
END OF TERMS AND CONDITIONS
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
Boost Software License - Version 1.0 - August 17th, 2003
|
|
182
|
-
|
|
183
|
-
Permission is hereby granted, free of charge, to any person or organization
|
|
184
|
-
obtaining a copy of the software and accompanying documentation covered by this
|
|
185
|
-
license (the "Software") to use, reproduce, display, distribute, execute, and
|
|
186
|
-
transmit the Software, and to prepare derivative works of the Software, and to
|
|
187
|
-
permit third-parties to whom the Software is furnished to do so, all subject to
|
|
188
|
-
the following:
|
|
189
|
-
|
|
190
|
-
The copyright notices in the Software and this entire statement, including the
|
|
191
|
-
above license grant, this restriction and the following disclaimer, must be
|
|
192
|
-
included in all copies of the Software, in whole or in part, and all derivative
|
|
193
|
-
works of the Software, unless such copies or derivative works are solely in the
|
|
194
|
-
form of machine-executable object code generated by a source language processor.
|
|
195
|
-
|
|
196
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
197
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
198
|
-
FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
|
199
|
-
COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES
|
|
200
|
-
OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
|
201
|
-
OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
DEPENDENCIES
|
|
207
|
-
|
|
208
|
-
The library links against the following external libraries, which have their own
|
|
209
|
-
licenses:
|
|
210
|
-
|
|
211
|
-
* OpenBLAS <https://raw.githubusercontent.com/xianyi/OpenBLAS/
|
|
212
|
-
def146efed8d5908ea04e22668feeab7099599a0/LICENSE>
|
|
213
|
-
|
|
214
|
-
Copyright (c) 2011-2014, The OpenBLAS Project
|
|
215
|
-
All rights reserved.
|
|
216
|
-
|
|
217
|
-
Redistribution and use in source and binary forms, with or without
|
|
218
|
-
modification, are permitted provided that the following conditions are
|
|
219
|
-
met:
|
|
220
|
-
|
|
221
|
-
1. Redistributions of source code must retain the above copyright
|
|
222
|
-
notice, this list of conditions and the following disclaimer.
|
|
223
|
-
|
|
224
|
-
2. Redistributions in binary form must reproduce the above copyright
|
|
225
|
-
notice, this list of conditions and the following disclaimer in
|
|
226
|
-
the documentation and/or other materials provided with the
|
|
227
|
-
distribution.
|
|
228
|
-
|
|
229
|
-
3. Neither the name of the OpenBLAS project nor the names of
|
|
230
|
-
its contributors may be used to endorse or promote products
|
|
231
|
-
derived from this software without specific prior written
|
|
232
|
-
permission.
|
|
233
|
-
|
|
234
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
235
|
-
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
236
|
-
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
237
|
-
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
238
|
-
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
239
|
-
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
|
240
|
-
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
241
|
-
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
242
|
-
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
|
243
|
-
THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
* Electron <https://raw.githubusercontent.com/electron/electron/
|
|
247
|
-
c4cfb3e7110266b9d7ad80e1ae097c4db564501c/LICENSE>
|
|
248
|
-
|
|
249
|
-
Copyright (c) 2013-2017 GitHub Inc.
|
|
250
|
-
|
|
251
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
|
252
|
-
a copy of this software and associated documentation files (the
|
|
253
|
-
"Software"), to deal in the Software without restriction, including
|
|
254
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
|
255
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
|
256
|
-
permit persons to whom the Software is furnished to do so, subject to
|
|
257
|
-
the following conditions:
|
|
258
|
-
|
|
259
|
-
The above copyright notice and this permission notice shall be
|
|
260
|
-
included in all copies or substantial portions of the Software.
|
|
261
|
-
|
|
262
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
263
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
264
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
265
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
266
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
267
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
268
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
* Boost <http://www.boost.org/LICENSE_1_0.txt>
|
|
272
|
-
|
|
273
|
-
Boost Software License - Version 1.0 - August 17th, 2003
|
|
274
|
-
|
|
275
|
-
Permission is hereby granted, free of charge, to any person or organization
|
|
276
|
-
obtaining a copy of the software and accompanying documentation covered by
|
|
277
|
-
this license (the "Software") to use, reproduce, display, distribute,
|
|
278
|
-
execute, and transmit the Software, and to prepare derivative works of the
|
|
279
|
-
Software, and to permit third-parties to whom the Software is furnished to
|
|
280
|
-
do so, all subject to the following:
|
|
281
|
-
|
|
282
|
-
The copyright notices in the Software and this entire statement, including
|
|
283
|
-
the above license grant, this restriction and the following disclaimer,
|
|
284
|
-
must be included in all copies of the Software, in whole or in part, and
|
|
285
|
-
all derivative works of the Software, unless such copies or derivative
|
|
286
|
-
works are solely in the form of machine-executable object code generated by
|
|
287
|
-
a source language processor.
|
|
288
|
-
|
|
289
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
290
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
291
|
-
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
|
292
|
-
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
|
293
|
-
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
|
294
|
-
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
295
|
-
DEALINGS IN THE SOFTWARE.
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
* Cephes <http://www.netlib.org/cephes/readme>
|
|
299
|
-
|
|
300
|
-
Copyright (c) 1984-2000 Stephen L. Moshier
|
|
301
|
-
|
|
302
|
-
Some software in this archive may be from the book _Methods and Programs for
|
|
303
|
-
Mathematical Functions_ (Prentice-Hall or Simon & Schuster International, 1989)
|
|
304
|
-
or from the Cephes Mathematical Library, a commercial product. In either event,
|
|
305
|
-
it is copyrighted by the author. What you see here may be used freely but it
|
|
306
|
-
comes with no support or guarantee.
|
|
307
|
-
|
|
308
|
-
Stephen L. Moshier
|
|
309
|
-
moshier@na-net.ornl.gov
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
ATTRIBUTION
|
|
314
|
-
|
|
315
|
-
The library contains implementations from the following external libraries,
|
|
316
|
-
which have their own licenses:
|
|
317
|
-
|
|
318
|
-
* FreeBSD <https://svnweb.freebsd.org/>
|
|
319
|
-
|
|
320
|
-
Copyright (C) 1993-2004 by Sun Microsystems, Inc. All rights reserved.
|
|
321
|
-
|
|
322
|
-
Developed at SunPro, a Sun Microsystems, Inc. business.
|
|
323
|
-
Permission to use, copy, modify, and distribute this
|
|
324
|
-
software is freely granted, provided that this notice
|
|
325
|
-
is preserved.
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
* FDLIBM <http://www.netlib.org/fdlibm/>
|
|
329
|
-
|
|
330
|
-
Copyright (C) 2004 by Sun Microsystems, Inc. All rights reserved.
|
|
331
|
-
|
|
332
|
-
Developed at SunPro, a Sun Microsystems, Inc. business.
|
|
333
|
-
Permission to use, copy, modify, and distribute this
|
|
334
|
-
software is freely granted, provided that this notice
|
|
335
|
-
is preserved.
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
* Go <https://raw.githubusercontent.com/golang/go/master/LICENSE>
|
|
339
|
-
|
|
340
|
-
Copyright (c) 2009 The Go Authors. All rights reserved.
|
|
341
|
-
|
|
342
|
-
Redistribution and use in source and binary forms, with or without
|
|
343
|
-
modification, are permitted provided that the following conditions are
|
|
344
|
-
met:
|
|
345
|
-
|
|
346
|
-
* Redistributions of source code must retain the above copyright
|
|
347
|
-
notice, this list of conditions and the following disclaimer.
|
|
348
|
-
* Redistributions in binary form must reproduce the above
|
|
349
|
-
copyright notice, this list of conditions and the following disclaimer
|
|
350
|
-
in the documentation and/or other materials provided with the
|
|
351
|
-
distribution.
|
|
352
|
-
* Neither the name of Google Inc. nor the names of its
|
|
353
|
-
contributors may be used to endorse or promote products derived from
|
|
354
|
-
this software without specific prior written permission.
|
|
355
|
-
|
|
356
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
357
|
-
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
358
|
-
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
359
|
-
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
360
|
-
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
361
|
-
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
362
|
-
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
363
|
-
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
364
|
-
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
365
|
-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
366
|
-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
* SLATEC Common Mathematical Library <http://www.netlib.no/netlib/slatec/>
|
|
370
|
-
|
|
371
|
-
Public domain.
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
* ESLint <https://raw.githubusercontent.com/eslint/eslint/master/LICENSE>
|
|
375
|
-
|
|
376
|
-
Copyright JS Foundation and other contributors, https://js.foundation
|
|
377
|
-
|
|
378
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
379
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
380
|
-
in the Software without restriction, including without limitation the rights
|
|
381
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
382
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
383
|
-
furnished to do so, subject to the following conditions:
|
|
384
|
-
|
|
385
|
-
The above copyright notice and this permission notice shall be included in
|
|
386
|
-
all copies or substantial portions of the Software.
|
|
387
|
-
|
|
388
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
389
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
390
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
391
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
392
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
393
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
394
|
-
THE SOFTWARE.
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
* StatsFuns.jl <https://raw.githubusercontent.com/JuliaStats/StatsFuns.jl/
|
|
398
|
-
e66dd973650c375bc1739c820e5b96bb5bd000a8/LICENSE.md>
|
|
399
|
-
|
|
400
|
-
Copyright (c) 2015: Dahua Lin.
|
|
401
|
-
|
|
402
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
|
403
|
-
a copy of this software and associated documentation files (the
|
|
404
|
-
"Software"), to deal in the Software without restriction, including
|
|
405
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
|
406
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
|
407
|
-
permit persons to whom the Software is furnished to do so, subject to
|
|
408
|
-
the following conditions:
|
|
409
|
-
|
|
410
|
-
The above copyright notice and this permission notice shall be
|
|
411
|
-
included in all copies or substantial portions of the Software.
|
|
412
|
-
|
|
413
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
414
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
415
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
416
|
-
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
417
|
-
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
418
|
-
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
419
|
-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
* SpecialFunctions.jl <https://raw.githubusercontent.com/JuliaMath/
|
|
423
|
-
SpecialFunctions.jl/02a173fbe24a61c4b392aec17a9764ac5727feb1/LICENSE>
|
|
424
|
-
|
|
425
|
-
The MIT License (MIT)
|
|
426
|
-
|
|
427
|
-
Copyright (c) 2017 Jeff Bezanson, Stefan Karpinski, Viral B. Shah, and others:
|
|
428
|
-
|
|
429
|
-
https://github.com/JuliaMath/SpecialFunctions.jl/graphs/contributors
|
|
430
|
-
|
|
431
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
432
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
433
|
-
in the Software without restriction, including without limitation the rights
|
|
434
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
435
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
436
|
-
furnished to do so, subject to the following conditions:
|
|
437
|
-
|
|
438
|
-
The above copyright notice and this permission notice shall be included in all
|
|
439
|
-
copies or substantial portions of the Software.
|
|
440
|
-
|
|
441
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
442
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
443
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
444
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
445
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
446
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
447
|
-
SOFTWARE.
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
* MT19937 <http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/CODES/
|
|
451
|
-
mt19937ar.c>
|
|
452
|
-
|
|
453
|
-
Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
|
|
454
|
-
All rights reserved.
|
|
455
|
-
|
|
456
|
-
Redistribution and use in source and binary forms, with or without
|
|
457
|
-
modification, are permitted provided that the following conditions
|
|
458
|
-
are met:
|
|
459
|
-
|
|
460
|
-
1. Redistributions of source code must retain the above copyright
|
|
461
|
-
notice, this list of conditions and the following disclaimer.
|
|
462
|
-
|
|
463
|
-
2. Redistributions in binary form must reproduce the above copyright
|
|
464
|
-
notice, this list of conditions and the following disclaimer in the
|
|
465
|
-
documentation and/or other materials provided with the distribution.
|
|
466
|
-
|
|
467
|
-
3. The names of its contributors may not be used to endorse or promote
|
|
468
|
-
products derived from this software without specific prior written
|
|
469
|
-
permission.
|
|
470
|
-
|
|
471
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
472
|
-
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
473
|
-
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
474
|
-
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
475
|
-
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
476
|
-
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
477
|
-
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
478
|
-
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
479
|
-
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
480
|
-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
481
|
-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
package/NOTICE
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Copyright (c) 2016-
|
|
1
|
+
Copyright (c) 2016-2023 The Stdlib Authors.
|
package/README.md
CHANGED
|
@@ -101,110 +101,19 @@ out = kebabcase( str );
|
|
|
101
101
|
|
|
102
102
|
<!-- /.examples -->
|
|
103
103
|
|
|
104
|
-
* * *
|
|
105
|
-
|
|
106
|
-
<section class="cli">
|
|
107
|
-
|
|
108
|
-
## CLI
|
|
109
|
-
|
|
110
|
-
<section class="installation">
|
|
111
|
-
|
|
112
|
-
## Installation
|
|
113
|
-
|
|
114
|
-
To use the module as a general utility, install the module globally
|
|
115
|
-
|
|
116
|
-
```bash
|
|
117
|
-
npm install -g @stdlib/string-kebabcase
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
</section>
|
|
121
|
-
|
|
122
|
-
<!-- CLI usage documentation. -->
|
|
123
|
-
|
|
124
|
-
<section class="usage">
|
|
125
|
-
|
|
126
|
-
### Usage
|
|
127
|
-
|
|
128
|
-
```text
|
|
129
|
-
Usage: kebabcase [options] [<string>]
|
|
130
104
|
|
|
131
|
-
Options:
|
|
132
|
-
|
|
133
|
-
-h, --help Print this message.
|
|
134
|
-
-V, --version Print the package version.
|
|
135
|
-
--split sep Delimiter for stdin data. Default: '/\\r?\\n/'.
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
</section>
|
|
139
|
-
|
|
140
|
-
<!-- /.usage -->
|
|
141
|
-
|
|
142
|
-
<!-- CLI usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
|
|
143
|
-
|
|
144
|
-
<section class="notes">
|
|
145
|
-
|
|
146
|
-
### Notes
|
|
147
|
-
|
|
148
|
-
- If the split separator is a [regular expression][mdn-regexp], ensure that the `split` option is either properly escaped or enclosed in quotes.
|
|
149
|
-
|
|
150
|
-
```bash
|
|
151
|
-
# Not escaped...
|
|
152
|
-
$ echo -n $'beEp booP\nisMobile' | kebabcase --split /\r?\n/
|
|
153
|
-
|
|
154
|
-
# Escaped...
|
|
155
|
-
$ echo -n $'beEp booP\nisMobile' | kebabcase --split /\\r?\\n/
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
- The implementation ignores trailing delimiters.
|
|
159
|
-
|
|
160
|
-
</section>
|
|
161
|
-
|
|
162
|
-
<!-- /.notes -->
|
|
163
|
-
|
|
164
|
-
<section class="examples">
|
|
165
|
-
|
|
166
|
-
### Examples
|
|
167
|
-
|
|
168
|
-
```bash
|
|
169
|
-
$ kebabcase 'hello world!'
|
|
170
|
-
hello-world
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
To use as a [standard stream][standard-streams],
|
|
174
|
-
|
|
175
|
-
```bash
|
|
176
|
-
$ echo -n 'beEp booP' | kebabcase
|
|
177
|
-
beep-boop
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
By default, when used as a [standard stream][standard-streams], the implementation assumes newline-delimited data. To specify an alternative delimiter, set the `split` option.
|
|
181
|
-
|
|
182
|
-
```bash
|
|
183
|
-
$ echo -n 'beep_boop\tisMobile' | kebabcase --split '\t'
|
|
184
|
-
beep-boop
|
|
185
|
-
is-mobile
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
</section>
|
|
189
|
-
|
|
190
|
-
<!-- /.examples -->
|
|
191
|
-
|
|
192
|
-
</section>
|
|
193
|
-
|
|
194
|
-
<!-- /.cli -->
|
|
195
105
|
|
|
196
106
|
<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->
|
|
197
107
|
|
|
198
108
|
<section class="related">
|
|
199
109
|
|
|
200
|
-
* * *
|
|
201
|
-
|
|
202
110
|
## See Also
|
|
203
111
|
|
|
204
|
-
- <span class="package-name">[`@stdlib/string
|
|
205
|
-
- <span class="package-name">[`@stdlib/string
|
|
206
|
-
- <span class="package-name">[`@stdlib/string
|
|
207
|
-
- <span class="package-name">[`@stdlib/string
|
|
112
|
+
- <span class="package-name">[`@stdlib/string-kebabcase-cli`][@stdlib/string-kebabcase-cli]</span><span class="delimiter">: </span><span class="description">CLI package for use as a command-line utility.</span>
|
|
113
|
+
- <span class="package-name">[`@stdlib/string-camelcase`][@stdlib/string/camelcase]</span><span class="delimiter">: </span><span class="description">convert a string to camel case.</span>
|
|
114
|
+
- <span class="package-name">[`@stdlib/string-constantcase`][@stdlib/string/constantcase]</span><span class="delimiter">: </span><span class="description">convert a string to constant case.</span>
|
|
115
|
+
- <span class="package-name">[`@stdlib/string-pascalcase`][@stdlib/string/pascalcase]</span><span class="delimiter">: </span><span class="description">convert a string to Pascal case.</span>
|
|
116
|
+
- <span class="package-name">[`@stdlib/string-snakecase`][@stdlib/string/snakecase]</span><span class="delimiter">: </span><span class="description">convert a string to snake case.</span>
|
|
208
117
|
|
|
209
118
|
</section>
|
|
210
119
|
|
|
@@ -236,7 +145,7 @@ See [LICENSE][stdlib-license].
|
|
|
236
145
|
|
|
237
146
|
## Copyright
|
|
238
147
|
|
|
239
|
-
Copyright © 2016-
|
|
148
|
+
Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors].
|
|
240
149
|
|
|
241
150
|
</section>
|
|
242
151
|
|
|
@@ -246,11 +155,13 @@ Copyright © 2016-2022. The Stdlib [Authors][stdlib-authors].
|
|
|
246
155
|
|
|
247
156
|
<section class="links">
|
|
248
157
|
|
|
158
|
+
[@stdlib/string-kebabcase-cli]: https://www.npmjs.com/package/@stdlib/string-kebabcase-cli
|
|
159
|
+
|
|
249
160
|
[npm-image]: http://img.shields.io/npm/v/@stdlib/string-kebabcase.svg
|
|
250
161
|
[npm-url]: https://npmjs.org/package/@stdlib/string-kebabcase
|
|
251
162
|
|
|
252
|
-
[test-image]: https://github.com/stdlib-js/string-kebabcase/actions/workflows/test.yml/badge.svg
|
|
253
|
-
[test-url]: https://github.com/stdlib-js/string-kebabcase/actions/workflows/test.yml
|
|
163
|
+
[test-image]: https://github.com/stdlib-js/string-kebabcase/actions/workflows/test.yml/badge.svg?branch=v0.0.6
|
|
164
|
+
[test-url]: https://github.com/stdlib-js/string-kebabcase/actions/workflows/test.yml?query=branch:v0.0.6
|
|
254
165
|
|
|
255
166
|
[coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/string-kebabcase/main.svg
|
|
256
167
|
[coverage-url]: https://codecov.io/github/stdlib-js/string-kebabcase?branch=main
|
|
@@ -262,19 +173,24 @@ Copyright © 2016-2022. The Stdlib [Authors][stdlib-authors].
|
|
|
262
173
|
|
|
263
174
|
-->
|
|
264
175
|
|
|
176
|
+
[chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg
|
|
177
|
+
[chat-url]: https://app.gitter.im/#/room/#stdlib-js_stdlib:gitter.im
|
|
178
|
+
|
|
179
|
+
[stdlib]: https://github.com/stdlib-js/stdlib
|
|
180
|
+
|
|
181
|
+
[stdlib-authors]: https://github.com/stdlib-js/stdlib/graphs/contributors
|
|
182
|
+
|
|
183
|
+
[cli-section]: https://github.com/stdlib-js/string-kebabcase#cli
|
|
184
|
+
[cli-url]: https://github.com/stdlib-js/string-kebabcase/tree/cli
|
|
185
|
+
[@stdlib/string-kebabcase]: https://github.com/stdlib-js/string-kebabcase/tree/main
|
|
186
|
+
|
|
265
187
|
[umd]: https://github.com/umdjs/umd
|
|
266
188
|
[es-module]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules
|
|
267
189
|
|
|
268
190
|
[deno-url]: https://github.com/stdlib-js/string-kebabcase/tree/deno
|
|
269
191
|
[umd-url]: https://github.com/stdlib-js/string-kebabcase/tree/umd
|
|
270
192
|
[esm-url]: https://github.com/stdlib-js/string-kebabcase/tree/esm
|
|
271
|
-
|
|
272
|
-
[chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg
|
|
273
|
-
[chat-url]: https://gitter.im/stdlib-js/stdlib/
|
|
274
|
-
|
|
275
|
-
[stdlib]: https://github.com/stdlib-js/stdlib
|
|
276
|
-
|
|
277
|
-
[stdlib-authors]: https://github.com/stdlib-js/stdlib/graphs/contributors
|
|
193
|
+
[branches-url]: https://github.com/stdlib-js/string-kebabcase/blob/main/branches.md
|
|
278
194
|
|
|
279
195
|
[stdlib-license]: https://raw.githubusercontent.com/stdlib-js/string-kebabcase/main/LICENSE
|
|
280
196
|
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";var a=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var t=a((b,i)=>{"use strict";var s=require("@stdlib/assert-is-string/dist").isPrimitive,u=require("@stdlib/error-tools-fmtprodmsg/dist"),n=require("@stdlib/string-base-kebabcase/dist");function o(r){if(!s(r))throw new TypeError(u("1Oj3B",r));return n(r)}i.exports=o});var v=t();module.exports=v;
|
|
2
|
+
/** @license Apache-2.0 */
|
|
3
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../tmp/main.js", "../tmp/index.js"],
|
|
4
|
+
"sourcesContent": ["/** @license Apache-2.0 */\n'use strict';\nvar isString = require( '@stdlib/assert-is-string/dist' ).isPrimitive;\nvar format = require( '@stdlib/error-tools-fmtprodmsg/dist' );\nvar base = require( '@stdlib/string-base-kebabcase/dist' );\nfunction kebabCase(str) {\n\tif ( !isString( str ) ) {\n\t\tthrow new TypeError( format( '1Oj3B', str ) );\n\t}\n\treturn base( str );\n}\nmodule.exports = kebabCase;\n", "/** @license Apache-2.0 */\n'use strict';\nvar main = require( './main.js' );\nmodule.exports = main;\n"],
|
|
5
|
+
"mappings": "2EAAA,IAAAA,EAAAC,EAAA,CAAAC,EAAAC,IAAA,cAEA,IAAIC,EAAW,QAAS,+BAAgC,EAAE,YACtDC,EAAS,QAAS,qCAAsC,EACxDC,EAAO,QAAS,oCAAqC,EACzD,SAASC,EAAUC,EAAK,CACvB,GAAK,CAACJ,EAAUI,CAAI,EACnB,MAAM,IAAI,UAAWH,EAAQ,QAASG,CAAI,CAAE,EAE7C,OAAOF,EAAME,CAAI,CAClB,CACAL,EAAO,QAAUI,ICTjB,IAAIE,EAAO,IACX,OAAO,QAAUA",
|
|
6
|
+
"names": ["require_main", "__commonJSMin", "exports", "module", "isString", "format", "base", "kebabCase", "str", "main"]
|
|
7
|
+
}
|
package/docs/types/index.d.ts
CHANGED
package/lib/index.js
CHANGED
package/lib/main.js
CHANGED
|
@@ -21,16 +21,8 @@
|
|
|
21
21
|
// MODULES //
|
|
22
22
|
|
|
23
23
|
var isString = require( '@stdlib/assert-is-string' ).isPrimitive;
|
|
24
|
-
var
|
|
25
|
-
var
|
|
26
|
-
var trim = require( '@stdlib/string-trim' );
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
// VARIABLES //
|
|
30
|
-
|
|
31
|
-
var RE_WHITESPACE = /\s+/g;
|
|
32
|
-
var RE_SPECIAL = /[!"'(),–.:;<>?`{}|~\/\\\[\]_#$*&^@%]+/g; // eslint-disable-line no-useless-escape
|
|
33
|
-
var RE_CAMEL = /([a-z0-9])([A-Z])/g;
|
|
24
|
+
var format = require( '@stdlib/string-format' );
|
|
25
|
+
var base = require( '@stdlib/string-base-kebabcase' );
|
|
34
26
|
|
|
35
27
|
|
|
36
28
|
// MAIN //
|
|
@@ -39,7 +31,7 @@ var RE_CAMEL = /([a-z0-9])([A-Z])/g;
|
|
|
39
31
|
* Converts a string to kebab case.
|
|
40
32
|
*
|
|
41
33
|
* @param {string} str - string to convert
|
|
42
|
-
* @throws {TypeError} must provide a string
|
|
34
|
+
* @throws {TypeError} must provide a string
|
|
43
35
|
* @returns {string} kebab-cased string
|
|
44
36
|
*
|
|
45
37
|
* @example
|
|
@@ -64,13 +56,9 @@ var RE_CAMEL = /([a-z0-9])([A-Z])/g;
|
|
|
64
56
|
*/
|
|
65
57
|
function kebabCase( str ) {
|
|
66
58
|
if ( !isString( str ) ) {
|
|
67
|
-
throw new TypeError( 'invalid argument. Must provide a string
|
|
59
|
+
throw new TypeError( format( 'invalid argument. Must provide a string. Value: `%s`.', str ) );
|
|
68
60
|
}
|
|
69
|
-
|
|
70
|
-
str = replace( str, RE_CAMEL, '$1 $2' );
|
|
71
|
-
str = trim( str );
|
|
72
|
-
str = replace( str, RE_WHITESPACE, '-' );
|
|
73
|
-
return lowercase( str );
|
|
61
|
+
return base( str );
|
|
74
62
|
}
|
|
75
63
|
|
|
76
64
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stdlib/string-kebabcase",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "Convert a string to kebab case.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -13,9 +13,6 @@
|
|
|
13
13
|
"url": "https://github.com/stdlib-js/stdlib/graphs/contributors"
|
|
14
14
|
}
|
|
15
15
|
],
|
|
16
|
-
"bin": {
|
|
17
|
-
"kebabcase": "./bin/cli"
|
|
18
|
-
},
|
|
19
16
|
"main": "./lib",
|
|
20
17
|
"directories": {
|
|
21
18
|
"benchmark": "./benchmark",
|
|
@@ -40,28 +37,16 @@
|
|
|
40
37
|
"url": "https://github.com/stdlib-js/stdlib/issues"
|
|
41
38
|
},
|
|
42
39
|
"dependencies": {
|
|
43
|
-
"@stdlib/assert-is-
|
|
44
|
-
"@stdlib/
|
|
45
|
-
"@stdlib/
|
|
46
|
-
"@stdlib/
|
|
47
|
-
"@stdlib/process-read-stdin": "^0.0.x",
|
|
48
|
-
"@stdlib/regexp-eol": "^0.0.x",
|
|
49
|
-
"@stdlib/streams-node-stdin": "^0.0.x",
|
|
50
|
-
"@stdlib/string-lowercase": "^0.0.x",
|
|
51
|
-
"@stdlib/string-replace": "^0.0.x",
|
|
52
|
-
"@stdlib/string-trim": "^0.0.x",
|
|
53
|
-
"@stdlib/utils-regexp-from-string": "^0.0.x"
|
|
40
|
+
"@stdlib/assert-is-string": "^0.0.8",
|
|
41
|
+
"@stdlib/string-base-kebabcase": "^0.0.2",
|
|
42
|
+
"@stdlib/string-format": "^0.0.3",
|
|
43
|
+
"@stdlib/error-tools-fmtprodmsg": "^0.0.2"
|
|
54
44
|
},
|
|
55
45
|
"devDependencies": {
|
|
56
|
-
"@stdlib/assert-is-browser": "^0.0.x",
|
|
57
|
-
"@stdlib/assert-is-windows": "^0.0.x",
|
|
58
|
-
"@stdlib/bench": "^0.0.x",
|
|
59
|
-
"@stdlib/process-exec-path": "^0.0.x",
|
|
60
|
-
"@stdlib/string-from-code-point": "^0.0.x",
|
|
61
46
|
"tape": "git+https://github.com/kgryte/tape.git#fix/globby",
|
|
62
47
|
"proxyquire": "^2.0.0",
|
|
63
48
|
"istanbul": "^0.4.1",
|
|
64
|
-
"tap-
|
|
49
|
+
"tap-min": "git+https://github.com/Planeshifter/tap-min.git"
|
|
65
50
|
},
|
|
66
51
|
"engines": {
|
|
67
52
|
"node": ">=0.10.0",
|
|
@@ -93,7 +78,7 @@
|
|
|
93
78
|
],
|
|
94
79
|
"__stdlib__": {},
|
|
95
80
|
"funding": {
|
|
96
|
-
"type": "
|
|
97
|
-
"url": "https://
|
|
81
|
+
"type": "opencollective",
|
|
82
|
+
"url": "https://opencollective.com/stdlib"
|
|
98
83
|
}
|
|
99
84
|
}
|
package/bin/cli
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @license Apache-2.0
|
|
5
|
-
*
|
|
6
|
-
* Copyright (c) 2021 The Stdlib Authors.
|
|
7
|
-
*
|
|
8
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
-
* you may not use this file except in compliance with the License.
|
|
10
|
-
* You may obtain a copy of the License at
|
|
11
|
-
*
|
|
12
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
-
*
|
|
14
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
-
* See the License for the specific language governing permissions and
|
|
18
|
-
* limitations under the License.
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
'use strict';
|
|
22
|
-
|
|
23
|
-
// MODULES //
|
|
24
|
-
|
|
25
|
-
var resolve = require( 'path' ).resolve;
|
|
26
|
-
var readFileSync = require( '@stdlib/fs-read-file' ).sync;
|
|
27
|
-
var CLI = require( '@stdlib/cli-ctor' );
|
|
28
|
-
var stdin = require( '@stdlib/process-read-stdin' );
|
|
29
|
-
var stdinStream = require( '@stdlib/streams-node-stdin' );
|
|
30
|
-
var RE_EOL = require( '@stdlib/regexp-eol' ).REGEXP;
|
|
31
|
-
var isRegExpString = require( '@stdlib/assert-is-regexp-string' );
|
|
32
|
-
var reFromString = require( '@stdlib/utils-regexp-from-string' );
|
|
33
|
-
var kebabcase = require( './../lib' );
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
// MAIN //
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Main execution sequence.
|
|
40
|
-
*
|
|
41
|
-
* @private
|
|
42
|
-
* @returns {void}
|
|
43
|
-
*/
|
|
44
|
-
function main() {
|
|
45
|
-
var split;
|
|
46
|
-
var flags;
|
|
47
|
-
var args;
|
|
48
|
-
var cli;
|
|
49
|
-
|
|
50
|
-
// Create a command-line interface:
|
|
51
|
-
cli = new CLI({
|
|
52
|
-
'pkg': require( './../package.json' ),
|
|
53
|
-
'options': require( './../etc/cli_opts.json' ),
|
|
54
|
-
'help': readFileSync( resolve( __dirname, '..', 'docs', 'usage.txt' ), {
|
|
55
|
-
'encoding': 'utf8'
|
|
56
|
-
})
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
// Get any provided command-line options:
|
|
60
|
-
flags = cli.flags();
|
|
61
|
-
if ( flags.help || flags.version ) {
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
// Get any provided command-line arguments:
|
|
66
|
-
args = cli.args();
|
|
67
|
-
|
|
68
|
-
// Check if we are receiving data from `stdin`...
|
|
69
|
-
if ( !stdinStream.isTTY ) {
|
|
70
|
-
if ( flags.split ) {
|
|
71
|
-
if ( !isRegExpString( flags.split ) ) {
|
|
72
|
-
flags.split = '/'+flags.split+'/';
|
|
73
|
-
}
|
|
74
|
-
split = reFromString( flags.split );
|
|
75
|
-
} else {
|
|
76
|
-
split = RE_EOL;
|
|
77
|
-
}
|
|
78
|
-
return stdin( onRead );
|
|
79
|
-
}
|
|
80
|
-
console.log( kebabcase( args[ 0 ] ) ); // eslint-disable-line no-console
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Callback invoked upon reading from `stdin`.
|
|
84
|
-
*
|
|
85
|
-
* @private
|
|
86
|
-
* @param {(Error|null)} error - error object
|
|
87
|
-
* @param {Buffer} data - data
|
|
88
|
-
* @returns {void}
|
|
89
|
-
*/
|
|
90
|
-
function onRead( error, data ) {
|
|
91
|
-
var lines;
|
|
92
|
-
var i;
|
|
93
|
-
if ( error ) {
|
|
94
|
-
return cli.error( error );
|
|
95
|
-
}
|
|
96
|
-
lines = data.toString().split( split );
|
|
97
|
-
|
|
98
|
-
// Remove any trailing separators (e.g., trailing newline)...
|
|
99
|
-
if ( lines[ lines.length-1 ] === '' ) {
|
|
100
|
-
lines.pop();
|
|
101
|
-
}
|
|
102
|
-
for ( i = 0; i < lines.length; i++ ) {
|
|
103
|
-
console.log( kebabcase( lines[ i ] ) ); // eslint-disable-line no-console
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
main();
|
package/docs/repl.txt
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
{{alias}}( str )
|
|
3
|
-
Converts a string to kebab case.
|
|
4
|
-
|
|
5
|
-
Parameters
|
|
6
|
-
----------
|
|
7
|
-
str: string
|
|
8
|
-
Input string.
|
|
9
|
-
|
|
10
|
-
Returns
|
|
11
|
-
-------
|
|
12
|
-
out: string
|
|
13
|
-
Kebab-cased string.
|
|
14
|
-
|
|
15
|
-
Examples
|
|
16
|
-
--------
|
|
17
|
-
> var out = {{alias}}( 'Hello World!' )
|
|
18
|
-
'hello-world'
|
|
19
|
-
> out = {{alias}}( 'I am a tiny little teapot' )
|
|
20
|
-
'i-am-a-tiny-little-teapot'
|
|
21
|
-
|
|
22
|
-
See Also
|
|
23
|
-
--------
|
package/docs/types/test.ts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @license Apache-2.0
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) 2021 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
|
-
import kebabcase = require( './index' );
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
// TESTS //
|
|
23
|
-
|
|
24
|
-
// The function returns a string...
|
|
25
|
-
{
|
|
26
|
-
kebabcase( 'Hello World!' ); // $ExpectType string
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
// The function does not compile if provided a value other than a string...
|
|
30
|
-
{
|
|
31
|
-
kebabcase( true ); // $ExpectError
|
|
32
|
-
kebabcase( false ); // $ExpectError
|
|
33
|
-
kebabcase( null ); // $ExpectError
|
|
34
|
-
kebabcase( undefined ); // $ExpectError
|
|
35
|
-
kebabcase( 5 ); // $ExpectError
|
|
36
|
-
kebabcase( [] ); // $ExpectError
|
|
37
|
-
kebabcase( {} ); // $ExpectError
|
|
38
|
-
kebabcase( ( x: number ): number => x ); // $ExpectError
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
// The function does not compile if provided insufficient arguments...
|
|
42
|
-
{
|
|
43
|
-
kebabcase(); // $ExpectError
|
|
44
|
-
}
|
package/docs/usage.txt
DELETED