Comparing version 0.3.3 to 1.0.0
@@ -7,3 +7,3 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
export default function omit(obj, props) { | ||
export function omit(obj, props) { | ||
if (obj === void 0) { | ||
@@ -10,0 +10,0 @@ obj = {}; |
"use strict"; | ||
exports.__esModule = true; | ||
exports["default"] = omit; | ||
exports.omit = omit; | ||
@@ -6,0 +6,0 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } |
{ | ||
"name": "lomit", | ||
"version": "0.3.3", | ||
"version": "1.0.0", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "description": "Lightweight version of Object omit.", |
@@ -29,3 +29,3 @@ # lomit | ||
```js | ||
import omit from 'lomit'; | ||
import { omit } from 'lomit'; | ||
@@ -42,3 +42,3 @@ omit({name: '', title: ''}, ['title']); | ||
```js | ||
import omit from 'lomit'; | ||
import { omit } from 'lomit'; | ||
@@ -45,0 +45,0 @@ omit({name: '', title: '', location: { city: '', state: '' }}, ['title', 'location.city']); |
@@ -1,2 +0,2 @@ | ||
export default function omit(obj = {}, props = []) { | ||
export function omit(obj = {}, props = []) { | ||
obj = {...obj}; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
import omit from './index'; | ||
import { omit } from './index'; | ||
@@ -3,0 +3,0 @@ const testObject = { |
@@ -1,7 +0,7 @@ | ||
/*! lomit v0.3.3 | (c) 2020 Ryan Hefner | MIT License | https://github.com/ryanhefner/lomit !*/ | ||
/*! lomit v1.0.0 | (c) 2020 Ryan Hefner | MIT License | https://github.com/ryanhefner/lomit !*/ | ||
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : | ||
typeof define === 'function' && define.amd ? define(factory) : | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lomit = factory()); | ||
}(this, (function () { 'use strict'; | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : | ||
typeof define === 'function' && define.amd ? define(['exports'], factory) : | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.lomit = {})); | ||
}(this, (function (exports) { 'use strict'; | ||
@@ -41,5 +41,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
return omit; | ||
exports.omit = omit; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
}))); | ||
/* follow me on Twitter! @ryanhefner */ |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).lomit=t()}(this,function(){"use strict";function t(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}return function o(i,e){return void 0===i&&(i={}),void 0===e&&(e=[]),i=function(o){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?t(Object(i),!0).forEach(function(e){var t,r,n;t=o,n=i[r=e],r in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(i)):t(Object(i)).forEach(function(e){Object.defineProperty(o,e,Object.getOwnPropertyDescriptor(i,e))})}return o}({},i),e.forEach(function(e){var t=e.indexOf(".");if(-1!==t){var r=e.slice(0,t),n=e.slice(t+1);r&&i[r]&&(i[r]=o(i[r],[n]))}else i.hasOwnProperty(e)&&delete i[e]}),i}}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).lomit={})}(this,function(e){"use strict";function t(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}e.omit=function o(i,e){return void 0===i&&(i={}),void 0===e&&(e=[]),i=function(o){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?t(Object(i),!0).forEach(function(e){var t,r,n;t=o,n=i[r=e],r in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(i)):t(Object(i)).forEach(function(e){Object.defineProperty(o,e,Object.getOwnPropertyDescriptor(i,e))})}return o}({},i),e.forEach(function(e){var t=e.indexOf(".");if(-1!==t){var r=e.slice(0,t),n=e.slice(t+1);r&&i[r]&&(i[r]=o(i[r],[n]))}else i.hasOwnProperty(e)&&delete i[e]}),i},Object.defineProperty(e,"__esModule",{value:!0})}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
12998
154
0