<commit_before>'use strict'

const utils = require( 'mojule-utils' )

const lazyId = fn => {
  const id = ( fn, node ) => {
    const value = fn.value( node )

    if( value._id )
      return value._id

    const nodeType = fn.nodeType( node )
    const id = utils.id( nodeType )

    value._id = id

    fn.value( node, value )

    return id
  }

  id.def = {
    argTypes: [ 'fn', 'node' ],
    returnType: 'string',
    require: [ 'value', 'nodeType' ],
    categories: [ 'node', 'plugin' ]
  }

  return Object.assign( fn, { id } )<commit_msg>Param mismatch calling fn.nodeType from fn.id<commit_after>'use strict'

const utils = require( 'mojule-utils' )

const lazyId = fn => {
  const id = ( fn, node ) => {
    const value = fn.value( node )

    if( value._id )
      return value._id

    const nodeType = fn.nodeType( fn, node )
    const id = utils.id( nodeType )

    value._id = id

    fn.value( node, value )

    return id
  }

  id.def = {
    argTypes: [ 'fn', 'node' ],
    returnType: 'string',
    require: [ 'value', 'nodeType' ],
    categories: [ 'node', 'plugin' ]
  }

  return Object.assign( fn, { id } )
{'fraction_non_alphanumeric': 0.15255731922398588, 'fraction_numerical': 0.0, 'mean_word_length': 2.4084084084084085, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, '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': '6493421', 'n_tokens_mistral': 408, 'n_tokens_neox': 396, 'n_words': 110}