18 lines
358 B
TypeScript
Raw Normal View History

2018-03-19 01:12:18 +01:00
/**
* Various compiler utilities.
* @module util
* @preferred
*//***/
export * from "./bitset";
2018-03-19 01:12:18 +01:00
export * from "./charcode";
export * from "./collections";
2018-03-19 01:12:18 +01:00
export * from "./path";
export * from "./text";
export * from "./binary";
2019-02-28 17:36:22 +01:00
/** Tests if `x` is a power of two. */
export function isPowerOf2(x: i32): bool {
return x != 0 && (x & (x - 1)) == 0;
}