Creating Modules

Run the following to create a NodeJS module:

See command synopsis

Write the code

You component implementation usually lies in a file in the name of the component, and can grow to further files and directories as needed.

 * determines whether `value` is of type string.
export function isString(value: string) {
  return typeof str === 'string';

It is worthwhile to add JSDoc comments on your code. Use bit start to preview your component API reference and head to the component's API reference tab.

Exposing the API

Expose your component's API and public types in the component's main file (index.ts, by default):

export { isString } from './is-string.js';

Testing modules

Head over to your component's .spec.tsx file to add automated testing.

import { isString } from './is-string.js';

it('should return true as `foo` is a string', () => {

Avoid mocking component dependencies to allow for better intergration testing using Ripple CI. Learn more on Testing components.


To modify your documentation, change the file inside the component directory. It uses the MDX format allowing for rich and interactive component documentation.

description: Determines whether `value` is of type string

A NodeJS module for determining whether `value` is of type string

### Component usage

isString('foo'); // echo `true`
isString(42); // echo `false`

Try it out!

```js live

Use the playground to allow people to play with your components live from your component documentation.