require-coercible-to-string-x

Requires an argument is corecible then converts using ToString.

MIT 32 个版本
安装
npm install require-coercible-to-string-x
yarn add require-coercible-to-string-x
pnpm add require-coercible-to-string-x
bun add require-coercible-to-string-x
README

Travis status Dependency status devDependency status npm version jsDelivr hits bettercodehub score Coverage Status

require-coercible-to-string-x

Requires an argument is corecible then converts using ToString.

Version: 1.0.2
Author: Xotic750 Xotic750@gmail.com
License: MIT
Copyright: Xotic750

module.exports(value)string

This method requires an argument is corecible then converts using ToString.

Kind: Exported function
Returns: string - The value as a string.
Throws:

  • TypeError If value is null or undefined.
Param Type Description
value * The value to converted to a string.

Example

import requireCoercibleToString from 'require-coercible-to-string-x';

requireCoercibleToString(); // TypeError
requireCoercibleToString(null); // TypeError
requireCoercibleToString(Symbol('')); // TypeError
requireCoercibleToString(Object.create(null)); // TypeError
console.log(requireCoercibleToString(1)); // '1'
console.log(requireCoercibleToString(true)); // 'true'
版本列表
2.1.1 2019-08-28
2.1.0 2019-08-14
2.0.26 2019-07-31
2.0.25 2019-07-27
2.0.24 2019-07-27
2.0.23 2019-07-26
2.0.22 2019-07-25
2.0.21 2019-07-24
2.0.20 2019-07-24
2.0.19 2019-07-23
2.0.18 2019-07-22
2.0.17 2019-07-21
2.0.16 2019-07-21
2.0.15 2019-07-19
2.0.14 2019-07-18
2.0.13 2019-07-18
2.0.12 2019-07-17
2.0.11 2019-07-17
2.0.10 2019-07-17
2.0.9 2019-07-17
2.0.8 2019-07-16
2.0.7 2019-07-16
2.0.6 2019-07-16
2.0.5 2019-07-15
2.0.4 2019-07-14
2.0.3 2019-07-13
2.0.2 2019-07-13
2.0.1 2019-07-12
2.0.0 2019-07-10
1.0.2 2018-02-24
1.0.1 2018-02-24
1.0.0 2017-09-26