isModuleSystem

Type:Function
Status:stable
Since:1.0.0
Platform:jsnode
@blackbyte.sugar.shared.is

Check if the current module system the code runs on is one of the passed system names like “esm” or “cjs”.

Params

  1. systemNames*-(‘esm’|‘cjs’)[]

    An array of system names to check against

Return

  1. -Boolean

    true if the current system is one of the passed system names, false otherwise

Example

import { isModuleSystem } from '@blackbyte/sugar/is';
isModuleSystem('esm'); // => true
isModuleSystem('cjs'); // => false

Todo

  • testsnormal