pax_global_header00006660000000000000000000000064124606501060014512gustar00rootroot0000000000000052 comment=4b1423164b551faa7a51a5b8f903c51e00c0ea94 lowercase-keys-1.0.0/000077500000000000000000000000001246065010600144455ustar00rootroot00000000000000lowercase-keys-1.0.0/.editorconfig000066400000000000000000000003371246065010600171250ustar00rootroot00000000000000root = true [*] indent_style = tab end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true [package.json] indent_style = space indent_size = 2 [*.md] trim_trailing_whitespace = false lowercase-keys-1.0.0/.gitattributes000066400000000000000000000000141246065010600173330ustar00rootroot00000000000000* text=auto lowercase-keys-1.0.0/.gitignore000066400000000000000000000000151246065010600164310ustar00rootroot00000000000000node_modules lowercase-keys-1.0.0/.jshintrc000066400000000000000000000002761246065010600162770ustar00rootroot00000000000000{ "node": true, "esnext": true, "bitwise": true, "camelcase": true, "curly": true, "immed": true, "newcap": true, "noarg": true, "undef": true, "unused": "vars", "strict": true } lowercase-keys-1.0.0/.travis.yml000066400000000000000000000000461246065010600165560ustar00rootroot00000000000000language: node_js node_js: - '0.10' lowercase-keys-1.0.0/index.js000066400000000000000000000003201246065010600161050ustar00rootroot00000000000000'use strict'; module.exports = function (obj) { var ret = {}; var keys = Object.keys(Object(obj)); for (var i = 0; i < keys.length; i++) { ret[keys[i].toLowerCase()] = obj[keys[i]]; } return ret; }; lowercase-keys-1.0.0/license000066400000000000000000000021371246065010600160150ustar00rootroot00000000000000The MIT License (MIT) Copyright (c) Sindre Sorhus (sindresorhus.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. lowercase-keys-1.0.0/package.json000066400000000000000000000011411246065010600167300ustar00rootroot00000000000000{ "name": "lowercase-keys", "version": "1.0.0", "description": "Lowercase the keys of an object", "license": "MIT", "repository": "sindresorhus/lowercase-keys", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "engines": { "node": ">=0.10.0" }, "scripts": { "test": "node test.js" }, "files": [ "index.js" ], "keywords": [ "object", "assign", "extend", "properties", "lowercase", "lower-case", "case", "keys", "key" ], "devDependencies": { "ava": "0.0.4" } } lowercase-keys-1.0.0/readme.md000066400000000000000000000010251246065010600162220ustar00rootroot00000000000000# lowercase-keys [![Build Status](https://travis-ci.org/sindresorhus/lowercase-keys.svg?branch=master)](https://travis-ci.org/sindresorhus/lowercase-keys) > Lowercase the keys of an object ## Install ``` $ npm install --save lowercase-keys ``` ## Usage ```js var lowercaseKeys = require('lowercase-keys'); lowercaseKeys({FOO: true, bAr: false}); //=> {foo: true, bar: false} ``` ## API ### lowercaseKeys(object) Lowercases the keys and returns a new object. ## License MIT © [Sindre Sorhus](http://sindresorhus.com) lowercase-keys-1.0.0/test.js000066400000000000000000000003421246065010600157610ustar00rootroot00000000000000'use strict'; var test = require('ava'); var lowercaseKeys = require('./'); test(function (t) { t.assert(lowercaseKeys({FOO: true}).foo === true); t.assert(lowercaseKeys({FOO: true, bAr: true}).bar === true); t.end(); });