This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Predicate } from '@ngxs/store/operators/internals'; | |
import { isPredicate, findIndices, isArrayNumber, invalidIndexs } from './utils'; | |
/** | |
* @param selector - indices or predicate to remove multiple items from an array by | |
*/ | |
export function removeManyItems<T>(selector: number[] | Predicate<T>) { | |
return function removeItemsOperator(existing: Readonly<T[]>): T[] { | |
let indices = []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Camel as Kebab": { | |
"prefix": "x-kebab", | |
"body": [ | |
"${1} -> ${1/([a-z]*)(([A-Z])+([a-z]+))?/${1:/downcase}${2:+-}${3:/downcase}${4:/downcase}/g}" | |
], | |
"description": "dash separators" | |
}, | |
"lowerFirstLetter": { | |
"prefix": "x-lower-first", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const state = getState(); | |
setState({ …state, loading: true }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NgxsModule.forRoot([ FooState, BarState ], { | |
compatibility: { | |
strictContentSecurityPolicy: true | |
} | |
}) |