next-toggle
Toggle array element.
installation
npm install -S @feizheng/next-toggle
usage
import '@feizheng/next-toggle';
const arr = [1,2,3,4];
nx.toggle(arr, 5);
// [1,2,3,4,5]
nx.toggle(arr, 5);
// [1,2,3,4]
license
Code released under the MIT license.