1.0.23 • Published 3 years ago

field_name_helper v1.0.23

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

Field Name Helpers

Introduction

Field Name helpers is a small library (for now ) just with two function. 1. nameGenerator(str, slices, idKey) - accepts three non mandatory arguments.

a)str - the string from to generate a field name

b) slices - array (indexed slices from the string) -example some long name -> slices would be 0,1,2 and result came case name someLongName

let name = "some name";
const modifiedName = nameGenerator(name,[],null)
modifiedName= "someName";
let longName = "This is really a long name";// we will take 3 indexed chunks
const longModifiedName = nameGenerator(longName, [2,4,5], null)
longModifiedName = 'reallyLongName'

if you leave the slices array empty it will create by default a name from the first two indexes of the string 2. uniqueFieldName(items) - accepts array of objects which must have as a key name.

Installation

npm install --save field_name_helper

Licence

This project is licensed under the terms of the MIT license.

1.0.22

3 years ago

1.0.23

3 years ago

1.0.21

3 years ago

1.0.20

3 years ago

1.0.19

3 years ago

1.0.18

3 years ago

1.0.17

3 years ago

1.0.16

3 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago