to-object-x

WebJar for to-object-x

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

to-object-x
Last Version

Last Version

1.5.0
Release Date

Release Date

Type

Type

jar
Description

Description

to-object-x
WebJar for to-object-x
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/Xotic750/to-object-x

Download to-object-x

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/to-object-x/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>to-object-x</artifactId>
    <version>1.5.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/to-object-x/
implementation 'org.webjars.npm:to-object-x:1.5.0'
// https://jarcasting.com/artifacts/org.webjars.npm/to-object-x/
implementation ("org.webjars.npm:to-object-x:1.5.0")
'org.webjars.npm:to-object-x:jar:1.5.0'
<dependency org="org.webjars.npm" name="to-object-x" rev="1.5.0">
  <artifact name="to-object-x" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='to-object-x', version='1.5.0')
)
libraryDependencies += "org.webjars.npm" % "to-object-x" % "1.5.0"
[org.webjars.npm/to-object-x "1.5.0"]

Dependencies

compile (2)

Group / Artifact Type Version
org.webjars.npm : cached-constructors-x jar [1.0.0,2)
org.webjars.npm : require-object-coercible-x jar [1.4.1,2)

Project Modules

There are no modules declared in this project.

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

to-object-x

ES6-compliant shim for ToObject.

See: 7.1.13 ToObject ( argument )

module.exports(value)Object

The abstract operation ToObject converts argument to a value of type Object.

Kind: Exported function
Returns: Object - The value converted to an object.
Throws:

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

Example

import toObject from 'to-object-x';

toObject(); // TypeError
toObject(null); // TypeError
console.log(toObject('abc')); // Object('abc')
console.log(toObject(true)); // Object(true)
console.log(toObject(Symbol('foo'))); // Object(Symbol('foo'))

Versions

Version
1.5.0