0.1.10 • Published 7 years ago

@pg-english/token v0.1.10

Weekly downloads
2
License
MIT
Repository
-
Last release
7 years ago

@pg-english/token

pg-english

Define, parse or stringify tokens.

const token = require('@pg-english/token');
// token([type], [value], [hint])
// token.type: {TEXT, NORMAL, QUOTED, ...}
// token.parse(<text>)
// token.toString(<tokens>)
// ...

const T = token.type;
token(T.TEXT, 'forty');
// {type: 16, value: 'forty'}

var tokens = token.parse('food with highest calcium');
// [ { type: 16, value: 'food' },
//   { type: 16, value: 'with' },
//   { type: 16, value: 'highest' },
//   { type: 16, value: 'calcium' } ]

token.toString(tokens)
// food with highest calcium
0.1.10

7 years ago

0.1.9

7 years ago

0.1.8

7 years ago

0.1.7

7 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago