mirror of
https://github.com/bendtherules/ask262.git
synced 2026-08-19 00:31:06 +00:00
8 lines
358 B
TypeScript
8 lines
358 B
TypeScript
import type { ParseNode } from '../parser/ParseNode.mts';
|
|
|
|
/** https://tc39.es/ecma262/#sec-static-semantics-isstrict */
|
|
export function IsStrict({ ScriptBody }: ParseNode.Script) {
|
|
// 1. If ScriptBody is present and the Directive Prologue of ScriptBody contains a Use Strict Directive, return true; otherwise, return false.
|
|
return ScriptBody!.strict;
|
|
}
|