<commit_before>/**
 * Create a window and receive events
 * window closed after 30sec if event triggered
 *
 * Run @CLI and then move mouse in the area of the window
 *
 * @CLI `ts-node -P tsconfig.cjs.json demo/create_window.ts`
 * @author waiting
 * @link https://github.com/waitingsong/node-win32-api
 */

import * as ffi from 'ffi'
import * as ref from 'ref-napi'
import * as StructDi from 'ref-struct-di'

// import {
//   C,
//   Config,
//   DModel as M,
//   DStruct as DS,
//   DTypes as W,
//   FModel as FM,
//   K,
//   U,
// } from 'win32-api' // as module
import {
  C,
  Config,
  DModel as M,
  DStruct as DS,
  DTypes as W,
  FModel as FM,
  K,
  U,
} from '../src/index' // as local

const Struct = StructDi(ref)

const knl32 = K.load()<commit_msg>chore(win32-api): use ffi-napi instead of ffi in demo/create_window.ts<commit_after>/**
 * Create a window and receive events
 * window closed after 30sec if event triggered
 *
 * Run @CLI and then move mouse in the area of the window
 *
 * @CLI `ts-node -P tsconfig.cjs.json demo/create_window.ts`
 * @author waiting
 * @link https://github.com/waitingsong/node-win32-api
 */

import * as ffi from 'ffi-napi'
import * as ref from 'ref-napi'
import * as StructDi from 'ref-struct-di'

// import {
//   C,
//   Config,
//   DModel as M,
//   DStruct as DS,
//   DTypes as W,
//   FModel as FM,
//   K,
//   U,
// } from 'win32-api' // as module
import {
  C,
  Config,
  DModel as M,
  DStruct as DS,
  DTypes as W,
  FModel as FM,
  K,
  U,
} from '../src/index' // as local

const Struct = StructDi(ref)

const knl32 = K.load()
{'fraction_non_alphanumeric': 0.14052697616060225, 'fraction_numerical': 0.011292346298619825, 'mean_word_length': 2.520971302428256, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '3003655', 'n_tokens_mistral': 614, 'n_tokens_neox': 602, 'n_words': 202}