WordPress at a glance
function is not described

Automattic\WooCommerce\Blocks

Assets::register_block_script() public WC 2.3.0

Queues a block script in the frontend.

{} It's a method of the class: Assets{}

No Hooks.

Return

Null. Nothing.

Usage

$result = Assets::register_block_script( $script_name, $handle, $dependencies );
$script_name(string) (required)
Name of the script used to identify the file inside build folder.
$handle(string)
Provided if the handle should be different than the script name. wc- prefix automatically added.
$dependencies(array)
An array of registered script handles this script depends on.
Default: empty array

Changelog

Since 2.3.0 Introduced.
Since 2.6.0 Changed $name to $script_name and added $handle argument.
Since 2.9.0 Made it so scripts are not loaded in admin pages.

Code of Assets::register_block_script() WC 5.0.0

<?php
public static function register_block_script( $script_name, $handle = '', $dependencies = [] ) {
	$asset_api = Package::container()->get( AssetApi::class );
	$asset_api->register_block_script( $script_name, $handle, $dependencies );
}