elecena / ic-package-info
Extract IC package from a given string
Installs: 5 045
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 2
Requires
- php: >=7.3.0 || ^8.0
Requires (Dev)
- phpunit/phpunit: ^9.3
README
Extract IC package from a given string
Install it
composer require elecena/ic-package-info
Example
<?php use Elecena\Utils\PackageInfo; $package = PackageInfo::getPackage('2N7000 N CHANNEL MOSFET, 60V, 200mA, TO-92'); // this will return 'TO-92' // additionally, PackageInfo normalizes the packages $package = PackageInfo::getPackage('MOSFET,N CHANNEL,600V,3.7A,SC-67'); // will return 'TO-220F' // false will be returned when a valid package is not found $package = PackageInfo::getPackage('foo bar-42'); // will return false