Package Exports
- reverse-value
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (reverse-value) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
reverse-value (Reverse Everything)
This library reverses all possible variables
Variable types
- String
- Number
- Array
- Boolean
Installation
npm install reverse-value
Usage
reverse(value)
const rev = require('reverse-value');
console.log(rev.reverse( 'qwe' )); // ewq
console.log(rev.reverse( 1992 )); // 2991
console.log(rev.reverse( true )); // false
console.log(rev.reverse( false )); // true
console.log(rev.reverse( ['asd', 12, 'www', 'qwe'] )); // ['qwe', 'www', 12, 'asd']
console.log(rev.reverse( null )); // null - Remains same
console.log(rev.reverse( undefined )); // undefined - Remains same
console.log(rev.reverse( { a: 'asd', b: 'qwe' } )); // { a: 'asd', b: 'qwe' } - Remains same