Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

fixedstr

Transforms fixed string to object and vice versa

string, string to object, stringify, fixed, parse, object, object to string, objectify

readme

fixedstr

Transforms fixed string to object and vice versa

    var transformer = new fixedstr([
        fixedstr.str('foo', 2),
        fixedstr.str('bar', 5),
        fixedstr.number('baz', 3)
    ]);
    transformer.objectify('F Bar  012'); // {foo: 'F', bar: 'Bar', baz: 12}
    transformer.stringify({foo: 'F', bar: 'Bar', baz: 12}); // 'F Bar  012'