Skip to content

About

Codewars language identifiers package

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

Repository files navigation

@codewarstools/codewars-languages

A list of programming language identifiers used by the Codewars API.

npm

https://www.npmjs.com/package/@codewarstools/codewars-languages

Installation

npm install @codewarstools/codewars-languages

Usage

import languages from '@codewarstools/codewars-languages';

console.log(languages);

// Output: ['agda', 'bf', 'c', 'cfml', 'clojure', ...]

Example

Check whether a language identifier is included in the list:

import languages from '@codewarstools/codewars-languages';

const language = 'javascript';

if (languages.includes(language)) {
  console.log(`${language} is included in the list.`);
}

TypeScript Support

This package includes TypeScript declarations (languages.d.ts) for type checking and editor support.

The exported array is typed as readonly string[]. The array is also frozen at runtime using Object.freeze().

License

MIT

About

Codewars language identifiers package

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages