PHP code example of siketyan / yarn-lock

1. Go to this page and download the library: Download siketyan/yarn-lock library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

siketyan / yarn-lock example snippets




declare(strict_types=1);



var_dump(
    YarnLock::toArray(
        file_get_contents('./yarn.lock'),
    ),
);



namespace Siketyan\YarnLock;

class YarnLock
{
    public static function toArray(string $buffer): array;
    
    /**
     * @return list<PackageInterface>
     */
    public static function packages(string $buffer): array;
    
    /**
     * @return list<PackageInterface>
     */
    public static function packagesFromArray(array $yarnLock): array;
}