@stryke/string-format 0.9.2 → 0.11.0

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/dist/acronyms.cjs CHANGED
@@ -86,6 +86,9 @@ const ACRONYMS = exports.ACRONYMS = {
86
86
  BOM: {
87
87
  description: "Bill of Materials / Byte Order Mark"
88
88
  },
89
+ BSON: {
90
+ description: "Binary JSON"
91
+ },
89
92
  BYOD: {
90
93
  description: "Bring Your Own Device"
91
94
  },
@@ -175,25 +178,21 @@ const ACRONYMS = exports.ACRONYMS = {
175
178
  DEA: {
176
179
  description: "Drug Enforcement Administration"
177
180
  },
178
- DEVOPS: {
179
- description: "Development Operations",
180
- display: "DevOps"
181
- },
182
181
  DEVENV: {
183
182
  description: "Devenv",
184
183
  display: "Devenv"
185
184
  },
186
- DOTENV: {
187
- description: "Dotenv (.env)",
188
- display: "Dotenv"
185
+ DEVOPS: {
186
+ description: "Development Operations",
187
+ display: "DevOps"
188
+ },
189
+ DHS: {
190
+ description: "Department of Homeland Security"
189
191
  },
190
192
  DIRENV: {
191
193
  description: "DirEnv",
192
194
  display: "DirEnv"
193
195
  },
194
- DHS: {
195
- description: "Department of Homeland Security"
196
- },
197
196
  DNC: {
198
197
  description: "Democratic National Committee / Do Not Call"
199
198
  },
@@ -211,12 +210,16 @@ const ACRONYMS = exports.ACRONYMS = {
211
210
  description: "Department of Justice",
212
211
  display: "DoJ"
213
212
  },
213
+ DOM: {
214
+ description: "Document Object Model"
215
+ },
214
216
  DOT: {
215
217
  description: "Department of Transportation",
216
218
  display: "DoT"
217
219
  },
218
- DOM: {
219
- description: "Document Object Model"
220
+ DOTENV: {
221
+ description: "Dotenv (.env)",
222
+ display: "Dotenv"
220
223
  },
221
224
  DR: {
222
225
  description: "Disaster Recovery"
@@ -269,6 +272,10 @@ const ACRONYMS = exports.ACRONYMS = {
269
272
  EULA: {
270
273
  description: "End User License Agreement"
271
274
  },
275
+ FAAS: {
276
+ description: "Function as a Service",
277
+ display: "FaaS"
278
+ },
272
279
  FAQ: {
273
280
  description: "Frequently Asked Questions"
274
281
  },
@@ -296,10 +303,6 @@ const ACRONYMS = exports.ACRONYMS = {
296
303
  FTP: {
297
304
  description: "File Transfer Protocol"
298
305
  },
299
- FAAS: {
300
- description: "Function as a Service",
301
- display: "FaaS"
302
- },
303
306
  GC: {
304
307
  description: "Garbage Collection"
305
308
  },
@@ -364,6 +367,13 @@ const ACRONYMS = exports.ACRONYMS = {
364
367
  description: "HyperText Transfer Protocol Version 2 (HTTP/2)",
365
368
  display: "HTTP2"
366
369
  },
370
+ "HTTP/3": {
371
+ description: "HyperText Transfer Protocol Version 3 (HTTP/3)"
372
+ },
373
+ "HTTP/3.0": {
374
+ description: "HyperText Transfer Protocol Version 3 (HTTP/3)",
375
+ display: "HTTP3"
376
+ },
367
377
  HTTP2: {
368
378
  description: "HyperText Transfer Protocol Version 2 (HTTP/2)",
369
379
  display: "HTTP2"
@@ -372,13 +382,6 @@ const ACRONYMS = exports.ACRONYMS = {
372
382
  description: "HyperText Transfer Protocol Version 2 (HTTP/2)",
373
383
  display: "HTTP2"
374
384
  },
375
- "HTTP/3": {
376
- description: "HyperText Transfer Protocol Version 3 (HTTP/3)"
377
- },
378
- "HTTP/3.0": {
379
- description: "HyperText Transfer Protocol Version 3 (HTTP/3)",
380
- display: "HTTP3"
381
- },
382
385
  HTTP3: {
383
386
  description: "HyperText Transfer Protocol Version 3 (HTTP/3)",
384
387
  display: "HTTP3"
@@ -397,6 +400,13 @@ const ACRONYMS = exports.ACRONYMS = {
397
400
  description: "HyperText Transfer Protocol Secure Version 2 (HTTPS/2)",
398
401
  display: "HTTPS2"
399
402
  },
403
+ "HTTPS/3": {
404
+ description: "HyperText Transfer Protocol Secure Version 3 (HTTPS/3)"
405
+ },
406
+ "HTTPS/3.0": {
407
+ description: "HyperText Transfer Protocol Secure Version 3 (HTTPS/3)",
408
+ display: "HTTPS3"
409
+ },
400
410
  HTTPS2: {
401
411
  description: "HyperText Transfer Protocol Secure Version 2 (HTTPS/2)",
402
412
  display: "HTTPS2"
@@ -405,13 +415,6 @@ const ACRONYMS = exports.ACRONYMS = {
405
415
  description: "HyperText Transfer Protocol Secure Version 2 (HTTPS/2)",
406
416
  display: "HTTPS2"
407
417
  },
408
- "HTTPS/3": {
409
- description: "HyperText Transfer Protocol Secure Version 3 (HTTPS/3)"
410
- },
411
- "HTTPS/3.0": {
412
- description: "HyperText Transfer Protocol Secure Version 3 (HTTPS/3)",
413
- display: "HTTPS3"
414
- },
415
418
  HTTPS3: {
416
419
  description: "HyperText Transfer Protocol Secure Version 3 (HTTPS/3)",
417
420
  display: "HTTPS3"
@@ -420,6 +423,10 @@ const ACRONYMS = exports.ACRONYMS = {
420
423
  description: "HyperText Transfer Protocol Secure Version 3 (HTTPS/3)",
421
424
  display: "HTTPS3"
422
425
  },
426
+ IAAS: {
427
+ description: "Infrastructure as a Service",
428
+ display: "IaaS"
429
+ },
423
430
  IAM: {
424
431
  description: "Identity and Access Management"
425
432
  },
@@ -429,10 +436,6 @@ const ACRONYMS = exports.ACRONYMS = {
429
436
  IAMT: {
430
437
  description: "Identity and Access Management Tool"
431
438
  },
432
- IAAS: {
433
- description: "Infrastructure as a Service",
434
- display: "IaaS"
435
- },
436
439
  ID: {
437
440
  description: "Identifier",
438
441
  display: "Id"
@@ -443,6 +446,9 @@ const ACRONYMS = exports.ACRONYMS = {
443
446
  IMAP: {
444
447
  description: "Internet Message Access Protocol"
445
448
  },
449
+ IO: {
450
+ description: "Input/Output"
451
+ },
446
452
  IP: {
447
453
  description: "Internet Protocol"
448
454
  },
@@ -456,9 +462,6 @@ const ACRONYMS = exports.ACRONYMS = {
456
462
  description: "Intelligence Quotient",
457
463
  display: "IQ"
458
464
  },
459
- IO: {
460
- description: "Input/Output"
461
- },
462
465
  IOT: {
463
466
  description: "Internet of Things",
464
467
  display: "IoT"
@@ -512,6 +515,9 @@ const ACRONYMS = exports.ACRONYMS = {
512
515
  MLOps: {
513
516
  description: "Machine Learning Operations"
514
517
  },
518
+ MPA: {
519
+ description: "Multi-Page Application"
520
+ },
515
521
  MST: {
516
522
  description: "Mountain Standard Time"
517
523
  },
@@ -527,12 +533,12 @@ const ACRONYMS = exports.ACRONYMS = {
527
533
  NAS: {
528
534
  description: "Network Attached Storage"
529
535
  },
530
- NASCAR: {
531
- description: "National Association for Stock Car Auto Racing"
532
- },
533
536
  NASA: {
534
537
  description: "National Aeronautics and Space Administration"
535
538
  },
539
+ NASCAR: {
540
+ description: "National Association for Stock Car Auto Racing"
541
+ },
536
542
  NAT: {
537
543
  description: "Network Address Translation"
538
544
  },
@@ -594,18 +600,25 @@ const ACRONYMS = exports.ACRONYMS = {
594
600
  OS: {
595
601
  description: "Operating System"
596
602
  },
597
- OSS: {
598
- description: "Open Source Software"
599
- },
600
603
  OSINT: {
601
604
  description: "Open Source Intelligence"
602
605
  },
606
+ OSS: {
607
+ description: "Open Source Software"
608
+ },
603
609
  OTP: {
604
610
  description: "One-Time Password"
605
611
  },
606
612
  P2P: {
607
613
  description: "Peer to Peer"
608
614
  },
615
+ PAAS: {
616
+ description: "Platform as a Service",
617
+ display: "PaaS"
618
+ },
619
+ PCI: {
620
+ description: "Payment Card Industry"
621
+ },
609
622
  PDP: {
610
623
  description: "Policy Decision Point / Product Detail Page"
611
624
  },
@@ -618,25 +631,18 @@ const ACRONYMS = exports.ACRONYMS = {
618
631
  POTUS: {
619
632
  description: "President of the United States"
620
633
  },
634
+ PP: {
635
+ description: "Pages / PayPal / Percentage Points"
636
+ },
621
637
  PST: {
622
638
  description: "Pacific Standard Time"
623
639
  },
624
640
  PTO: {
625
641
  description: "Paid Time Off / Power Take-Off"
626
642
  },
627
- PAAS: {
628
- description: "Platform as a Service",
629
- display: "PaaS"
630
- },
631
- PCI: {
632
- description: "Payment Card Industry"
633
- },
634
643
  PKI: {
635
644
  description: "Public Key Infrastructure"
636
645
  },
637
- PP: {
638
- description: "Pages / PayPal / Percentage Points"
639
- },
640
646
  PWA: {
641
647
  description: "Progressive Web App"
642
648
  },
@@ -673,12 +679,15 @@ const ACRONYMS = exports.ACRONYMS = {
673
679
  RPA: {
674
680
  description: "Robotic Process Automation"
675
681
  },
676
- RUM: {
677
- description: "Real User Monitoring"
682
+ RSC: {
683
+ description: "React Server Components"
678
684
  },
679
685
  RSS: {
680
686
  description: "Really Simple Syndication"
681
687
  },
688
+ RUM: {
689
+ description: "Real User Monitoring"
690
+ },
682
691
  S3: {
683
692
  description: "Simple Storage Service (S3)"
684
693
  },
@@ -721,11 +730,14 @@ const ACRONYMS = exports.ACRONYMS = {
721
730
  SOAP: {
722
731
  description: "Simple Object Access Protocol"
723
732
  },
733
+ SOA: {
734
+ description: "Service Oriented Architecture"
735
+ },
724
736
  SOC: {
725
737
  description: "Security Operations Center / System on Chip"
726
738
  },
727
- SOA: {
728
- description: "Service Oriented Architecture"
739
+ SPA: {
740
+ description: "Single Page Application"
729
741
  },
730
742
  SPDY: {
731
743
  description: 'Speedy (pronounced "SPeeDY")'
@@ -748,15 +760,18 @@ const ACRONYMS = exports.ACRONYMS = {
748
760
  SSDL: {
749
761
  description: "Secure Software Development Lifecycle"
750
762
  },
763
+ SSG: {
764
+ description: "Static Site Generation"
765
+ },
766
+ SSR: {
767
+ description: "Server Side Rendering"
768
+ },
751
769
  SSO: {
752
770
  description: "Single Sign-On"
753
771
  },
754
772
  SSL: {
755
773
  description: "Secure Sockets Layer"
756
774
  },
757
- SSR: {
758
- description: "Server Side Rendering"
759
- },
760
775
  TDD: {
761
776
  description: "Test Driven Development"
762
777
  },
@@ -865,12 +880,12 @@ const ACRONYMS = exports.ACRONYMS = {
865
880
  XR: {
866
881
  description: "Extended Reality"
867
882
  },
868
- YMCA: {
869
- description: "Young Men's Christian Association"
870
- },
871
883
  YAML: {
872
884
  description: "YAML Ain't Markup Language"
873
885
  },
886
+ YMCA: {
887
+ description: "Young Men's Christian Association"
888
+ },
874
889
  YWCA: {
875
890
  description: "Young Women's Christian Association"
876
891
  },
package/dist/acronyms.mjs CHANGED
@@ -1 +1 @@
1
- export const ACRONYMS={"2D":{description:"Two-Dimensional",display:"2d"},"3D":{description:"Three-Dimensional",display:"3d"},"4D":{description:"Four-Dimensional",display:"4d"},"5G":{description:"Fifth Generation (mobile networks)"},"6G":{description:"Sixth Generation (mobile networks)"},"7G":{description:"Seventh Generation (mobile networks)"},"8G":{description:"Eighth Generation (mobile networks)"},ACID:{description:"Atomicity, Consistency, Isolation, Durability"},AITA:{description:"Am I The Asshole"},AES:{description:"Advanced Encryption Standard"},AI:{description:"Artificial Intelligence"},AJAX:{description:"Asynchronous JavaScript and XML"},API:{description:"Application Programming Interface"},AR:{description:"Augmented Reality"},ASCII:{description:"American Standard Code for Information Interchange"},ATF:{description:"Bureau of Alcohol, Tobacco, Firearms and Explosives"},ATM:{description:"Automated Teller Machine"},B2B:{description:"Business to Business"},B2C:{description:"Business to Consumer"},BATFE:{description:"Bureau of Alcohol, Tobacco, Firearms and Explosives"},BFF:{description:"Best Friends Forever"},BFFS:{description:"Best Friends Forever (plural)"},BI:{description:"Business Intelligence"},BIOS:{description:"Basic Input/Output System"},BGP:{description:"Border Gateway Protocol"},BOM:{description:"Bill of Materials / Byte Order Mark"},BYOD:{description:"Bring Your Own Device"},C2C:{description:"Consumer to Consumer"},CAGR:{description:"Compound Annual Growth Rate"},CAPTCHA:{description:"Completely Automated Public Turing test to tell Computers and Humans Apart"},CD:{description:"Continuous Delivery / Compact Disc"},CDN:{description:"Content Delivery Network"},CDP:{description:"Customer Data Platform"},CDT:{description:"Central Daylight Time"},CIA:{description:"Central Intelligence Agency"},CI:{description:"Continuous Integration"},"CI/CD":{description:"Continuous Integration/Continuous Delivery"},CIAM:{description:"Customer Identity and Access Management"},CICD:{description:"Continuous Integration Continuous Delivery",display:"CI/CD"},CLI:{description:"Command Line Interface"},CMDB:{description:"Configuration Management Database"},CORS:{description:"Cross-Origin Resource Sharing"},CPA:{description:"Certified Public Accountant"},CPU:{description:"Central Processing Unit"},CRUD:{description:"Create, Read, Update, Delete"},CSR:{description:"Certificate Signing Request / Corporate Social Responsibility"},CSS:{description:"Cascading Style Sheets"},CST:{description:"Central Standard Time"},CTA:{description:"Call To Action"},CWD:{description:"Current Working Directory"},CX:{description:"Customer Experience"},DAG:{description:"Directed Acyclic Graph"},DBMS:{description:"Database Management System"},DDOS:{description:"Distributed Denial of Service",display:"DDoS"},DEA:{description:"Drug Enforcement Administration"},DEVOPS:{description:"Development Operations",display:"DevOps"},DEVENV:{description:"Devenv",display:"Devenv"},DOTENV:{description:"Dotenv (.env)",display:"Dotenv"},DIRENV:{description:"DirEnv",display:"DirEnv"},DHS:{description:"Department of Homeland Security"},DNC:{description:"Democratic National Committee / Do Not Call"},DNS:{description:"Domain Name System"},DNSSEC:{description:"Domain Name System Security Extensions"},DOD:{description:"Department of Defense",display:"DoD"},DOJ:{description:"Department of Justice",display:"DoJ"},DOT:{description:"Department of Transportation",display:"DoT"},DOM:{description:"Document Object Model"},DR:{description:"Disaster Recovery"},DRM:{description:"Digital Rights Management"},DSN:{description:"Data Source Name"},DWH:{description:"Data Warehouse"},E2E:{description:"End to End"},EAI:{description:"Enterprise Application Integration"},EDT:{description:"Eastern Daylight Time"},EEA:{description:"European Economic Area"},EKS:{description:"Elastic Kubernetes Service"},EOF:{description:"End Of File"},EOD:{description:"End Of Day / Explosive Ordnance Disposal"},EPA:{description:"Environmental Protection Agency"},ER:{description:"Emergency Room / Entity Relationship"},EST:{description:"Eastern Standard Time"},ETC:{description:"Et Cetera"},ETL:{description:"Extract, Transform, Load"},EULA:{description:"End User License Agreement"},FAQ:{description:"Frequently Asked Questions"},FBI:{description:"Federal Bureau of Investigation"},FCC:{description:"Federal Communications Commission"},FDA:{description:"Food and Drug Administration"},FIDO:{description:"Fast IDentity Online"},FLOTUS:{description:"First Lady of the United States"},FQDN:{description:"Fully Qualified Domain Name"},FTC:{description:"Federal Trade Commission"},FTP:{description:"File Transfer Protocol"},FAAS:{description:"Function as a Service",display:"FaaS"},GC:{description:"Garbage Collection"},GCP:{description:"Google Cloud Platform"},GDPR:{description:"General Data Protection Regulation"},GMT:{description:"Greenwich Mean Time"},GOP:{description:"Grand Old Party"},GPU:{description:"Graphics Processing Unit"},GUID:{description:"Globally Unique Identifier"},GUI:{description:"Graphical User Interface"},GZIP:{description:"GNU Zip"},HCI:{description:"Human Computer Interaction / Hyper-Converged Infrastructure"},HDD:{description:"Hard Disk Drive"},HDFS:{description:"Hadoop Distributed File System"},HHS:{description:"Health and Human Services"},HIPAA:{description:"Health Insurance Portability and Accountability Act"},HMAC:{description:"Hash-based Message Authentication Code"},HOTP:{description:"HMAC-based One-Time Password"},HSM:{description:"Hardware Security Module"},HTML:{description:"HyperText Markup Language"},HTTP:{description:"HyperText Transfer Protocol (HTTP)"},"HTTP/2":{description:"HyperText Transfer Protocol Version 2 (HTTP/2)"},"HTTP/2.0":{description:"HyperText Transfer Protocol Version 2 (HTTP/2)",display:"HTTP2"},HTTP2:{description:"HyperText Transfer Protocol Version 2 (HTTP/2)",display:"HTTP2"},"HTTP2.0":{description:"HyperText Transfer Protocol Version 2 (HTTP/2)",display:"HTTP2"},"HTTP/3":{description:"HyperText Transfer Protocol Version 3 (HTTP/3)"},"HTTP/3.0":{description:"HyperText Transfer Protocol Version 3 (HTTP/3)",display:"HTTP3"},HTTP3:{description:"HyperText Transfer Protocol Version 3 (HTTP/3)",display:"HTTP3"},"HTTP3.0":{description:"HyperText Transfer Protocol Version 3 (HTTP/3)",display:"HTTP3"},HTTPS:{description:"HyperText Transfer Protocol Secure (HTTPS)"},"HTTPS/2":{description:"HyperText Transfer Protocol Secure Version 2 (HTTPS/2)"},"HTTPS/2.0":{description:"HyperText Transfer Protocol Secure Version 2 (HTTPS/2)",display:"HTTPS2"},HTTPS2:{description:"HyperText Transfer Protocol Secure Version 2 (HTTPS/2)",display:"HTTPS2"},"HTTPS2.0":{description:"HyperText Transfer Protocol Secure Version 2 (HTTPS/2)",display:"HTTPS2"},"HTTPS/3":{description:"HyperText Transfer Protocol Secure Version 3 (HTTPS/3)"},"HTTPS/3.0":{description:"HyperText Transfer Protocol Secure Version 3 (HTTPS/3)",display:"HTTPS3"},HTTPS3:{description:"HyperText Transfer Protocol Secure Version 3 (HTTPS/3)",display:"HTTPS3"},"HTTPS3.0":{description:"HyperText Transfer Protocol Secure Version 3 (HTTPS/3)",display:"HTTPS3"},IAM:{description:"Identity and Access Management"},IAMM:{description:"Identity and Access Management and Monitoring"},IAMT:{description:"Identity and Access Management Tool"},IAAS:{description:"Infrastructure as a Service",display:"IaaS"},ID:{description:"Identifier",display:"Id"},IFTTT:{description:"If This Then That"},IMAP:{description:"Internet Message Access Protocol"},IP:{description:"Internet Protocol"},IPFS:{description:"InterPlanetary File System"},IPS:{description:"Intrusion Prevention System"},IQ:{description:"Intelligence Quotient",display:"IQ"},IO:{description:"Input/Output"},IOT:{description:"Internet of Things",display:"IoT"},JSON:{description:"JavaScript Object Notation"},JSONP:{description:"JSON with Padding"},JWT:{description:"JSON Web Token"},K8S:{description:"Kubernetes",display:"K8s"},KMS:{description:"Key Management Service"},KPI:{description:"Key Performance Indicator"},KV:{description:"Key Value"},LAN:{description:"Local Area Network"},LHS:{description:"Left Hand Side"},LPGA:{description:"Ladies Professional Golf Association"},LXC:{description:"Linux Containers"},MDT:{description:"Mountain Daylight Time"},MFA:{description:"Multi-Factor Authentication"},ML:{description:"Machine Learning"},MLB:{description:"Major League Baseball"},MLOps:{description:"Machine Learning Operations"},MST:{description:"Mountain Standard Time"},MVC:{description:"Model View Controller"},MVP:{description:"Minimum Viable Product / Most Valuable Player"},NAIA:{description:"National Association of Intercollegiate Athletics"},NAS:{description:"Network Attached Storage"},NASCAR:{description:"National Association for Stock Car Auto Racing"},NASA:{description:"National Aeronautics and Space Administration"},NAT:{description:"Network Address Translation"},NBA:{description:"National Basketball Association"},NCAA:{description:"National Collegiate Athletic Association"},NDA:{description:"Non-Disclosure Agreement"},NFS:{description:"Network File System"},NHL:{description:"National Hockey League"},NIST:{description:"National Institute of Standards and Technology"},NLP:{description:"Natural Language Processing"},NPS:{description:"Net Promoter Score"},NRA:{description:"National Rifle Association"},NSFW:{description:"Not Safe For Work"},NX:{description:"Nx",display:"Nx"},OCR:{description:"Optical Character Recognition"},OEM:{description:"Original Equipment Manufacturer"},OKR:{description:"Objectives and Key Results"},OLAP:{description:"Online Analytical Processing"},OLTP:{description:"Online Transaction Processing"},OOP:{description:"Object Oriented Programming"},ORM:{description:"Object Relational Mapping"},OS:{description:"Operating System"},OSS:{description:"Open Source Software"},OSINT:{description:"Open Source Intelligence"},OTP:{description:"One-Time Password"},P2P:{description:"Peer to Peer"},PDP:{description:"Policy Decision Point / Product Detail Page"},PDT:{description:"Pacific Daylight Time"},PGA:{description:"Professional Golfers' Association"},POTUS:{description:"President of the United States"},PST:{description:"Pacific Standard Time"},PTO:{description:"Paid Time Off / Power Take-Off"},PAAS:{description:"Platform as a Service",display:"PaaS"},PCI:{description:"Payment Card Industry"},PKI:{description:"Public Key Infrastructure"},PP:{description:"Pages / PayPal / Percentage Points"},PWA:{description:"Progressive Web App"},PX:{description:"Pixel"},QA:{description:"Quality Assurance"},R2:{description:"R2"},RAID:{description:"Redundant Array of Independent Disks"},RAM:{description:"Random Access Memory"},RDS:{description:"Relational Database Service"},REST:{description:"Representational State Transfer"},RHS:{description:"Right Hand Side"},ROI:{description:"Return on Investment"},RPC:{description:"Remote Procedure Call"},RPA:{description:"Robotic Process Automation"},RUM:{description:"Real User Monitoring"},RSS:{description:"Really Simple Syndication"},S3:{description:"Simple Storage Service (S3)"},SAN:{description:"Storage Area Network"},SASE:{description:"Secure Access Service Edge"},SCOTUS:{description:"Supreme Court of the United States"},SDLC:{description:"Software Development Life Cycle"},SDK:{description:"Software Development Kit"},SEC:{description:"Securities and Exchange Commission"},SEO:{description:"Search Engine Optimization"},SFTP:{description:"SSH File Transfer Protocol / Secure File Transfer Protocol"},SIEM:{description:"Security Information and Event Management"},SLA:{description:"Service Level Agreement"},SMB:{description:"Server Message Block / Small and Medium Business"},SMTP:{description:"Simple Mail Transfer Protocol"},SOAP:{description:"Simple Object Access Protocol"},SOC:{description:"Security Operations Center / System on Chip"},SOA:{description:"Service Oriented Architecture"},SPDY:{description:'Speedy (pronounced "SPeeDY")'},SPF:{description:"Sender Policy Framework"},SQL:{description:"Structured Query Language"},SRV:{description:"Service"},SRE:{description:"Site Reliability Engineering"},SSH:{description:"Secure Shell"},SSDL:{description:"Secure Software Development Lifecycle"},SSO:{description:"Single Sign-On"},SSL:{description:"Secure Sockets Layer"},SSR:{description:"Server Side Rendering"},TDD:{description:"Test Driven Development"},TLD:{description:"Top Level Domain"},TLS:{description:"Transport Layer Security"},"TLS1.3":{description:"Transport Layer Security 1.3"},TOTP:{description:"Time-based One-Time Password"},TRPC:{description:"TypeScript Remote Procedure Call"},TSA:{description:"Transportation Security Administration"},TTL:{description:"Time To Live"},UDP:{description:"User Datagram Protocol"},UI:{description:"User Interface"},UID:{description:"Unique Identifier"},URI:{description:"Uniform Resource Identifier"},URL:{description:"Uniform Resource Locator"},USOPC:{description:"United States Olympic & Paralympic Committee"},USPS:{description:"United States Postal Service"},USTA:{description:"United States Tennis Association"},UTF:{description:"Unicode Transformation Format"},UTC:{description:"Coordinated Universal Time"},UUID:{description:"Universally Unique Identifier"},UX:{description:"User Experience"},VM:{description:"Virtual Machine"},VLAN:{description:"Virtual Local Area Network"},VPN:{description:"Virtual Private Network"},VPPA:{description:"Video Privacy Protection Act"},VR:{description:"Virtual Reality"},WAF:{description:"Web Application Firewall"},WAN:{description:"Wide Area Network"},WNBA:{description:"Women's National Basketball Association"},WLAN:{description:"Wireless Local Area Network"},WPA:{description:"Wi-Fi Protected Access"},XACML:{description:"eXtensible Access Control Markup Language"},XDG:{description:"Cross-Desktop Group"},XML:{description:"eXtensible Markup Language"},XSRF:{description:"Cross-Site Request Forgery"},XSS:{description:"Cross-Site Scripting"},XR:{description:"Extended Reality"},YMCA:{description:"Young Men's Christian Association"},YAML:{description:"YAML Ain't Markup Language"},YWCA:{description:"Young Women's Christian Association"},ZTA:{description:"Zero Trust Architecture"}},ACRONYM_DISPLAY=Object.fromEntries(Object.entries(ACRONYMS).map(([e,i])=>[e,i.display??e])),ACRONYM_DESCRIPTION=Object.fromEntries(Object.entries(ACRONYMS).map(([e,i])=>[e,i.description])),ACRONYM_LIST=Object.keys(ACRONYMS);
1
+ export const ACRONYMS={"2D":{description:"Two-Dimensional",display:"2d"},"3D":{description:"Three-Dimensional",display:"3d"},"4D":{description:"Four-Dimensional",display:"4d"},"5G":{description:"Fifth Generation (mobile networks)"},"6G":{description:"Sixth Generation (mobile networks)"},"7G":{description:"Seventh Generation (mobile networks)"},"8G":{description:"Eighth Generation (mobile networks)"},ACID:{description:"Atomicity, Consistency, Isolation, Durability"},AITA:{description:"Am I The Asshole"},AES:{description:"Advanced Encryption Standard"},AI:{description:"Artificial Intelligence"},AJAX:{description:"Asynchronous JavaScript and XML"},API:{description:"Application Programming Interface"},AR:{description:"Augmented Reality"},ASCII:{description:"American Standard Code for Information Interchange"},ATF:{description:"Bureau of Alcohol, Tobacco, Firearms and Explosives"},ATM:{description:"Automated Teller Machine"},B2B:{description:"Business to Business"},B2C:{description:"Business to Consumer"},BATFE:{description:"Bureau of Alcohol, Tobacco, Firearms and Explosives"},BFF:{description:"Best Friends Forever"},BFFS:{description:"Best Friends Forever (plural)"},BI:{description:"Business Intelligence"},BIOS:{description:"Basic Input/Output System"},BGP:{description:"Border Gateway Protocol"},BOM:{description:"Bill of Materials / Byte Order Mark"},BSON:{description:"Binary JSON"},BYOD:{description:"Bring Your Own Device"},C2C:{description:"Consumer to Consumer"},CAGR:{description:"Compound Annual Growth Rate"},CAPTCHA:{description:"Completely Automated Public Turing test to tell Computers and Humans Apart"},CD:{description:"Continuous Delivery / Compact Disc"},CDN:{description:"Content Delivery Network"},CDP:{description:"Customer Data Platform"},CDT:{description:"Central Daylight Time"},CIA:{description:"Central Intelligence Agency"},CI:{description:"Continuous Integration"},"CI/CD":{description:"Continuous Integration/Continuous Delivery"},CIAM:{description:"Customer Identity and Access Management"},CICD:{description:"Continuous Integration Continuous Delivery",display:"CI/CD"},CLI:{description:"Command Line Interface"},CMDB:{description:"Configuration Management Database"},CORS:{description:"Cross-Origin Resource Sharing"},CPA:{description:"Certified Public Accountant"},CPU:{description:"Central Processing Unit"},CRUD:{description:"Create, Read, Update, Delete"},CSR:{description:"Certificate Signing Request / Corporate Social Responsibility"},CSS:{description:"Cascading Style Sheets"},CST:{description:"Central Standard Time"},CTA:{description:"Call To Action"},CWD:{description:"Current Working Directory"},CX:{description:"Customer Experience"},DAG:{description:"Directed Acyclic Graph"},DBMS:{description:"Database Management System"},DDOS:{description:"Distributed Denial of Service",display:"DDoS"},DEA:{description:"Drug Enforcement Administration"},DEVENV:{description:"Devenv",display:"Devenv"},DEVOPS:{description:"Development Operations",display:"DevOps"},DHS:{description:"Department of Homeland Security"},DIRENV:{description:"DirEnv",display:"DirEnv"},DNC:{description:"Democratic National Committee / Do Not Call"},DNS:{description:"Domain Name System"},DNSSEC:{description:"Domain Name System Security Extensions"},DOD:{description:"Department of Defense",display:"DoD"},DOJ:{description:"Department of Justice",display:"DoJ"},DOM:{description:"Document Object Model"},DOT:{description:"Department of Transportation",display:"DoT"},DOTENV:{description:"Dotenv (.env)",display:"Dotenv"},DR:{description:"Disaster Recovery"},DRM:{description:"Digital Rights Management"},DSN:{description:"Data Source Name"},DWH:{description:"Data Warehouse"},E2E:{description:"End to End"},EAI:{description:"Enterprise Application Integration"},EDT:{description:"Eastern Daylight Time"},EEA:{description:"European Economic Area"},EKS:{description:"Elastic Kubernetes Service"},EOF:{description:"End Of File"},EOD:{description:"End Of Day / Explosive Ordnance Disposal"},EPA:{description:"Environmental Protection Agency"},ER:{description:"Emergency Room / Entity Relationship"},EST:{description:"Eastern Standard Time"},ETC:{description:"Et Cetera"},ETL:{description:"Extract, Transform, Load"},EULA:{description:"End User License Agreement"},FAAS:{description:"Function as a Service",display:"FaaS"},FAQ:{description:"Frequently Asked Questions"},FBI:{description:"Federal Bureau of Investigation"},FCC:{description:"Federal Communications Commission"},FDA:{description:"Food and Drug Administration"},FIDO:{description:"Fast IDentity Online"},FLOTUS:{description:"First Lady of the United States"},FQDN:{description:"Fully Qualified Domain Name"},FTC:{description:"Federal Trade Commission"},FTP:{description:"File Transfer Protocol"},GC:{description:"Garbage Collection"},GCP:{description:"Google Cloud Platform"},GDPR:{description:"General Data Protection Regulation"},GMT:{description:"Greenwich Mean Time"},GOP:{description:"Grand Old Party"},GPU:{description:"Graphics Processing Unit"},GUID:{description:"Globally Unique Identifier"},GUI:{description:"Graphical User Interface"},GZIP:{description:"GNU Zip"},HCI:{description:"Human Computer Interaction / Hyper-Converged Infrastructure"},HDD:{description:"Hard Disk Drive"},HDFS:{description:"Hadoop Distributed File System"},HHS:{description:"Health and Human Services"},HIPAA:{description:"Health Insurance Portability and Accountability Act"},HMAC:{description:"Hash-based Message Authentication Code"},HOTP:{description:"HMAC-based One-Time Password"},HSM:{description:"Hardware Security Module"},HTML:{description:"HyperText Markup Language"},HTTP:{description:"HyperText Transfer Protocol (HTTP)"},"HTTP/2":{description:"HyperText Transfer Protocol Version 2 (HTTP/2)"},"HTTP/2.0":{description:"HyperText Transfer Protocol Version 2 (HTTP/2)",display:"HTTP2"},"HTTP/3":{description:"HyperText Transfer Protocol Version 3 (HTTP/3)"},"HTTP/3.0":{description:"HyperText Transfer Protocol Version 3 (HTTP/3)",display:"HTTP3"},HTTP2:{description:"HyperText Transfer Protocol Version 2 (HTTP/2)",display:"HTTP2"},"HTTP2.0":{description:"HyperText Transfer Protocol Version 2 (HTTP/2)",display:"HTTP2"},HTTP3:{description:"HyperText Transfer Protocol Version 3 (HTTP/3)",display:"HTTP3"},"HTTP3.0":{description:"HyperText Transfer Protocol Version 3 (HTTP/3)",display:"HTTP3"},HTTPS:{description:"HyperText Transfer Protocol Secure (HTTPS)"},"HTTPS/2":{description:"HyperText Transfer Protocol Secure Version 2 (HTTPS/2)"},"HTTPS/2.0":{description:"HyperText Transfer Protocol Secure Version 2 (HTTPS/2)",display:"HTTPS2"},"HTTPS/3":{description:"HyperText Transfer Protocol Secure Version 3 (HTTPS/3)"},"HTTPS/3.0":{description:"HyperText Transfer Protocol Secure Version 3 (HTTPS/3)",display:"HTTPS3"},HTTPS2:{description:"HyperText Transfer Protocol Secure Version 2 (HTTPS/2)",display:"HTTPS2"},"HTTPS2.0":{description:"HyperText Transfer Protocol Secure Version 2 (HTTPS/2)",display:"HTTPS2"},HTTPS3:{description:"HyperText Transfer Protocol Secure Version 3 (HTTPS/3)",display:"HTTPS3"},"HTTPS3.0":{description:"HyperText Transfer Protocol Secure Version 3 (HTTPS/3)",display:"HTTPS3"},IAAS:{description:"Infrastructure as a Service",display:"IaaS"},IAM:{description:"Identity and Access Management"},IAMM:{description:"Identity and Access Management and Monitoring"},IAMT:{description:"Identity and Access Management Tool"},ID:{description:"Identifier",display:"Id"},IFTTT:{description:"If This Then That"},IMAP:{description:"Internet Message Access Protocol"},IO:{description:"Input/Output"},IP:{description:"Internet Protocol"},IPFS:{description:"InterPlanetary File System"},IPS:{description:"Intrusion Prevention System"},IQ:{description:"Intelligence Quotient",display:"IQ"},IOT:{description:"Internet of Things",display:"IoT"},JSON:{description:"JavaScript Object Notation"},JSONP:{description:"JSON with Padding"},JWT:{description:"JSON Web Token"},K8S:{description:"Kubernetes",display:"K8s"},KMS:{description:"Key Management Service"},KPI:{description:"Key Performance Indicator"},KV:{description:"Key Value"},LAN:{description:"Local Area Network"},LHS:{description:"Left Hand Side"},LPGA:{description:"Ladies Professional Golf Association"},LXC:{description:"Linux Containers"},MDT:{description:"Mountain Daylight Time"},MFA:{description:"Multi-Factor Authentication"},ML:{description:"Machine Learning"},MLB:{description:"Major League Baseball"},MLOps:{description:"Machine Learning Operations"},MPA:{description:"Multi-Page Application"},MST:{description:"Mountain Standard Time"},MVC:{description:"Model View Controller"},MVP:{description:"Minimum Viable Product / Most Valuable Player"},NAIA:{description:"National Association of Intercollegiate Athletics"},NAS:{description:"Network Attached Storage"},NASA:{description:"National Aeronautics and Space Administration"},NASCAR:{description:"National Association for Stock Car Auto Racing"},NAT:{description:"Network Address Translation"},NBA:{description:"National Basketball Association"},NCAA:{description:"National Collegiate Athletic Association"},NDA:{description:"Non-Disclosure Agreement"},NFS:{description:"Network File System"},NHL:{description:"National Hockey League"},NIST:{description:"National Institute of Standards and Technology"},NLP:{description:"Natural Language Processing"},NPS:{description:"Net Promoter Score"},NRA:{description:"National Rifle Association"},NSFW:{description:"Not Safe For Work"},NX:{description:"Nx",display:"Nx"},OCR:{description:"Optical Character Recognition"},OEM:{description:"Original Equipment Manufacturer"},OKR:{description:"Objectives and Key Results"},OLAP:{description:"Online Analytical Processing"},OLTP:{description:"Online Transaction Processing"},OOP:{description:"Object Oriented Programming"},ORM:{description:"Object Relational Mapping"},OS:{description:"Operating System"},OSINT:{description:"Open Source Intelligence"},OSS:{description:"Open Source Software"},OTP:{description:"One-Time Password"},P2P:{description:"Peer to Peer"},PAAS:{description:"Platform as a Service",display:"PaaS"},PCI:{description:"Payment Card Industry"},PDP:{description:"Policy Decision Point / Product Detail Page"},PDT:{description:"Pacific Daylight Time"},PGA:{description:"Professional Golfers' Association"},POTUS:{description:"President of the United States"},PP:{description:"Pages / PayPal / Percentage Points"},PST:{description:"Pacific Standard Time"},PTO:{description:"Paid Time Off / Power Take-Off"},PKI:{description:"Public Key Infrastructure"},PWA:{description:"Progressive Web App"},PX:{description:"Pixel"},QA:{description:"Quality Assurance"},R2:{description:"R2"},RAID:{description:"Redundant Array of Independent Disks"},RAM:{description:"Random Access Memory"},RDS:{description:"Relational Database Service"},REST:{description:"Representational State Transfer"},RHS:{description:"Right Hand Side"},ROI:{description:"Return on Investment"},RPC:{description:"Remote Procedure Call"},RPA:{description:"Robotic Process Automation"},RSC:{description:"React Server Components"},RSS:{description:"Really Simple Syndication"},RUM:{description:"Real User Monitoring"},S3:{description:"Simple Storage Service (S3)"},SAN:{description:"Storage Area Network"},SASE:{description:"Secure Access Service Edge"},SCOTUS:{description:"Supreme Court of the United States"},SDLC:{description:"Software Development Life Cycle"},SDK:{description:"Software Development Kit"},SEC:{description:"Securities and Exchange Commission"},SEO:{description:"Search Engine Optimization"},SFTP:{description:"SSH File Transfer Protocol / Secure File Transfer Protocol"},SIEM:{description:"Security Information and Event Management"},SLA:{description:"Service Level Agreement"},SMB:{description:"Server Message Block / Small and Medium Business"},SMTP:{description:"Simple Mail Transfer Protocol"},SOAP:{description:"Simple Object Access Protocol"},SOA:{description:"Service Oriented Architecture"},SOC:{description:"Security Operations Center / System on Chip"},SPA:{description:"Single Page Application"},SPDY:{description:'Speedy (pronounced "SPeeDY")'},SPF:{description:"Sender Policy Framework"},SQL:{description:"Structured Query Language"},SRV:{description:"Service"},SRE:{description:"Site Reliability Engineering"},SSH:{description:"Secure Shell"},SSDL:{description:"Secure Software Development Lifecycle"},SSG:{description:"Static Site Generation"},SSR:{description:"Server Side Rendering"},SSO:{description:"Single Sign-On"},SSL:{description:"Secure Sockets Layer"},TDD:{description:"Test Driven Development"},TLD:{description:"Top Level Domain"},TLS:{description:"Transport Layer Security"},"TLS1.3":{description:"Transport Layer Security 1.3"},TOTP:{description:"Time-based One-Time Password"},TRPC:{description:"TypeScript Remote Procedure Call"},TSA:{description:"Transportation Security Administration"},TTL:{description:"Time To Live"},UDP:{description:"User Datagram Protocol"},UI:{description:"User Interface"},UID:{description:"Unique Identifier"},URI:{description:"Uniform Resource Identifier"},URL:{description:"Uniform Resource Locator"},USOPC:{description:"United States Olympic & Paralympic Committee"},USPS:{description:"United States Postal Service"},USTA:{description:"United States Tennis Association"},UTF:{description:"Unicode Transformation Format"},UTC:{description:"Coordinated Universal Time"},UUID:{description:"Universally Unique Identifier"},UX:{description:"User Experience"},VM:{description:"Virtual Machine"},VLAN:{description:"Virtual Local Area Network"},VPN:{description:"Virtual Private Network"},VPPA:{description:"Video Privacy Protection Act"},VR:{description:"Virtual Reality"},WAF:{description:"Web Application Firewall"},WAN:{description:"Wide Area Network"},WNBA:{description:"Women's National Basketball Association"},WLAN:{description:"Wireless Local Area Network"},WPA:{description:"Wi-Fi Protected Access"},XACML:{description:"eXtensible Access Control Markup Language"},XDG:{description:"Cross-Desktop Group"},XML:{description:"eXtensible Markup Language"},XSRF:{description:"Cross-Site Request Forgery"},XSS:{description:"Cross-Site Scripting"},XR:{description:"Extended Reality"},YAML:{description:"YAML Ain't Markup Language"},YMCA:{description:"Young Men's Christian Association"},YWCA:{description:"Young Women's Christian Association"},ZTA:{description:"Zero Trust Architecture"}},ACRONYM_DISPLAY=Object.fromEntries(Object.entries(ACRONYMS).map(([e,i])=>[e,i.display??e])),ACRONYM_DESCRIPTION=Object.fromEntries(Object.entries(ACRONYMS).map(([e,i])=>[e,i.description])),ACRONYM_LIST=Object.keys(ACRONYMS);
package/dist/index.cjs CHANGED
@@ -102,6 +102,17 @@ Object.keys(_normalizeEmail).forEach(function (key) {
102
102
  }
103
103
  });
104
104
  });
105
+ var _package = require("./package.cjs");
106
+ Object.keys(_package).forEach(function (key) {
107
+ if (key === "default" || key === "__esModule") return;
108
+ if (key in exports && exports[key] === _package[key]) return;
109
+ Object.defineProperty(exports, key, {
110
+ enumerable: true,
111
+ get: function () {
112
+ return _package[key];
113
+ }
114
+ });
115
+ });
105
116
  var _pad = require("./pad.cjs");
106
117
  Object.keys(_pad).forEach(function (key) {
107
118
  if (key === "default" || key === "__esModule") return;
package/dist/index.d.ts CHANGED
@@ -15,6 +15,7 @@ export * from "./get-words";
15
15
  export * from "./kebab-case";
16
16
  export * from "./lower-case-first";
17
17
  export * from "./normalize-email";
18
+ export * from "./package";
18
19
  export * from "./pad";
19
20
  export * from "./pascal-case";
20
21
  export * from "./period-split";
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- export*from"./acronyms";export*from"./camel-case";export*from"./constant-case";export*from"./deburr";export*from"./escape";export*from"./get-words";export*from"./kebab-case";export*from"./lower-case-first";export*from"./normalize-email";export*from"./pad";export*from"./pascal-case";export*from"./period-split";export*from"./pretty-bytes";export*from"./snake-case";export*from"./start-case";export*from"./strip-indents";export*from"./title-case";export*from"./unescape";export*from"./upper-case-first";
1
+ export*from"./acronyms";export*from"./camel-case";export*from"./constant-case";export*from"./deburr";export*from"./escape";export*from"./get-words";export*from"./kebab-case";export*from"./lower-case-first";export*from"./normalize-email";export*from"./package";export*from"./pad";export*from"./pascal-case";export*from"./period-split";export*from"./pretty-bytes";export*from"./snake-case";export*from"./start-case";export*from"./strip-indents";export*from"./title-case";export*from"./unescape";export*from"./upper-case-first";
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getPackageName = getPackageName;
7
+ exports.getPackageVersion = getPackageVersion;
8
+ exports.hasPackageVersion = hasPackageVersion;
9
+ exports.removePackageVersion = removePackageVersion;
10
+ function hasPackageVersion(n) {
11
+ return /^.[^\n\r@\u2028\u2029]*@.*$/.test(n);
12
+ }
13
+ function removePackageVersion(n) {
14
+ return hasPackageVersion(n) ? n.substring(0, n.lastIndexOf("@")) : n;
15
+ }
16
+ function getPackageName(n) {
17
+ return /^[^\n\r/\u2028\u2029]*\/.[^\n\r/\u2028\u2029]*\/.*$/.test(n) ? n.substring(0, n.lastIndexOf("/")) : removePackageVersion(n);
18
+ }
19
+ function getPackageVersion(n) {
20
+ return hasPackageVersion(n) ? n.replace(/^.+@/, "") : void 0;
21
+ }
@@ -0,0 +1,108 @@
1
+ /**
2
+ * Check if a package name has a version
3
+ *
4
+ * @example
5
+ * ```typescript
6
+ * hasPackageVersion("lodash@4.17.21");
7
+ * // => true
8
+ * hasPackageVersion("@stryke/core@4.17.21");
9
+ * // => true
10
+ * hasPackageVersion("lodash");
11
+ * // => false
12
+ * hasPackageVersion("@stryke/core");
13
+ * // => false
14
+ * hasPackageVersion("lodash/module");
15
+ * // => false
16
+ * hasPackageVersion("@stryke/core/module");
17
+ * // => false
18
+ * hasPackageVersion("lodash/module@4.17.21");
19
+ * // => true
20
+ * hasPackageVersion("@stryke/core/module@4.17.21");
21
+ * // => true
22
+ * ```
23
+ *
24
+ * @param value - The package name with version
25
+ * @returns Whether the package name has a version
26
+ */
27
+ export declare function hasPackageVersion(value: string): boolean;
28
+ /**
29
+ * Remove the version from a package name (if it exists)
30
+ *
31
+ * @example
32
+ * ```typescript
33
+ * removePackageVersion("lodash@4.17.21");
34
+ * // => "lodash"
35
+ * removePackageVersion("@stryke/core@4.17.21");
36
+ * // => "@stryke/core"
37
+ * removePackageVersion("lodash");
38
+ * // => "lodash"
39
+ * removePackageVersion("@stryke/core");
40
+ * // => "@stryke/core"
41
+ * getPackageName("lodash/module");
42
+ * // => "lodash/module"
43
+ * getPackageName("@stryke/core/module");
44
+ * // => "@stryke/core/module"
45
+ * getPackageName("lodash/module@4.17.21");
46
+ * // => "lodash/module"
47
+ * getPackageName("@stryke/core/module@4.17.21");
48
+ * // => "@stryke/core/module"
49
+ * ```
50
+ *
51
+ * @param value - The package name with version
52
+ * @returns The package name without version
53
+ */
54
+ export declare function removePackageVersion(value: string): string;
55
+ /**
56
+ * Get the package name from a scoped package string
57
+ *
58
+ * @example
59
+ * ```typescript
60
+ * getPackageName("lodash@4.17.21");
61
+ * // => "lodash"
62
+ * getPackageName("@stryke/core@4.17.21");
63
+ * // => "@stryke/core"
64
+ * getPackageName("lodash");
65
+ * // => "lodash"
66
+ * getPackageName("@stryke/core");
67
+ * // => "@stryke/core"
68
+ * getPackageName("lodash/module");
69
+ * // => "lodash"
70
+ * getPackageName("@stryke/core/module");
71
+ * // => "@stryke/core"
72
+ * getPackageName("lodash/module@4.17.21");
73
+ * // => "lodash"
74
+ * getPackageName("@stryke/core/module@4.17.21");
75
+ * // => "@stryke/core"
76
+ * ```
77
+ *
78
+ * @param value - The scoped package string
79
+ * @returns The package name without the scope
80
+ */
81
+ export declare function getPackageName(value: string): string;
82
+ /**
83
+ * Get the package version from a scoped package string
84
+ *
85
+ * @example
86
+ * ```typescript
87
+ * getPackageName("lodash@4.17.21");
88
+ * // => "4.17.21"
89
+ * getPackageName("@stryke/core@4.17.21");
90
+ * // => "4.17.21"
91
+ * getPackageName("lodash");
92
+ * // => undefined
93
+ * getPackageName("@stryke/core");
94
+ * // => undefined
95
+ * getPackageName("lodash/module");
96
+ * // => undefined
97
+ * getPackageName("@stryke/core/module");
98
+ * // => undefined
99
+ * getPackageName("lodash/module@4.17.21");
100
+ * // => "4.17.21"
101
+ * getPackageName("@stryke/core/module@4.17.21");
102
+ * // => "4.17.21"
103
+ * ```
104
+ *
105
+ * @param value - The scoped package string
106
+ * @returns The package version without the package name if it exists. If not, returns undefined.
107
+ */
108
+ export declare function getPackageVersion(value: string): string | undefined;
@@ -0,0 +1 @@
1
+ export function hasPackageVersion(n){return/^.[^\n\r@\u2028\u2029]*@.*$/.test(n)}export function removePackageVersion(n){return hasPackageVersion(n)?n.substring(0,n.lastIndexOf("@")):n}export function getPackageName(n){return/^[^\n\r/\u2028\u2029]*\/.[^\n\r/\u2028\u2029]*\/.*$/.test(n)?n.substring(0,n.lastIndexOf("/")):removePackageVersion(n)}export function getPackageVersion(n){return hasPackageVersion(n)?n.replace(/^.+@/,""):void 0}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stryke/string-format",
3
- "version": "0.9.2",
3
+ "version": "0.11.0",
4
4
  "type": "module",
5
5
  "description": "A package containing utility functions to transform strings into various formats.",
6
6
  "repository": {
@@ -10,7 +10,7 @@
10
10
  },
11
11
  "private": false,
12
12
  "publishConfig": { "access": "public" },
13
- "dependencies": { "@stryke/helpers": "^0.7.2", "@stryke/types": "^0.8.9" },
13
+ "dependencies": { "@stryke/helpers": "^0.8.0", "@stryke/types": "^0.8.9" },
14
14
  "devDependencies": {},
15
15
  "sideEffects": false,
16
16
  "files": ["dist/**/*"],
@@ -186,6 +186,20 @@
186
186
  "require": { "types": "./dist/pad.d.ts", "default": "./dist/pad.cjs" },
187
187
  "default": { "types": "./dist/pad.d.ts", "default": "./dist/pad.mjs" }
188
188
  },
189
+ "./package": {
190
+ "import": {
191
+ "types": "./dist/package.d.ts",
192
+ "default": "./dist/package.mjs"
193
+ },
194
+ "require": {
195
+ "types": "./dist/package.d.ts",
196
+ "default": "./dist/package.cjs"
197
+ },
198
+ "default": {
199
+ "types": "./dist/package.d.ts",
200
+ "default": "./dist/package.mjs"
201
+ }
202
+ },
189
203
  "./normalize-email": {
190
204
  "import": {
191
205
  "types": "./dist/normalize-email.d.ts",
@@ -333,5 +347,5 @@
333
347
  "main": "./dist/index.cjs",
334
348
  "module": "./dist/index.mjs",
335
349
  "types": "./dist/index.d.ts",
336
- "gitHead": "f8abb224a6b6540e442cc664bbb2cf1273b2be2b"
350
+ "gitHead": "c091570b546f86e32ce7804ed7f8d4ff9dc5eee7"
337
351
  }