How to use the assertNumericLiteral function from babel-types
Find comprehensive JavaScript babel-types.assertNumericLiteral code examples handpicked from public code repositorys.
74 75 76 77 78 79 80 81 82
t.is(ast.properties.length, 2); babelTypes.assertStringLiteral(ast.properties[0].key, { value: 'foo' }); babelTypes.assertStringLiteral(ast.properties[0].value, { value: 'bar' }); babelTypes.assertStringLiteral(ast.properties[1].key, { value: 'baz' }); babelTypes.assertNumericLiteral(ast.properties[1].value, { value: 1 }); t.pass(); });
4
0
0
+ 5 other calls in file
babel-types.identifier is the most popular function in babel-types (4076 examples)