If a person complained of for threatening to commit an offense against the person or property of another is committed for not giving security, that person, upon giving the same, may be discharged by any municipal judge who is authorized to act as a committing magistrate, or by the judge of the district court of the county. Any undertaking so accepted must be transmitted by the acting magistrate to the district court of the county for disposition at the next term.
N.D.C.C. § 29-02-13