swc/crates/swc_bundler/tests/.cache/deno/8dfc590142b60eee0cc23a51bf3e3f7c7cd54454.ts
2021-11-09 20:42:49 +09:00

16 lines
321 B
TypeScript

// Loaded from https://deno.land/x/segno@v1.1.0/lib/validations/isOctal.ts
// @ts-ignore allowing typedoc to build
import { assertString } from '../helpers/assertString.ts';
/**
* @ignore
*/
const octal = /^(0o)?[0-7]+$/i;
export const isOctal = (str: string) => {
assertString(str);
return octal.test(str);
};