Advertisement
Guest User

Untitled

a guest
Apr 5th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. let parsed = FieldStringParser.parse('username:(type:string, size:15, something:true),password:string,email:field({type: string, size: 40}),nickname:field(string),foo,bar');
  2.  
  3. let produces = { username:
  4. { argumentString: '{ type: \'string\', size: 15, something: true }',
  5. definition: { type: 'string', size: 15, something: true } },
  6. password:
  7. { argumentString: '{ type: \'string\' }',
  8. definition: { type: 'string' } },
  9. email:
  10. { argumentString: '{ type: \'string\', size: 40 }',
  11. definition: { type: 'string', size: 40 } },
  12. nickname:
  13. { argumentString: '{ type: \'string\' }',
  14. definition: { type: 'string' } },
  15. foo:
  16. { argumentString: '{ type: \'string\' }',
  17. definition: { type: 'string' } },
  18. bar:
  19. { argumentString: '{ type: \'string\' }',
  20. definition: { type: 'string' } } }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement