UNPKG

@skiff-org/trawler

Version:

A modern search library for Skiff

27 lines (21 loc) 425 B
import { pipeline } from '../../lang.js'; export const rtl = false; export const tokenize = ''; export default { encode: encode, rtl: rtl }; const regex = /[\x00-\x7F]+/g; const split = /\s+/; /** * @this IndexInterface */ export function encode(str){ return pipeline.call( this, /* string: */ str.replace(regex, ' '), /* normalize: */ false, /* split: */ split, /* collapse: */ false ); }