Sindbad~EG File Manager

Current Path : /home/infinitibizsol/.trash/node_modules.5/type/docs/
Upload File :
Current File : /home/infinitibizsol/.trash/node_modules.5/type/docs/reg-exp.md

# RegExp

_RegExp_ instance

## `reg-exp/is`

Confirms if given object is a native regular expression object

```javascript
const isRegExp = require("type/reg-exp/is");

isRegExp(/foo/);
isRegExp({}); // false
isRegExp("foo"); // false
```

## `reg-exp/ensure`

If given argument is a regular expression object, it is returned back. Otherwise `TypeError` is thrown.

```javascript
const ensureRegExp = require("type/reg-exp/ensure");

ensureRegExp(/foo/); // /foo/
ensureRegExp("foo"); // Thrown TypeError: null is not a regular expression object
```

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists