<commit_before>/*!
 * V4Fire Client Core
 * https://github.com/V4Fire/Client
 *
 * Released under the MIT license
 * https://github.com/V4Fire/Client/blob/master/LICENSE
 */

import { deprecate } from 'core/functools/deprecation';
import { cacheStatus, ComponentInterface } from 'core/component';

/**
 * [[include:core/component/accessor/README.md]]
 * @packageDocumentation
 */

/**
 * Attaches accessors and computed fields from a meta object to the specified component instance
 *
 * @param component
 * @param [safe] - if true, then the function uses safe access to object properties
 *   by using Object.getOwnPropertyDescriptor/defineProperty
 */
export function attachAccessorsFromMeta(component: ComponentInterface, safe?: boolean): void {
	const
		{meta, meta: {params: {deprecatedProps}}} = component.unsafe;

	const
		isFlyweight = meta.params.functional === true || component.isFlyweight;

	for (let o = meta.accessors, keys = Object.keys(o), i = 0; i < keys.length; i++) {
		const<commit_msg>:art:<commit_after>/*!
 * V4Fire Client Core
 * https://github.com/V4Fire/Client
 *
 * Released under the MIT license
 * https://github.com/V4Fire/Client/blob/master/LICENSE
 */

/**
 * [[include:core/component/accessor/README.md]]
 * @packageDocumentation
 */

import { deprecate } from 'core/functools/deprecation';
import { cacheStatus, ComponentInterface } from 'core/component';

/**
 * Attaches accessors and computed fields from a meta object to the specified component instance
 *
 * @param component
 * @param [safe] - if true, then the function uses safe access to object properties
 *   by using Object.getOwnPropertyDescriptor/defineProperty
 */
export function attachAccessorsFromMeta(component: ComponentInterface, safe?: boolean): void {
	const
		{meta, meta: {params: {deprecatedProps}}} = component.unsafe;

	const
		isFlyweight = meta.params.functional === true || component.isFlyweight;

	for (let o = meta.accessors, keys = Object.keys(o), i = 0; i < keys.length; i++) {
		const
{'fraction_non_alphanumeric': 0.12574850299401197, 'fraction_numerical': 0.003992015968063872, 'mean_word_length': 4.493150684931507, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2475321', 'n_tokens_mistral': 596, 'n_tokens_neox': 577, 'n_words': 167}