@sutton-signwriting/core
Version:
a javascript package for node and browsers that supports general processing of the Sutton SignWriting script
12 lines (9 loc) • 671 B
JavaScript
import { fsw2query } from './fswquery-convert';
it('should convert fsw strings into query string', () => {
expect(fsw2query('AS10011S10019S2e704S2e748M525x535S2e748483x510S10011501x466S2e704510x500S10019476x475', 'ASL'))
.toBe('QAS10011S10019S2e704S2e748TS2e748483x510S10011501x466S2e704510x500S10019476x475');
expect(fsw2query('AS10011S10019S2e704S2e748M525x535S2e748483x510S10011501x466S2e704510x500S10019476x475', 'a'))
.toBe('QAS100uuS100uuS2e7uuS2e7uuT');
expect(fsw2query('AS10011S10019S2e704S2e748M525x535S2e748483x510S10011501x466S2e704510x500S10019476x475', 'sL'))
.toBe('QS2e7uu483x510S100uu501x466S2e7uu510x500S100uu476x475')
})