Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

README.md

npm license

Juno JavaScript Internet Computer Client

The j type system, all schemas and utilities for validation on Juno.

import {defineQuery} from '@junobuild/functions';
import {j} from '@junobuild/schema';

const ArgsSchema = j.strictObject({
  id: j.principal(),
  name: j.string()
});

export const myQuery = defineQuery({
  args: ArgsSchema,
  handler: ({id, name}) => {
    console.log(id.toText(), name);
  }
});

License

MIT © David Dal Busco