Nobody's Perfect, Man

    This package has been deprecated

    Author message:

    Package no longer supporteed. Use at your own risk. Please refer to using package https://www.npmjs.com/package/js-convert-case.

    uppercase-keys-object

    1.1.4 • Public • Published

    uppercase-keys-object

    NPM version NPM downloads

    Uppercase the keys of an object. Use for node and browser

    It is useful for oracledb.

    Installation

    $ npm install --save uppercase-keys-object

    or

    $ yarn add uppercase-keys-object

    Usage

    Node.JS

    const upperKeys = require('uppercase-keys-object');
     
    const object = {
        camelCase: 1,
        UPPERCASE: 2,
        lowercase: 3,
        snake_case: 4,
        PascalCase: 5,
        'Title Case': 6,
        'dot.case': 7,
        'param-case': 8,
        'Sentence case': 9,
        'path/case': 10,
        'Header-Case': 11
    };
     
    const res = upperKeys(object);
     
    console.log(res);
    /**
    { CAMELCASE: 1,
      UPPERCASE: 2,
      LOWERCASE: 3,
      SNAKE_CASE: 4,
      PASCALCASE: 5,
      'TITLE CASE': 6,
      'DOT.CASE': 7,
      'PARAM-CASE': 8,
      'SENTENCE CASE': 9,
      'PATH/CASE': 10,
      'HEADER-CASE': 11 }
     */
     
    console.log(upperKeys(null)); // null
    console.log(upperKeys(undefined)); // null

    Browser

    1. NPM Package
    <script src="./node_modules/uppercase-keys-object/dist/uppercase-keys-object.js"></script>
    <!-- Or use minified -->
    <script src="./node_modules/uppercase-keys-object/dist/uppercase-keys-object.min.js"></script>
    2. Download from source
    <script src="path/to/uppercase-keys-object"></script>
    Usage
    <script>
        
        const object = {
            camelCase: 1,
            UPPERCASE: 2,
            lowercase: 3,
            snake_case: 4,
            PascalCase: 5,
            'Title Case': 6,
            'dot.case': 7,
            'param-case': 8,
            'Sentence case': 9,
            'path/case': 10,
            'Header-Case': 11
        };
     
        const res = upperKeys(object);
     
        console.log(res);
        console.log(upperKeys(null)); // null
        console.log(upperKeys(undefined)); // null
     
    </script> 

    API

    upperKeys(object)

    Returns a new object which keys is/are uppercased.

    Related

    Install

    npm i uppercase-keys-object

    DownloadsWeekly Downloads

    116

    Version

    1.1.4

    License

    ISC

    Unpacked Size

    3.68 kB

    Total Files

    5

    Last publish

    Collaborators

    • huynhsamha