1.1.5 • Published 11 months ago

@jswork/next-toggle-to v1.1.5

Weekly downloads
-
License
MIT
Repository
-
Last release
11 months ago

next-toggle-to

Toggle to some value for next.

version license size download

installation

npm install -S @jswork/next-toggle-to

usage

import '@jswork/next-toggle-to';

const items = [
  { value: 'deposit', label: '保证金帐户', price: '2000' },
  { value: 'extra', label: '使用余额', price: '1000' },
  { value: 'de1', label: '使用余额xxx', price: '1000' },
  { value: 'de2', label: '使用余额yyy', price: '1000' }
];

const target = { value: 'de1', label: '使用余额xxx', price: '1000' };
const res = nx.toggleTo(items, target, { value: false, path: 'value'});

/*
[
  { value: 'deposit', label: '保证金帐户', price: '2000' },
  { value: 'extra', label: '使用余额', price: '1000' },
  { value: 'de2', label: '使用余额yyy', price: '1000' }
]
*/

license

Code released under the MIT license.

1.1.1

12 months ago

1.1.5

11 months ago

1.1.4

12 months ago

1.1.3

12 months ago

1.1.2

12 months ago

1.0.1

2 years ago

1.0.0

5 years ago