shared
utils
string
object
is
extension
js
tracking
string
dom
when
selection
position
iframe
event
scroll
console
node
string
project
fs
console
parseTypeString
Type:Function
Status:beta
Since:1.0.0
Platform:jsnode
@blackbyte.sugar.shared.type
This method simply parse the passed typeString like “string | number”, or “string & path”, etc… and return an object defining this type string
Params
- typeString*-String
The type string to parse
Return
- -TTypeStringObject[]
An array of object(s) describing the type string passed
Example
import { parseTypeString } from '@blackbyte/sugar/type';
parseTypeString('string|number');
//[{
// type: 'string',
// of: undefined,
//}, {
// type: 'number',
// of: undefined,
//}]Author
- Olivier Bosselolivier.bossel@gmail.com